How do I find the relative extrema of a function in spherical coordinates? I want to find the relative extrema for the following function.
$f(\theta,\phi)=AR\cos\theta\sin\phi + BR\sin\theta\sin\phi + CR\cos\phi $
$A,B,C,R$ are constants
In a function $g(x,y)$ using cartesian coordinates, you can find critical points by setting the gradient equal to zero and solving for $x$ and $y$. Component wise, it would be solving the partial derivatives $g_x=0$ and $g_y=0$.
What happens with spherical coordinates? Can I do the same thing component wise ($f_\theta=0$ and $f_\phi=0$)? There's a specific form of the gradient in spherical coordinates so I'm not sure if I need to do something differently.
 A: As you said in the preamble, $f(\theta,\phi)$ is just a (periodic) function of two variables. It comes from the parametrization of a sphere, but this knowledge is just ours. So we find the stationary points of $f(\theta,\phi)$ as if we were looking for the stationary points of a smooth function $g(x,y)$. If
$$f(\theta,\phi) = A\cos\theta\sin\phi + B\sin\theta\sin\phi + C\cos\phi,$$
then:
$$\nabla f = (-A\sin\theta\sin\phi+B\cos\theta\sin\phi,A\cos\theta\cos\phi+B\sin\theta\cos\phi-C\sin\phi)$$
and the first component of the gradient vanishes if $\sin\phi=0$ or if $\tan\theta=\frac{B}{A}$. By imposing that the second component vanishes too, we can find the stationary points. Notice that, due to symmetry, it is way easier to find the stationary points by regarding our problem as a constrained optimization problem:
$$\min_{(x,y,z)\in S^2} Ax+By+Cz,\qquad \max_{(x,y,z)\in S^2} Ax+By+Cz$$
Lagrange multipliers (or the Cauchy Schwarz inequality) give that stationary points occur when $(x,y,z)=\lambda(A,B,C)$, and since $x^2+y^2+z^2=1$ we must have $\lambda=\frac{1}{\sqrt{A^2+B^2+C^2}}$, so:
$$\min = -\sqrt{A^2+B^2+C^2},\qquad \max=\sqrt{A^2+B^2+C^2}.$$
