I'm struggling to derive equation 8 from the paper by Acemoglu and Restrepo (AEA Papers and Proceedings, 2018).
Consider an economy where aggregate output is produced in perfect competition according to the following technology: \begin{equation} Y = \left( \int_{N-1}^{N} y(i)^{\frac{\sigma -1}{\sigma}} \, di \right)^{\frac{\sigma }{\sigma -1}} \end{equation} where $y(i)$ denotes a certain type of task.
Suppose that tasks $i \in [N-1, I]$ are produced with capital only, and tasks $i \in (I, N]$ are produced with labor. Thus, \begin{equation} y(i) = \eta(i) k(i) \quad\text{with } i \in [N-1, I] \end{equation} and \begin{equation} y(i) = \gamma(i) l(i) \quad\text{with } i \in (I, N] \end{equation}
Can you show me how to get the following derivative? \begin{equation} \frac{d\,\ln Y}{dI} = \frac{1}{1 - \sigma} \left[ \left( \frac{W}{\gamma(I)} \right)^{1-\sigma} - \left( \frac{R}{\eta(I)} \right)^{1-\sigma} \right] \end{equation}
Here's my attempt, and I hope you can point out any mistakes I made.
First, $\frac{\partial y(i)}{\partial k(i)}= R$, for $i \in [N-1, I]$. Aggregating, $\int_{N-1}^{I} \eta(i)\,di = R$, and $\int_{N-1}^{I} k(i)\,di = K$. Similarly, $\int_{I}^{N} \gamma(i)\,di = W$, and $\int_{I}^{N} l(i)\,di = L$.
Then, \begin{equation} \frac{d \ln Y}{d I} = \frac{d Y}{d I} \frac{1}{Y} \end{equation}
I set $Z(I)= \left( \int_{N-1}^{I} \eta(i)^{\sigma-1} \, di \right)^{\frac{1}{\sigma}} K^{\frac{\sigma-1}{\sigma}} + \left( \int_{I}^{N} \gamma(i)^{\sigma-1} \, di \right)^{\frac{1}{\sigma}} L^{\frac{\sigma-1}{\sigma}}$.
Thus, \begin{equation} Y = Z(I)^{\frac{\sigma}{\sigma-1}} \end{equation}
\begin{equation} \frac{d Y}{d I} = \frac{\sigma}{\sigma -1} Z(I)^{\frac{1}{\sigma -1}} \frac{d Z}{d I} \end{equation}
\begin{equation} \frac{d Z}{d I} = \frac{1}{\sigma } \left( \int_{N-1}^{I} \eta(i)^{\sigma-1} \, di \right)^{\frac{1- \sigma}{\sigma}} \eta(I)^{\sigma -1} K^{\frac{\sigma-1}{\sigma}} - \frac{1}{\sigma} \left( \int_{I}^{N} \gamma(i)^{\sigma-1} \, di \right)^{\frac{1 - \sigma}{\sigma}} \gamma(I)^{\sigma -1} L^{\frac{\sigma-1}{\sigma}} \end{equation}
I want to exploit the FOCs that give me the input factor prices, but it seems not feasible since (for instance) $\int_{N-1}^{I} \eta(i)^{\sigma -1} di \ne R^{\sigma-1}$.
Any suggestions?