Table of contents

What is the difference between Derivative and Directional Derivative?

Introduction

Derivative is a fundamental concept of calculus. It is the instantaneous rate of change in a function at a point in its domain. Whereas the directional derivative generalises the view of a partial derivative. In this article, we will discuss how these are differ from each other. It will also help you to understand the basic rules of derivatives.

What is Derivative?

In mathematics, the derivative of a function is defined as the rate of change in a function with respect to its independent variable. For example, the derivative of the speed of a moving car with respect to time calculates how quickly the speed of the car will change.

In other words, the derivative of a function is the slope of the tangent line to the graph of the function.

Derivative Formula

Let y = f(x) be a function, the derivative of f with respect to its independent variable x is defined as

$$\frac{dy}{dx}\;=\;\lim_{x\to∞}\frac{δy}{δx}\;=\;\lim_{x\to∞}\frac{f(x+δx)\;-\;f(x)}{δy}$$

It is the instantaneous rate of change in f with respect to x. Roughly, the derivative of a function gives the idea of how much change will occur if one variable changes.

What is Directional Derivative?

The directional derivative is a derivative of a function in a specific direction. It is the derivative of a function along a vector v at the point of change in the function. It is the dot product of gradient vector and unit vector at that point.

Directional Derivative Formula

Let f(x,y) be a function at a point (xo,yo), in the direction of a vector v = (a,b) then the direction derivative of this function is defined by the partial derivative of f(x,y) at point (xo,yo) such that

$$D_vf(x_o,y_o)\;=\;f_x(x_o,y_o)a\;+\;f_y(x_o,y_o)b$$

It is the instantaneous rate of change in the function along a unit vector where x and y both are changing. Another simplest definition of directional derivative is

$$D_vf(x,y)\;=\;∇f(x,y).v$$

Difference between Derivative and Directional Derivative

Since the derivative and directional derivative both calculate the rate of change of a function. But there are some major differences between them.

Let’s discuss this in the following difference table.

Difference Table
Derivative Directional Derivative
It is the rate of change in a function with respect to one variable ‘x’ that is independent. It is the rate of change in a function when both variables x and y are changing.
If y=f(x) the derivative calculates the rate of change in y due to change in x, such as $$f(x)\;=\;\lim_{x\to∞}\;\frac{f(x\;+\;δx)\;-\;f(x)}{δy}$$ If z = f(x,y), the directional derivative is the dot product of gradient vector of the function and the unit vector, such as $$D_vf(x,y)\;=\;∇f(x,y).v$$
It indicates the rate of change in positive coordinate direction. It indicates the rate of change in a specific direction. There are an infinite number of directional derivatives.

Basic Derivative Rules

There are four basic rules of derivatives that are key tools to find derivatives of power of a variable, product and fraction of two functions.

  1. Power Rule
  2. $$\frac{d}{dx}(x^n)\;=\;nx^{n-1}\;\frac{d}{dx}\;(x)$$
  3. Quotient Rule
  4. $$\frac{d}{dx}(\frac{f(x)}{g(x)})\;=\;\frac{f(x)\;g(x)\;-\;g(x)\;f(x)}{[g(x)]^2}$$
  5. Chain Rule
  6. If y = f(u) and x = u(x),

    $$\frac{dy}{dx}\;=\;\frac{dy}{du}\;*\;\frac{du}{dx}$$
  7. Product Rule
  8. $$\frac{d}{dx}\;[f(x).g(x)]\;=\;f(x)\;g(x)\;+\;g(x)\;f(x)$$

How to calculate the derivative of a function?

The derivative of a function is calculated by applying the limit on the given function or we can use the derivative rules. You can also find the derivative with an angle. Here we will discuss it in an example.

Derivative of a function example

Calculate the derivative of y = 4x3 + 2x - 1 with respect to x.

To find the derivative of

$$y\;=\;4x^3\;+\;2x\;-\;1$$

Apply the derivative formula on both sides of the equation.

$$\frac{dy}{dx}\;=\;\frac{d}{dx}(4x^3\;+\;2x\;-\;1)$$

Using the power rule,

$$\frac{dy}{dx}\;=\;4\;×\;3x^{3-1}+\;2\;=\;12x^2\;+\;2$$

So,

$$\frac{dy}{dx}\;=\;12x^2\;+\;2$$

How to find directional derivatives of a function?

The directional derivative of a function can be calculated by finding the gradient vector and taking its dot product with the unit vector in the direction we want to calculate the directional derivative.

directional derivatives of a function example

Find the directional derivative of 4x2y + 2x in the direction of v = <-1,2>

To find the derivative of

$$f(x,y)\;=\;4x^2y\;+\;2x$$

The partial derivative of this function are

$$f_x\;=\;8xy\;+\;2$$ $$f_y\;=\;4x^2$$

And the unit vector of v = <-1,2> is,

$$v\;=\;\frac{v}{|v|}\;=\;\frac{-i\;+\;2j}{\sqrt{(-1)^2\;+\;2^2}}$$ $$v\;=\;\frac{-i\;+\;2j}{\sqrt 5}$$

The gradient of the function,

$$∇f(x,y)\;=\;f_x\;+\;f_y\;=\;8xy\;+\;2\;+\;4x^2$$

So we find the directional derivative of a function

$$D_vf(x,y)\;=\;f(x,y).v$$ $$D_vf(x,y)\;=\;\frac{-1}{\sqrt 5}(8xy\;+\;2)\;+\;\frac{2}{\sqrt 5}(4x^2)$$ $$D_vf(x,y)\;=\;\frac{-8xy\;-\;2\;+\;8x^2}{\sqrt 5}$$

FAQ’s

Is Directional Derivative and Gradient the same?

No, directional derivative and gradient are not the same because the gradient gives the direction of the maximum rate of change of a function and the directional derivative calculates the rate of changes of a function in a specific direction. The gradient can be used in a formula to calculate directional derivative.

What is a Derivative Used for?

The derivative of a function is used to calculate the rate of change in a function by finding the change in dependent variable due to the change in independent variable. It is denoted by f’(x) or dy /dx and the formula is

$$f(x)\;=\;\lim_{x\to∞}\;\frac{f(x\;+\;δx)\;-\;f(x)}{δy}$$

Can Directional Derivative be Zero?

Yes, the directional derivative can be zero. It is a number that measures the rate of increase or decrease in a function. But if it is zero in a specific direction, it means that there is no change along that direction. Nothing will happen in the direction of a given unit vector.