# Finding rate of maximum temperature increase along surface

So I know that the rate of maximum increase of some function (say, $f(x,y)$) is given by the gradient ($\nabla f$), where the direction is the direction of maximum increase of the function, and the magnitude tells you how fast it's increasing.

However, when I get into optimizing not for a maximal $f$, but rather for some other unrelated function (say $T(x,y,z)$) then I'm a bit lost. The particular problem I'm looking at gives specific functions and a specific point, but the generalized version of problem boils down to this:

Find the direction of maximum increase of $T(x,y,z)$ from a point $(x_0,y_0,f(x_0,y_0))$ while constrained to the tangent plane to the surface $z = f(x,y)$ at $(x_0,y_0)$.

If we call the general solution to this problem some vector-valued function $\vec{M}(f,T)$, then my naive attempt was $\vec{M} = \nabla(\nabla f \cdot \nabla T)$. Obviously, this approach is flawed, because $\vec{M}(f,f)$ should yield $\nabla f$, but $\nabla \|\nabla f\|^2 \ne \nabla f$, even though it serendipitously gave the right answer for part a) of the problem.

I was also thinking of parameterizing $f$ in terms of $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$, but I don't see how that would provide insight in the general case.

How do I approach this problem?

-

In practical terms, you should find the unit normal vector $\vec n$ to the surface (obtained by normalizing $\langle, -f_x,-f_y,1\rangle$), and compute $\nabla T-(\nabla T\cdot \vec n)\,\vec n$.
I didn't quite understand the bit about the orthogonal projection; why does that have the smallest angle with $\nabla T$? And wouldn't the orthogonal projection be normal to the plane (as opposed to the projection which would lie in the plane)? – luolimao Nov 5 '13 at 5:56
Oops, I thought you meant the orthogonal projection relative to the plane, not $\hat n$. – luolimao Nov 5 '13 at 5:58