# Directional derivative and unit vectors

Given this function:

$$f(x,y) = \left\{\begin{matrix} \frac{x^3 + 2y^3}{x^2 + y^2} & (x,y) \neq 0 \\ 0 & (x,y) = (0,0) \end{matrix}\right.$$

• Find the directional derivative $$\frac{\partial f}{\partial n} (0,0)$$ for each unit vector $$n$$.

• In which direction the directional derivative is the biggest?

I know that $$f_{\vec{n}}(0,0) = \nabla f(0,0) \cdot \frac{\vec{n}}{||\vec{n}||}$$

And because $$\vec{n}$$ is a unit vector: $$||\vec{n}|| = 1$$ and thus we have that the directional derivative is: $$f_{\vec{n}}(0,0) = \nabla f \cdot \vec{n}$$

But I don't know how to continue from here... how does the vector $$\vec{n}$$ comes into play in this question? If the function takes $$0$$ at the point $$(0,0)$$ ... I would appreciate your kind help, thanks!

• Write $\vec n=(x_0,y_0)$ and define $h(t)=f(tx_0,ty_0)$. Compute $h'(0)$. Aug 18, 2020 at 15:41
• @AnginaSeng Why are we multiplying $\vec{n}$ by t ? Aug 18, 2020 at 15:45
• Aug 18, 2020 at 15:47

If $$n$$ is a unit vector, then $$n=(\cos\theta,\sin\theta)$$, for some $$\theta\in\Bbb R$$. And the directional derivative of $$f$$ at $$(0,0)$$ in the direction given by $$n$$ is\begin{align}\lim_{h\to0}\frac{f(hn+(0,0))-f(0,0)}h&=\lim_{h\to0}\frac{h^3\cos^3\theta+2h^3\sin^3\theta}{h^3}\\&=\cos^3\theta+2\sin^3\theta.\end{align}It is not hard to prove that the maximum value of this expression is $$2$$, attained when $$\theta=\frac\pi2$$.
• Hey! Thanks for your awesome answer! - I have a question - is $cos^3 {\theta} + 2 sin^3 {\theta}$ as a final answer fine? or we need to compute it back to algebraic form (not polar) Thanks! Aug 18, 2020 at 15:48
• All I can say is that I would accept that as an answer, if it is stated along with it that the unit vector is $(\cos\theta,\sin\theta)$. Aug 18, 2020 at 15:49
• Thanks you sir, one last question, I can take the derivative to get the critical points of the trigonometric function $cos^3 ( \theta ) + 2 sin^3( \theta)$ - and get it is indeed at 90 deg. (= $\frac{ \pi}{2}$ rads) - but what stops me from taking $2 \pi + \frac{ \pi}{2}$ for example? which is still the critical point. Thanks! Aug 18, 2020 at 15:58
• Sure, but it's the same direction! After all$$\left(\cos\left(\frac\pi2\right),\sin\left(\frac\pi2\right)\right)=\left(\cos\left(2\pi+\frac\pi2\right),\sin\left(2\pi+\frac\pi2\right)\right).$$ Aug 18, 2020 at 16:01