[Math] Find the partial derivative of a sphere with equation $x^2+y^2+z^2=4$

calculusderivativesmultivariable-calculuspartial derivative

We have a sphere with the following equation:

$x^2+y^2+z^2=4$

We seek to find the partial derivative, with respect to $x$, of this equation. We think of this equation as a function of three variables

$f(x,y,z)=4$

From this equation, we can conclude the following:

$\frac{df}{dx}=0$

Using the chain rule, we have:

$0=f_x\frac{dx}{dx}+f_y\frac{dy}{dx}+f_z\frac{dz}{dx}$

$0=(2x)(1)+(2y)(0)+(2z)\frac{dz}{dx}$

Since we are treating $y$ as a constant, from the equation above, we can solve the very last variable.

$0=2x+(2z)\frac{dz}{dx}$

$-\frac{2x}{2z}=\frac{dz}{dx}$

I am quite confused regarding the treatment of $z$ and $y$. I've always assumed that when seeking a partial derivative with respect to a certain variable, we treat the other variables as constants. Can it be said that as in the example above, we were treating $z$ as a constant all along? If yes, should $\frac{dz}{dx}$ evaluate to $0$?

Best Answer

The way I understand it is you have the equation $$ x^2+y^2+z^2=4 $$ which is equivalent to $$ f(x,y)=z=\pm \sqrt{4-x^2-y^2}, $$ therefore $$ \frac{\partial{f}}{\partial{x}}=\pm \frac{x}{\sqrt{4-x^2-y^2}} $$ Perhaps more context on where this question comes from could help clarify things.