Let the directional vector be $d=(a,b)$ so that $a^2+b^2=1$
Directional derivative of $f$ along $d$ is $ f'(X,d)=\nabla f.d=(6x,2y).(a,b)$
$=6xa+2yb=6\sin \theta\sin\phi+2\cos\theta\cos\phi=4+2\cos(\theta-\phi)$, where let $x=\cos\theta,a =\cos\phi$
Hence, $f'(X,d)|_{max}=6$, which occurs when $\theta -\phi =2n\pi\implies$that is, when $x=a,y=b$
Is this correct? I am confused because I saw the solution online and $f'(X,d)|_{max}=8$.
Can someone please help me understand how it is possible? Thanks in advance.
You basically try to solve the following problem: Find the max value of $g(a,b,x,y) = 6ax+2by$ such that $a^2+b^2=1=x^2+y^2$. Simple. Apply the CS inequality: $|g(a,b,x,y)|^2 \le (36a^2+4b^2)(x^2+y^2)= 36a^2+4b^2= 4+32a^2\le 4+32=36\implies |g| \le \sqrt{36}=6$. This is the max value you are seeking and it is attained when $a = \pm 1, b = 0\implies g = \pm 6x=6\implies x =\pm 1, y=0$. Note that if $a = 1, x = 1$, and $a = -1, x = -1$.