Gradient and the directional derivative

Gradient and Directional Derivative
The gradient of a function represents the rate of change of a function, it is defined as
∇f(x,y)=⟨fx, fy⟩=∂x∂fi+∂y∂fj
and
∇f(x,y,z)=⟨fx, fy, fz⟩=∂x∂fi+∂y∂fj+∂z∂fk
- It is a vector!
- The gradient vector points in the direction of maximum increase, and the magnitude of this vector represents the maximum rate of change.
Example
Find the gradient of the function f(x,y)=sinx+e2x2y at the point (x,y)=(0, 1).
∇f=⟨fx, fy⟩=⟨cosx+e2x2y(4xy), e2x2y(2x2)⟩
∇f(0,1)=⟨0, 0⟩
The directional derivative tells us the rate of change of a function z=f(x,y) in the direction of a unit vector u=⟨a, b⟩, and is defined by
Du f=fx a+fy b
or
Du f=∇f⋅u
- It is a scalar!
- It is the projection of the gradient vector along the unit vector u
- Its maximum value is when the unit vector u is in the direction of the gradient vector, and is equal to ∣∇f∣
Example
Suppose that f(x,y)=x2−2xy+3y2 and u is the unit vector with an angle of θ=4π with the positive x-axis.
a.) Find Du f(0, 1).
b.) In what direction does f have the max rate of change at this point? What is the max rate of change?
a.) Since θ=4π, we know that u=⟨cos4π, sin4π⟩=⟨21,21⟩
Method 1
Du f=(2x−2y)(21)+(−2x+6y)(21)
Du f(0,1)=(0−2)(21)+(0+6)(21)=24 or 22
Method 2
∇f=⟨2x−2y,−2x+6y⟩
Du f=⟨2x−2y, −2x+6y⟩⋅⟨21,21⟩=(2x−2y)(21)+(−2x+6y)(21)
Du f(0,1)=(0−2)(21)+(0+6)(21)=24 or 22
b.) f increases fastest (max rate of change) in the direction of the gradient vector at this point ∇f(0,1)=⟨−2, 6⟩, and its maximum value is ∣⟨−2,6⟩∣=40