What is the gradient of $f (x, (y^2+z^2)^{1/2})$? Consider a $c \in \mathbb R$ and a function $f: U \subset \mathbb R^2\rightarrow \mathbb R $ with $ \nabla f (p) \neq 0, \forall p \in  f^{-1}(c)$, where $U$ is contained in the upper half plane y > 0.
Now define $g: U \times \mathbb R \rightarrow \mathbb R$ by $g(x, y, z) = f (x, (y^2+z^2)^{1/2})$. Then it is to be shown that $\nabla g(q) \neq 0, \forall q \in g^{-1}(c)$.
But I am not able to figure out how to write $\nabla f$ in way that would help me solve the problem.
 A: If memory serves,  and that's a big if, the gradient is defined as $\nabla f(x,y)=(f_x,f_y)$.
Here we get $\nabla g=\nabla (f\circ h)$, where $h(x,y,z)=(x,(y^2+z^2)^{1/2})$.  So $h:\Bbb R^3\to\Bbb R^2$.
Now before I try to remember the chain rule in this context, do you remember it?
We should get that $\rm dh $ is a $2×3$ matrix of partials.  Each column a gradient of coordinate functions. If that isn't confusing enough,  let's try.
I get $\begin{pmatrix}1\quad\quad 0\quad \quad 0\\0\frac y{\sqrt{y^2+z^2}} \frac z{\sqrt{y^2+z^2}}\end{pmatrix}$.
Now, when you dot this with $\nabla f$ you get $(f_x,\frac{f_yy}{\sqrt{y^2+z^2}},\frac{f_yz}{\sqrt{y^2+z^2}})$.
Now we need to reason why this $3$-tuple is nonzero.
Well, one of $f_x,f_y$ is nonzero. Now, if it's $f_x$ we're done.   And since $y>0$, we are also done if it's $f_y$.
A: I assume that what you want is to find $\nabla g$. In order to do so, we have to apply the chain rule. First of all, notice that the function $g$ can be interpreted as the composition of $f: U \subset \mathbb{R}^2\to\mathbb{R}$ and $h: \mathbb{R}^3\to\mathbb{R}^2$, where $h(x,y,z) = (x, (y^2+z^2)^\frac{1}{2})$. The composition is well defined and $g = f \:\circ h $.
Then the partial derivatives of $g$ are:

*

*$\frac{\partial g}{\partial x}(x,y,z) = f^{(1,0)}(x, (y^2+z^2)^\frac{1}{2})$


*$\frac{\partial g}{\partial y}(x,y,z) = \frac{y}{(y^2+z^2)^\frac{1}{2}}f^{(0,1)}(x, (y^2+z^2)^\frac{1}{2})$


*$\frac{\partial g}{\partial z}(x,y,z) = \frac{z}{(y^2+z^2)^\frac{1}{2}}f^{(0,1)}(x, (y^2+z^2)^\frac{1}{2})$
The easiest way to compute the partial derivatives using the chain rule is, for me at least, using Jacobian matrices. More in particular:
$$
J_f(x,y) = \begin{bmatrix}
f^{(1,0)} & f^{(0,1)}  
\end{bmatrix}
$$
$$
J_h(x,y,z)= \begin{bmatrix}
1 & 0 & 0\\
0 & \frac{y}{(y^2+z^2)^\frac{1}{2}} & \frac{z}{(y^2+z^2)^\frac{1}{2}}
\end{bmatrix}
$$
The chain rule tell us that $J_g(x,y,z) = J_f(h(x,y,z))J_h(x,y,z)$. Therefore:
$$
J_g(x,y,z) = \begin{bmatrix}
f^{(1,0)}(x, (y^2+z^2)^\frac{1}{2}) & \frac{y}{(y^2+z^2)^\frac{1}{2}}f^{(0,1)}(x, (y^2+z^2)^\frac{1}{2}) & \frac{z}{(y^2+z^2)^\frac{1}{2}}f^{(0,1)}(x, (y^2+z^2)^\frac{1}{2})
\end{bmatrix}
$$
Therefore its gradient is:
$$\nabla g (x,y,z) = (f^{(1,0)}(x, (y^2+z^2)^\frac{1}{2}), \frac{y}{(y^2+z^2)^\frac{1}{2}}f^{(0,1)}(x, (y^2+z^2)^\frac{1}{2}), \frac{z}{(y^2+z^2)^\frac{1}{2}}f^{(0,1)}(x, (y^2+z^2)^\frac{1}{2}))$$
