I'm trying to solve my textbook problem. But, I'm confused this. The problem is :
Consider 3-dim cube defined by the constraints $-1$ $\leqslant x,y,z $ $\leqslant$ 1.
Now, list the faces and their dimensions, then, For each face, determine the conditions on $a$, $b$, and $c$ so that $f(x, y, z) = ax + by + cz$ has its maximum on that face.
I got $27$ faces, namely, $8$ vertices ($0$-dim), $12$ edges(1-dim), $6$ faces($2$-dim), and cube itself ($3$-dim). But, I don't know how to solve the second part.
Any ideas or explanations would be helpful to me.
Put $[{-1},1]^3=:C$, and assume $\nabla f=(a,b,c)\ne{\bf 0}$. The level sets $P_t:=f^{-1}(t)$ of $f$ are then planes orthogonal to $\nabla f$ that foliate all of ${\mathbb R}^3$. One has $$\mu:=\max\bigl\{f({\bf x})\,\bigm|\,{\bf x}\in C\bigr\}=\max\{ t\,|\, P_t\cap C\ne\emptyset\}\ .$$ It helps to visualize a plane $P_t$ starting at a very large $t_0$ and moving in direction $-\nabla f$ until it hits $C$ for the first time.
If $abc\ne0$ then $P_\mu$ hits $C$ at the vertex ${\bf v}=\bigl({\rm sgn}(a),{\rm sgn}(a),{\rm sgn}(a)\bigr)$. It follows that $\mu=|a|+|b|+|c|$. Of course this vertex belongs to three edges and three facets, so that you could say that $f$ takes its maximum on any of these as well.
If $a=0$ then $\nabla f$ is orthogonal to the edges parallel to the $x$-axis, and $f$ is constant along these edges. $P_\mu$ will hit $C$ along the edge $E$ through the point $\bigl(0,{\rm sgn}(b),{\rm sgn}(c)\bigr)$, and one has $\mu=|b|+|c|$. Again $f$ takes its maximum on all faces incident with $E$.
If $a=b=0$ then $\nabla f$ is orthogonal to the two faces $z=\pm1$ of the cube, and $f$ is constant on these facets. $P_\mu$ will have the facet $z={\rm sgn}(c)$ in common with $C$, and $\mu=|c|$.
The above should enable you to put your own answer into the desired format.