<s>[INST] Finding a partial derivative with two independent variables and two dependent variables The following problem is from the 7th edition of the book "Calculus and Analytic Geometry" by Thomas and  Finney. It is problem 5b in section 16.5. Below is my attempt to solve it. However, I am getting a different answer than the book. Where did I go wrong?
Problem:
Find 
$$ \left( \frac{\partial w}{\partial y} \right)_z $$
at the point $(w, x, y, z) = (4, 2, 1, -1)$ if
$$ w= x^2y^2 + yz - z^3 $$
and
$$ x^2 + y^2 + z^2 = 6 .$$
Answer:
The first step in the process is to eliminate the variable $x$ from the first equation.
\begin{align*}
x^2 &= 6 - y^2 - z^2 \\
w &= x^2y^2 + yz - z^3 \\
w &= (6 - y^2 - z^2 )y^2 + yz - z^3 \\
\left( \frac{\partial w}{\partial y} \right)_z &= (6 - y^2 - z^2)(2y) + y^2(-2y) + z \\
\left( \frac{\partial w}{\partial y} \right)_z &= (6 - y^2 - z^2)(2y) - 3y^3 + z \\
\left( \frac{\partial w}{\partial y} \right)_z ( 4, 2, 1, -1 ) &= ( 6 - 1^1 - 1^2)(2(1)) - 3(1^3) - 1 \\
\left( \frac{\partial w}{\partial y} \right)_z ( 4, 2, 1, -1 ) &= ( 4)(2) - 3 - 1 \\
\left( \frac{\partial w}{\partial y} \right)_z ( 4, 2, 1, -1 ) &= 4 \\
\end{align*}
However, the book's answer is $5$.
 [/INST] Notice that
$$
y^2(-2y)=-2y^3\neq 3y^3.
$$
I think that's where your mistake is.
Indeed, if you consider this, you get
$$
\left(\frac{\partial w}{\partial z}  \right)(4,2,1,-1)=(6-1^2-1^2)(2(1))-2(1^3)-1=5,
$$
which the answer in the book.
</s>