# Given f(x,y,z) = x^2 - 2 x y z a) Find the gradient of f. b) Evaluate the gradient of f at the...

## Question:

Given {eq}\displaystyle f(x,y,z) = x^2 - 2 x y z{/eq}

a) Find the gradient of {eq}f. {/eq}

b) Evaluate the gradient of {eq}f {/eq} at the point {eq}P(1,0,2) {/eq}

c) The directional derivative of {eq}f {/eq} at {eq}P(1,1,1) {/eq} in the direction of the unit vector {eq}\langle 1,0,0 \rangle {/eq}

Find the local maximum, local minimum and saddle point(s) of the function {eq}\displaystyle f(x,y) = 2 x^3 - x y^2 + 5 x^2 + y^2. {/eq}

## Application of Partial Derivatives to find Directional Derivatives and Maxima or Minima:

The directional derivative of f(x, y, z) at P in the direction of {eq}\vec v {/eq} is {eq}D_{\hat v} f=\nabla f(P) \cdot \hat v, {/eq} where {eq}\nabla f(P) {/eq} denotes the gradient of f at the point P and {eq}\hat v=\frac{\vec v}{|\vec v|} {/eq} is the unit vector.

In order to find the point of local maxima or minima, first-order partial derivatives are used to obtain the critical points for the given function. Then we evaluate second-order partial derivatives {eq}r=f_{xx},s=f_{xy},t=f_{yy} {/eq} and check if {eq}rt-s^{2} {/eq} is positive, negative or zero. Depending upon the sign of {eq}r {/eq} and {eq}rt-s^{2} {/eq}, we decide if the critical point is the point of local maxima, minima or a saddle point.

a) Given {eq}\displaystyle f(x,y,z) = x^2 - 2 x y z {/eq}

The gradient of {eq}f {/eq} is given by

{eq}\begin{align*} \displaystyle \nabla f(x,y,z)&=\frac{\partial f}{\partial x} \vec i+\frac{\partial f}{\partial y} \vec j+\frac{\partial f}{\partial z} \vec k \\ \displaystyle &=(2x-2yz) \vec i -2xz \vec j-2xy \vec k \\ \end{align*} {/eq}

b) For the given point {eq}P(1, \ 0, \ 2) {/eq}, the gradient is simply obtained by substituting the coordinates of the point into the gradient function.

{eq}\begin{align*} \displaystyle \nabla f(1, \ 0, \ 2)&= (2(1)-2(0)(2)) \vec i -2(1)(2) \vec j -2(1)(0) \vec k\\ \displaystyle \nabla f(1, \ 0, \ 2)&= 2 \vec i -4 \vec j \\ \end{align*} {/eq}

C)

{eq}\begin{align*} \displaystyle \nabla f(1, \ 1, \ 1)&= (2(1)-2(1)(1)) \vec i -2(1)(1) \vec j -2(1)(1) \vec k\\ \displaystyle &= -2 \vec j-2 \vec k \\ \end{align*} {/eq}

We have {eq}\displaystyle \hat v = \vec i {/eq}.

The directional derivative of {eq}f {/eq} at {eq}P(1, 1, 1) {/eq} in the direction of {eq}\hat v {/eq} is:

{eq}\begin{align*} \displaystyle D_{\hat v}f &=\nabla f(P) \cdot \hat v\\ \displaystyle &= (-2 \vec j-2 \vec k ) \cdot (\vec i)\\ \displaystyle &=0 \end{align*} {/eq}

d) {eq}f(x, y) = 2x^3-xy^2+5x^2 + y^2. {/eq}

Differentiate f partially with respect to x,

{eq}f_{x}=6x^2-y^2+10x\\ f_{x}=0 \Rightarrow 6x^2-y^2+10x=0\\ \Rightarrow 6x^2+10x=y^2 \ ...(1)\\ {/eq} Differentiate f partially with respect to y,

{eq}f_{y}=-2xy+2y\\ f_{y}=0 \Rightarrow -2xy+2y=0\\ \Rightarrow 2y(-x+1)=0\\ \Rightarrow y=0 \text{ or } x=1 \ ...(2) \\ {/eq} Using (2) in (1), we obtain

{eq}\begin{align} y=0 & \Rightarrow 6x^2+10x=0\\ & \Rightarrow 2x(3x+5)=0\\ & \Rightarrow x(3x+5)=0\\ & \Rightarrow x= 0, \ \frac{-5}{3}\\ \end{align} {/eq}

{eq}\begin{align} x=1 & \Rightarrow 6+10=y^2\\ & \Rightarrow y^2=16\\ & \Rightarrow y= 4, \ -4\\ \end{align} {/eq}

Therefore, the extreme points are {eq}(0, \ 0), \ ( \frac{-5}{3}, \ 0), \ (1, \ -4) {/eq} and {eq}(1, \ 4). {/eq}

{eq}\begin{align} r &=f_{xx}=12x+10\\ s &=f_{xy}=-2y\\ t &=f_{yy}=-2x+2\\ rt-s^2 &=(12x+10)(2-2x)-(-2y)^2\\ &=24x-24x^2+20-20x-4y^2\\ &=4x-24x^2+20-4y^2\\ \end{align} {/eq}

Now, we know that if {eq}(rt-s^{2})(a,b)<0 {/eq} where (a,b) is a critical point, then (a,b) is a saddle point.

If {eq}(rt-s^{2})(a,b)>0, \ r(a,b)>0 {/eq} then (a,b) is a point of relative minima.

If {eq}(rt-s^{2})(a,b)>0, \ r(a,b)<0 {/eq} then (a,b) is a point of relative maxima.

If {eq}(rt-s^{2})(a,b)=0 \ or \ r(a,b)=s(a,b)=t(a,b)=0 {/eq} then no conclusion can be drawn about (a,b). It would need further investigation.

The following table gives the required values to classify the extreme points.

{eq}\begin{matrix} \text{Critical Points} & rt-s^2 & r \\ (0, \ 0) & 20>0 & 10>0\\ ( \frac{-5}{3}, \ 0) & \frac{-160}{3}<0 & - \\ (1, \ -4) & -64<0 & - \\ (1, \ 4) & -64<0 & - \end{matrix} {/eq}

So, we conclude that {eq}( \frac{-5}{3}, \ 0), \ (1, \ -4) {/eq} and {eq}(1, \ 4) {/eq} are saddle points, {eq}(0, \ 0) {/eq} is a point of local minimum value and there is no point of a local maximum value.