# Thread: Trying to find derivatives for a certain situation

1. ## Trying to find derivatives for a certain situation

I wonder if someone could help here. I have the following situation:

I have the equation:
g(z) = z - f(z,p,q) = 0

also z is a function of p and q

I have already solved this for fixed p and q using Newton-Raphson and hence I have already calculated partial df/dz

Now I need to calculate partial derivatives dz/dp and dz/dq.

I can't work out how to do this.

2. ## Re: Trying to find derivatives for a certain situation

Actually I think I have it. For partial derivative dz/dp when q is constant:

dz/dp = -d/dp ( z - f(z,p,q) ) / d/dz ( z - f(z,p,q) ) (d operators are partial)

so I just need to calculate df/dp at constant z,q in my N-R iteration (and df/dq at constant z,p)

I think.

3. ## Re: Trying to find derivatives for a certain situation

If z= f(z, p, q) and p and q are also functions of z then, by the chain rule, $\frac{\partial z}{\partial p}= \frac{\partial f}{\partial z}\frac{\partial z}{\partial p}+ \frac{\partial f}{\partial p}$ so that $\frac{\partial z}{\partial p}- \frac{\partial f}{\partial z}\frac{\partial z}{\partial u}= \frac{\partial z}{\partial p}\left(1- \frac{\partial f}{\partial z}\right)= \frac{\partial f}{\partial p}$ and $\frac{\partial z}{\partial p}= \frac{\frac{\partial f}{\partial p}}{1- \frac{\partial f}{\partial z}}$.

Similarly for $\frac{\partial z}{\partial q}$.

4. ## Re: Trying to find derivatives for a certain situation

Thanks HallsofIvy

One correction to your comment: p and q are not functions of z. rather the reverse: z is a function of p and q.

p and q are independent variables