Solution (source code)

= Solution

Apply the <multivariable chain rule> to an arbitrary differentiable scalar <function> of $x,y,z$. With the subscripts indicating the coordinates held fixed, the first operator is
$$
\boxed{(\partial_W)_{\theta,\phi}
=\tan\theta\cos\phi\,(\partial_x)_{y,z}
+\tan\theta\sin\phi\,(\partial_y)_{x,z}
+(\partial_z)_{x,y}.}
$$
Holding $W,\phi$ fixed when differentiating with respect to $\theta$ gives
$$
\boxed{(\partial_\theta)_{W,\phi}
=W\sec^2\theta\cos\phi\,(\partial_x)_{y,z}
+W\sec^2\theta\sin\phi\,(\partial_y)_{x,z}.}
$$
Finally, holding $W,\theta$ fixed gives
$$
\boxed{(\partial_\phi)_{W,\theta}
=-W\tan\theta\sin\phi\,(\partial_x)_{y,z}
+W\tan\theta\cos\phi\,(\partial_y)_{x,z}.}
$$
For example, the coefficient of $\partial_x$ in $\partial_\theta$ is precisely $(\partial x/\partial\theta)_{W,\phi}$; all coefficients follow by differentiating the given coordinate <functions>.