I have to do the partial derivative of a compound function $Z$ with respect to $X$ and then with respect to $Y$.
I have that $X$ is my independent variable, then $Y$ depends on $X$, and $Z$ depends both on $X$ and $Y$. The problem is this, usually we have compound functions going from $X$ to $Y$ to $Z$. In this case is different because $Z$ depends both on $X$ and $Y$. Can I use normal chain rule for this partial derivative ? The second question is, how can I calculate it with respect to $Y$, knowing that $Z$ depends both on $X$ and $Y$? As you can see, we drive with respect to variables that are not independent from each other.
Excuse me for my bad layout but I can't use latex. Thanks
I think what you're saying is your situation is $z = z(x,y) = z(x,y(x))$. In this case, you can still use the chain rule, but it's a bit more complicated. You have essentially a function of one variable, but it doesn't look it. What I like to do is change the variable names to avoid confusion, call them say, $s,t$ and write $z = z(s,t)$. Then take the $x$ derivative:
$$\frac{dz}{dx} = \frac{\partial z}{\partial s}\frac{ds}{dx}+\frac{\partial z}{\partial t}\frac{dt}{dx}$$
This is true for any function $z(s,t)$ where $s,t$ are both functions of the single variable $x$. So now you can formally compute what $\frac{\partial z}{\partial s}$ is using whatever your formula is, and then substitute $s = x, t = y(x)$ in, and you'll obtain:
$$\frac{dz}{dx} = \frac{\partial z}{\partial x}+\frac{\partial z}{\partial y}\frac{dy}{dx}$$
which is the derivative you want.
This also reveals what's going on for the $y$ derivative. You just want the formal derivative $\frac{\partial z}{\partial t}$. All of this is covered by pretty much any book on multivariable calculus.