<s>[INST] Directional derivatives of a function with partial derivatives The prompt is to 1. find the directional derivatives of the function $f$ at a point $P(1, -1,2)$ in the direction towards origin and we are given $$f(1, -1, 2) = 5$$ $$f_x(1, -1, 2) = 1$$ $$f_y(1, -1, 2) = 3$$ $$f_z(1, -1, 2) = -1$$


*Find the plane tangent to the surface $f(x, y, z) = 5$ at point $P = (1, -1, 2)$

*Suppose we are told that there is a direction $u$ in which the directional derivative of $f$ is $6$, is this possible? If yes, find such a direction $u$, else explain why not.

*The equation $f(x, y, z) = 5$ determines $z(x, y)$, evaluate $z_x(1, -1, 2)$
Here's what I tried doing, 
For part 1,
$$\nabla f = (1, 3, -1)$$
$$\vec v = (0, 0, 0) - (x, y, z) = (-x, -y, -z)$$ 
Unit vector along $\vec v$
$$\vec v = \frac{(-x, -y, -z)}{\sqrt{x^2 + y^2 + z^2}}$$
Directional vector at point $P(1, -1, 2)$
$$\nabla f.\vec v = (1, 3, -1).\frac{(-x, -y, -z)}{\sqrt{x^2 + y^2 + z^2}}$$
$$\nabla f.\vec v = \frac{(-x)}{\sqrt{x^2 + y^2 + z^2}} +\frac{(-3y)}{\sqrt{x^2 + y^2 + z^2}} + \frac{(z)}{\sqrt{x^2 + y^2 + z^2}}$$
For part 2,
The plane tangent is given by 
$$\nabla f_{(1, -1, 2)} = (x - 1) + 3(y + 1) -(z - 2) = 0$$
$$x +3y-z= -4$$
I'm not sure how to go on about part 3 and 4 also I'm not sure if part 1 and 2 are correct.
 [/INST] The unit vector at $P(1, -1,2)$ in the direction of the origin is $\mathbf{u}=\left(-\frac{1}{\sqrt{6}},\frac{1}{\sqrt{6}},-\frac{2}{\sqrt{6}}\right)$ and the gradient is $\nabla f = (1, 3, -1)$ therefore the directional derivative at $P$ in the direction $\mathbf{u}$ is
$$ D_{\mathbf{u}}f(1,-1,2)=\nabla f\cdot\mathbf{u}=(1, 3, -1)\cdot\left(-\frac{1}{\sqrt{6}},\frac{1}{\sqrt{6}},-\frac{2}{\sqrt{6}}\right)=\frac{4}{\sqrt{6}}=\frac{2\sqrt{3}}{3} $$
Your equation for the tangent plane is correct.
The largest possible value for the directional derivative of $f$ at $P$ is in the direction of the gradient, which would be
$$ \mathbf{v}=\left(\dfrac{1}{\sqrt{11}},\dfrac{3}{\sqrt{11}},-\dfrac{1}{\sqrt{11}}\right) $$
giving
$$ D_{v}=\nabla f\cdot\mathbf{v}=\sqrt{11}<6 $$
so this is not possible.
</s>