# Complicated partial derivative

#### RobP

##### New member
I have the following function:

$$\displaystyle y_{it} = ln \left(a_{1}+ \sum_{j=2}^{J}\frac{a_{j}}{e^{q_{ji}+b_{jit}}}\right)+\frac{1}{r}\sum_{j=2}^{J}a_{j}q_{ji}-ln\left(a_{1}+\sum_{j=2}^{J}(a_{j}e^{-b_{jit}})\right)$$

where $$e$$ above is the natural exponent. Furthermore, $$q_{ji}$$ is a composite function, i.e., $$q_{ji}(z_{it})$$. I want to calculate the partial derivative of $$y_{it}$$ with respect to $$z_{it}$$, i.e.,

$$\displaystyle \frac{\partial y_{it}}{\partial z_{it}} = ?$$

I need the expression as an input to a larger problem that I am working on. Any help is highly appreciated.

ps. You can indicate the derivative of $$z_{it}$$ as $$z^{\prime}_{it}$$ in the solution since I do not provide the expression for $$z_{it}$$.

Last edited:

#### RobP

##### New member
I think I figured this out. It is evident that $$y_{it}= f(q_{2i}, q_{3i}, \cdots, q_{Ji})$$ and $$q_{2i}= q_{2i}(z_{it})$$, $$q_{3i}= q_{3i}(z_{it})$$, $$\cdots$$, $$q_{Ji}= q_{Ji}(z_{it})$$. Applying the chain rule, we have

$$\displaystyle \frac{dy_{it}}{dz_{it}}=\frac{\partial y_{it}}{\partial q_{2i}}\cdot\frac{dq_{2i}}{dz_{it}}+ \frac{\partial y_{it}}{\partial q_{3i}}\cdot\frac{dq_{3i}}{dz_{it}}+\cdots + \frac{\partial y_{it}}{\partial q_{Ji}}\cdot\frac{dq_{Ji}}{dz_{it}}.$$

Computing the above is not difficult.