Tuesday, June 25, 2024

Directional derivative of a function of two variables (continued)

 Goals:

1. Define directional derivative as an expression of partial ,derivatives

2. Define "gradient"

Directional derivative as expression of partial derivatives

Theorem

Let z = f(x, y) a function of two variables x and y. Let's assume fₓ and fy exist and f is differentiable everywhere. Then the directional derivative of f in the direction of u = cosθi + sinθj is given by:

Dᵤf(x, y) =  fₓ(x,y) cosθ + fy(x,y)sinθ (1)

Example

Let θ = arccos(3/5). Find the directional derivative Dᵤf(x,y) of the function f(x, y) = x² - xy + 3y² in the direction of u = cos(θ)i + sin (θ)j,. What is Df(-1, 2)?

Solution

In order to apply the formula above, we must calculate the partial derivatives:

 



Let's now apply the formula. Let's notice that this example is the same as the example in the previous post where we had cosθ = 3/5 and )sinθ = 4/5.









Let's calculate  Dᵤf(-1, 2)?





Practice

Find the directional derivative Dᵤf(x,y) of 





What is Dᵤf(3,4)?


Gradient

The right hand side of equation (1) can be written as the dot product of two vectors. The first vector can be written as 

(2)


The second vector can be written as: 

 


Then the right hand side of equation (1) can be written as:





The first vector is called gradient of f. The symbol of the inversed delta is called "nabla" 


Definition

Let z = f(x,y) be a function of two variables x and y such that fx and fy exist. 










Example








Solution

a. Let's first calculate the partial derivatives in order to apply the formula of the gradient:






b. Let's do the same:





Practice







Saturday, June 22, 2024

Directional derivatives of a function of 2 variables

 Goal: Determine the directional derivative of a function of two  variables

Considerations:

In a function of two variables, we have so far considered partial derivatives both with respect to x and y. In these partial derivatives, only one variable is changing. In partial derivative with respect to x, this variable is changing while y is constant. In partial derivative with respect to y only y is changing while x is constant.

In directional derivatives, both variables x and y are changing. The changing of  these variables provide a direction. This direction is represented by a vector expressed in function of an angle.

We consider the graph of a surface represented by the function z = f(x, y). We consider a point (a,b) that belongs to the domain of f.  The direction of travel starts from that point and is measured according to an angle θ, directed counterclockwise in the xy plane starting at zero from the positive direction of the x-axis. The distance traveled is h and the direction is given by the vector u = cos(θ)i + sin (θ)j, The z coordinate of the second point on the graph  is given by z  =  f( a + hcosθ, b + hsinθ,).


We start from a point (a, b, f(a,b)) of the surface and arrive at a second point of which the z coordinate is  z  =  f( a + hcosθ, b + hsinθ,). The slope of the secant line joining these two points is found by dividing the difference of the z coordnates by the difference traveled, which is h. We have:


The directional directive of the function f in the direction u is equal to the slope of the tangnt line at the given point. The slope is found by taking the limit of the above expression when h approaches zero,

Definition

Suppose z = f(x.y) is a function of two variables with a domai D. Let (a, b) ϵ D and define u = cos(θ)i + sin (θ)j. Then the directional derivative in the direction of u is given by:


provided that the limit exists.

Example

Let θ = arccos(3/5). Find the directional derivative Dᵤf(x,y) of the function f(x, y) = x² - xy + 3y² in the direction of u = cos(θ)i + sin (θ)j,. What is Df(-1, 2)?

Solution

According to the definition, Dᵤf(x,y) is given by:

Dᵤf(x,y) = lim f(x + hcosθ, y + hsinθ) - f(x,y)/h when h approaches zero. Let's start by calculating 

f(x + hcosθ, y + hsinθ):



Since cos θ = 3/5, sin θ is given by:


Let's substitute sin θ and cos θ :








Let's substitute f(x + hcosθ, y + hsinθ) and f(x, y) in the expression: Dᵤf(x,y) = lim f(x + hcosθ, y + hsinθ) - f(x,y)/h when h approaches zero: We have:

Dᵤf(x,y) 


To fnd Dᵤf(-1, 2)? let's substitute x by -1 and y by 2 in the above expression:


See the following figure:



In the figure above we can see that the plane is tangent to the surface at the point (-1,2,15).




Saturday, June 8, 2024

Implicit differentiation of a function of two or more variables

 Goal: find the derivative of an implicit function of two or more variables.

Let's consider the function defined by the ellipse 

x² + 3y² + 4y - 4 = 0

  Let's find its derivative. This is the implicit function of an ellipse defined by the following graph:

 

 Let's find the derivative of this function by taking the derivative of both sides:

 

This last expression of the derivative is the simplification of dy/dx = -2x/6y + 4

We can notice that the numerator is the partial derivative of the function f(x,y) = 0 with respect to x. The denominator is the partial derivative of f with respect to y. This fact leads to the following theorem:

Theorem 

Suppose that the function z = f(x,y) defines y implicitly as a function y = g(x) via the equation f(x,y) = 0, then

 provided 


 

If the equation f(x, y, z) = 0 defines z implicitly as a function  differentiable of x and y, then

 

Example

a. Calculate dy/dx if y is expressed implicitly as a function of x via the equation 3x² - 2xy + y² + 4x-6y - 11 = 0. What is the equation of the tangent line to the graph of this curve at point (2, 1)?

b' Calculate ẟz/ẟx and ẟz/ẟy given

Solution

Let's write f(x, y)3x² - 2xy + y² + 4x-6y - 11 = 0 and calculate ẟf/ẟx and ẟf/ẟy

ẟf/ẟx = 6x - 2y + 4  ẟf/ẟy = -2x + 2y - 6

The derivative is given by:




The slope of the tangent line at the point (2, 1) is given by:





The equation of the tangent line is given by:



This is the graph of the rotated ellipse represented by the equation 3x² - 2xy + y² + 4x-6y - 11 = 0

b. We have  


Let's calculate the partial derivatives of f with respect to x, y and z.


Finally let's calculate  ẟz/ẟx and ẟz/ẟy:



Practice

Find the derivative dy/dx of the function y defined implicitly as a function of x and y by the function 


What is the equation of the tangent line to the graph of this curve at point (3,2)?