Taking partial derivatives of implicit equation with chain rule. I have the following equations:
$x(s,u)=c_1+c_2y+c_3z^2$
$y(s)=c_4s^2$
$z(u,x)=c_5u^2e^x$
I'm trying to take the partial derivatives $\frac{\delta x}{\delta s}$ and $\frac{\delta x}{\delta u}$.
I know that
$\frac{\delta x}{\delta s}=\frac{\delta x}{\delta y}\frac{\delta y}{\delta s}$ and
$\frac{\delta x}{\delta u}=\frac{\delta x}{\delta z}\frac{\delta z}{\delta u}$
I have found
$\frac{\delta x}{\delta y}=c_2$
$\frac{\delta y}{\delta s}=2c_4s$ and
$\frac{\delta x}{\delta y}=2c_3z$
but am struggling to find $\frac{\delta z}{\delta u}$. I feel I need to use the chain rule in some way because $x$ is a function of $s$.
Can someone point me in the correct direction here by suggesting a path forward or demonstrating my errors in thinking along the way and how to correct them?
 A: You were correct in thinking that the chain rule would be used here! The best path forward from this point would be to take  $\frac{\delta}{\delta u}$ of both $x(u,s)$ and $z(u,s)$. From there, use implicit differentiation and solve for $\frac{\delta z}{\delta u}$ as a system of equations.
Some notes:

*

*The main issue I see is that $x(u,s)$ and $z(u,s)$ are defined in terms of each other, creating a feedback loop that could be a struggle to compute and keep tame during computer simulations. This is also what I assume you ran into in your calculations.

*You could solve for both of these explicitly in terms of $u$ and $s$ although the solution would use the Lambert W function, the inverse function to $f(x)=xe^x$.

*By solving for $x(u,s)$, I found that $x$ does not have a real value when $-2c_3c_5^2u^4e^{2(c_1+c_2y)}<-\frac{1}{e}$, and therefore neither does $z$ have a real value given that condition.

Given the two functions, you can substitute $x(u,s)$ into $z(u,s)$ to get that $$z=c_5u^2e^{c_1+c_2y+c_3z^2}$$$$z=c_5u^2e^{c_1+c_2y}e^{c_3z^2}$$
Dividing both sides by $e^{c_3z^2}$ results in $$ze^{-c_3z^2}=c_5u^2e^{c_1+c_2y}$$
Square both sides and multiply by $-2c_3$ on both sides to get
$$z^2e^{-2c_3z^2}=c_5^2u^4e^{2(c_1+c_2y)}$$$$-2c_3z^2e^{-2c_3z^2}=-2c_3c_5^2u^4e^{2(c_1+c_2y)}$$
Remembering $W(ue^u)=u$, we let $u=-2c_3z^2$ to get $$-2c_3z^2=W(-2c_3c_5^2u^4e^{2(c_1+c_2y)})$$
Now that the hard part is over, we can solve for $z$ explicitly in terms of $u$ and $s$, but we also need to use hindsight to determine which root to take - the positive or negative. Given the range of $e^x$ and $u^2$, we can conclude that the sign of $z$ is entirely dependent on $c_5$. Using this knowledge, we can finally write down: $$z(u,s)=\operatorname{sign}(c_5)\sqrt{\frac{-W(-2c_3c_5^2u^4e^{2(c_1+c_2y)})}{2c_3}}$$
We can then substitute $z$ into $x$, leaving us with $$x(u,s)=c_1+c_2y-\frac{W(-2c_3c_5^2u^4e^{2(c_1+c_2y)})}{2}$$ Now we have both $x$ and $z$ split from each other! If you wanted to find $\frac{\delta x}{\delta u}$ or $\frac{\delta z}{\delta u}$, you could now do it without implicit differentiation.
