Table of contents

How to find Directional Derivative with an angle?

Introduction

The directional derivative can be calculated by taking the dot product of the gradient of a function with the given unit vector. In this article, we will learn another alternative method of finding directional derivatives with an angle.

Directional Derivative with an angle

Let f(x,y) be a function of two variables x and y. Assume that the partial derivative of f(x,y) exists and it is differentiable everywhere. Then the directional derivative of f(x,y) in the direction of u = cos∅ i + sin∅ j is given by

$$D_uf(x,y)\;=\;f_x(x,y)\;cos∅\;+\;f_y(x,y)\;sin∅ $$

The above is another formal definition of directional derivative. It is useful to find the derivative of a function in the direction of u = cos∅ i + sin∅ j

Finding a Directional Derivative

We can use the above definition to find a directional derivative of any function. It is an alternative way that provides a derivative of a function in a specific direction. Following steps are performed to calculate derivatives with an angle.

  1. Find the partial derivatives of f(x,y).
  2. Calculate cosine and sine function of acute angle θ.
  3. Use the values of partial derivatives and the acute angle in the directional derivative formula.
  4. Now substitute the coordinates of the given point.
  5. Simplify to get an exact solution.

Here are some examples of directional derivatives with an angle.

Directional derivative and gradient example no. 1

Let θ = (3 / 5) . Find the directional derivative Duf (x,y) of

$$f(x,y)\;=\;x^2\;-\;xy\;+\;3y^2$$

In the direction of u = cosθ i + sinθ j. What is Duf(-1,2)?

Step-1

Finding partial derivatives of f(x,y) = x2 - xy + 3y2

$$\frac{df}{dx}\;=\;2x\;-\;y$$ $$\frac{df}{dy}\;=\;-x\;+\;6y$$

Step-2

Finding the acute angle.

$$θ\;=\;(\frac{3}{5})$$ $$cosθ\;=\;\frac{3}{5}$$

And by using trigonometric formula

$$sinθ\;=\;\sqrt{1-(\frac{3}{5}^2)}$$ $$ sinθ\;=\;\sqrt{1\;-\;\frac{9}{25}}\;=\;\sqrt{\frac{16}{25}}\;=\;\frac{4}{5} $$

Step-3

By the definition of directional derivative,

$$D_uf(x,y)\;=\;f_x(x,y)cosθ\;+\;f_y(x,y)sinθ $$ $$D_uf(x,y)\;=\;(2x\;-\;y)cosθ \;+\;(-x\;+\;6y)sinθ $$ $$D_uf(x,y)\;=\;(2x\;-\;y)\frac{3}{5}\;+\;(-x\;+\;6y)\frac{4}{5} $$ $$D_uf(x,y)\;=\;\frac{6x}{5}\;-\;\frac{3}{5}y\;-\;\frac{4x}{5}\;+\;\frac{24y}{5}$$ $$D_uf(x,y)\;=\;\frac{2x+21y}{5}$$

Step-4

At point (-1,2)

$$D_uf(-1,2)\;=\;\frac{2(-1)+21(2)}{5}\;=\;\frac{40}{5}\;=\;8$$

Directional derivative and gradient Example no. 2

Find the directional derivative in the direction of u = cos π / 3i + sin π / 3j of

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

Also find Duf(3,4)

.

Step-1

Finding partial derivatives of f(x,y) = 3x2y - 4xy3 + 3y2 - 4x

$$\frac{df}{dx}\;=\;6xy\;-\;4y^3\;-\;4$$ $$\frac{df}{dy}\;=\;3x^2\;-\;12xy^2\;+\;6y$$

Step-2

$$ cos\frac{π}{3}\;=\;0.5$$ $$ sin\frac{π}{3} \;=\;\frac{\sqrt 3}{2}$$

Step-3

By the definition of directional derivative,

$$D_uf(x,y)\;=\;f_x(x,y)\;cosθ\;+\;f_y(x,y)sinθ$$ $$D_uf(x,y)\;=\;(6xy\;-\;4y^3\;-\;4)\frac{1}{2}\;+\;(3x^2\;-\;12xy^2\;+\;6y)\frac{\sqrt 3}{2}$$

Step-4

At point (3,4)

$$D_uf(3,4)\;=\;(6(3)(4)\;-\;4(4)^3\;-4)\frac{1}{2}\;+\;(3(3)^2\;-\;12(3)(4)^2\;+\;6(4))\frac{\sqrt 3}{2}$$ $$D_uf(3,4)\;=\;\frac{72-256-4}{2}\;+\;\frac{(27-576+24)\sqrt{3}}{2}$$ $$D_uf(3,4)\;=\;-94\;-\;\frac{525\;\sqrt 3}{2}$$

How to find the maximum value of a directional derivative?

The maximum value of a directional derivative indicates the maximum change in the function along a specific direction. A function will have a maximum rate of change in a direction of a unit vector if the magnitude of its gradient at that point is maximum. To calculate the maximum value of directional derivative, the gradient vector is calculated. You can also understand the difference between directional derivatives and gradient. Let’s discuss it in the following example.

Finding minimum value of a directional derivative

Let f(x,y) = x2 + 2xy. Find the maximum value at (2,2).

We need to calculate the gradient of the given function. So,

$$\frac{df}{dx}\;=\;2x\;+\;2y$$ $$\frac{df}{dy}\;=\;2x$$

The gradient of f(x,y) is

$$∇f(x,y)\;=\;<\frac{df}{dx}\;,\;\frac{df}{dy}>$$ $$∇f(x,y)\;=\;<2x\;+\;2y\;,\;2x>$$ $$∇f(2,2)\;=\;<2(2)\;+\;2(2)\;,\;2(2)>$$ $$∇f(2,2)\;=\;<8\;,\;4>$$

The maximum magnitude of gradient is

$$|∇f(2,2)|\;=\;\sqrt{8^2\;+\;4^2}\;=\;\sqrt{64\;+\;16}\;=\;\sqrt{80}$$

Which is the maximum value of the directional derivative of the given function.

How to find minimum directional derivative at a point?

The minimum value of a directional derivative indicates the minimum rate of change of a function. The directional derivative is minimum if the magnitude of the gradient is minimum. The minimum magnitude of gradient is

minimum magnitude = -|∇f(x,y)|

So, to find the minimum value of directional derivative in the above example,

$$-|∇f(2,2)|\;=\;-\sqrt{80}$$

FAQ’s

What are directional derivatives used for?

These are used to find the maximum or minimum rate of change in a function with respect to the location at which we are calculating rate of change. It has many applications in mathematics and physics where we can calculate speed, velocity acceleration etc. It has many applications in real life problems also.

How to maximize directional derivative?

The derivative of a function can be maximised by finding the maximum magnitude of gradient at that point of change. The value of maximum magnitude of gradient is the value of maximum directional derivative. So, the maximum directional derivative of f(x,y) is |∇f(x,y)|.

What is the formula for directional derivative?

Let f(x,y) be a function of two variables x and y. Then the formula of directional derivative for f(x,y) in the direction of a unit vector u = cosθ i + sinθ j is given by:

$$D_uf(x,y)\;=\;f_x(x,y)\;cosθ\;+\;f_y(x,y)\;sinθ$$

Why differentiation is used?

In calculus, differentiation is a concept of the rate of change of any function. We usually use differentiation to know how a quantity will change. For example, if we calculate the rate of change of distance covered by a body per time, that gives the body's velocity. Therefore, differentiation is important because it allows us to explore many other concepts.