# Multivariable Calculus - Maximum direction derivative

We have f(x,y,z) at point $$m$$ the directional derivative is maximum at the direction of vector $$u=(1,1,1)$$ And is equal to $$\sqrt{27}$$

find for which a the directional derivative for f in point m in direction of vector (1,2,a) is 5?

Since the D'D at point $$m$$ is maximum at the direction of vector $$u=(1,1,1)$$ that means $$\triangledown f(m)$$ is equal to the direction of vector $$u$$ and the direction of $$u$$ is $$\frac{u}{\left \| u \right \|}=\frac{1}{ \sqrt{3}}$$ that is supposed to mean that gardient vector for $$\triangledown f(m)=\alpha \vec{u}$$ for some $$\alpha\epsilon \mathbb{Z}$$

Am I correct so far? and if that's so i dont know how to continue from here

If the directional derivative of $$f$$ is at a maximum in some direction then $$\nabla f$$ points in that direction.

What is $$\nabla f$$

$$\nabla f = \mu (1,1,1)\\ \nabla f \cdot (\frac{1}{\sqrt 3},\frac{1}{\sqrt 3},\frac{1}{\sqrt 3}) = \sqrt {27}\\ \mu\sqrt 3 = \sqrt {27}\\ \mu = 3\\ \nabla f = (3,3,3)$$

What is the directional derivative in the direction $$(1,2,a)$$?

$$\nabla f\cdot \frac {(1,2,a)}{\|(1,2,a)\|} = \frac {9+3a}{\sqrt {5+a^2}}$$

We have been told that this equals $$5$$

$$\frac {9+3a}{\sqrt {5+a^2}} = 5\\ 9+3a = 5\sqrt {5+a^2}$$

Square both sides and solve the quadratic for $$a.$$

$$81 + 54a + 9a^2 = 125 + 25a^2\\ 16a^2 - 54a + 44 = 0\\ 2(8a - 11)(a-2)=0\\ a = \frac {11}{8}, 2$$