<p>In generic notation, we examine</p>

<p><span class="math-container">$$\frac {d}{df} \left(\frac {f(x)}{\int_0^1 f(x) dx}\right)$$</span> </p>

<p>Note that we take the derivative with respect to <span class="math-container">$f$</span> not with respect to <span class="math-container">$x$</span>. Applying the standard rules we have</p>

<p><span class="math-container">$$\frac {d}{df} \left(\frac {f(x)}{\int_0^1 f(x) dx}\right) = \frac{\int_0^1 f(x) dx-f\cdot \left[\frac{d}{df}\int_0^1 f(x) dx\right]}{\left(\int_0^1 f(x) dx\right)^2}$$</span></p>

<p>But</p>

<p><span class="math-container">$$ \frac{d}{df}\int_0^1 f(x) dx = 0$$</span></p>

<p>because this definite integral, having specific values as integration limits, is a number, a constant, not a function. So we end up with </p>

<p><span class="math-container">$$\frac {d}{df} \left(\frac {f(x)}{\int_0^1 f(x) dx}\right) = \frac {1}{\int_0^1 f(x) dx}$$</span></p>

<p>that validates the obtained f.o.c.   </p>

<p>Leibniz rule for differentiating under the integral sign does not enter the picture here.</p>

CC BY-SA 4.0
2019-01-21T21:48:50.010Z
Thanks for the reply. I understand that since the integrand ends at dj I am not differentiating through that integral. I should have been more specific. It is the $\frac{L_{k,t}}{\int^1_0 L_{k,t}}$ that seems to be giving me issues. To me, differentiating this w.r.t. $L_{k,t}$ should yield $\frac{\int^1_0 L_{k,t} - L_{k,t}}{(\int^1_0 L_{k,t})^2}$. Is this incorrect?
justmacro1
CC BY-SA 4.0
2019-01-22T21:22:43.457Z
Much appreciated. I see my error now. Thanks!
justmacro1
CC BY-SA 4.0
2019-01-20T20:44:30.007Z
2019-01-21T23:10:18.900Z
2019-01-21T23:10:18.900Z
Alecos Papadopoulos
<p>Working through the math which gives the following profit function for a bank but I can't seem to solve this first order condition. The profit function is defined as follows,</p>

<p><span class="math-container">\begin{equation}
\pi_t = p_{k,t-1} R^L_{k,t-1} L_{k,t-1} + (1-p_{k,t-1}) \frac{L_{k,t-1}}{\int_0^1 L_{k,t-1}dk} \tau \theta_{t-1} a_{t-1} - R^D_{t-1} L_{k,t-1} + \mu_t^B \bigg( \int_0^1 \bigg[\bigg(\frac{R_t^L + \eta \frac{1}{\theta_t}}{R^L_{k,t}+ \eta \frac{1}{\theta_{k,t}}} \bigg)^{\epsilon} x_t + \gamma^L s_{k,t-1} \bigg] dj - L_{k,t} \bigg) 
\end{equation}</span></p>

<p>and the FOC they get for <span class="math-container">$L_{k,t}$</span>,</p>

<p><span class="math-container">\begin{equation}
\partial L_{k,t}: p_{k,t} R^L_{k,t} + (1-p_{k,t}) \frac{\tau \theta_t a_t}{\int_0^1 L_{k,t} dk} - R^D_t - \mu_B =0
\end{equation}</span></p>

<p>I can't seem to make sense of this differentiation of the integral. I have been looking at Leibniz integral rule all day. My understanding was that the following holds when the bounds of the integral are constants,</p>

<p><span class="math-container">\begin{equation}
\frac{\partial}{\partial x} \bigg( \int_0^1 f(x) dx \bigg) = \frac{\partial}{\partial x} f(x) dx \Big|_0^1
\end{equation}</span></p>

<p>Using this rule I can't get what the result showen is. Am I incorrect or is this example incorrect?</p>

<p>Much appreciated.</p>

<macroeconomics><banking>
Differentiating through this integral in banking loans?
justmacro1
# Differentiating through this integral in banking loans?

(Asked by: username_0 on 2019-01-17)

Working through the math which gives the following profit function for a bank but I can't seem to solve this first order condition. The profit function is defined as follows,

\begin{equation}
\pi\_t = p\_{k,t-1} R^L\_{k,t-1} L\_{k,t-1} + (1-p\_{k,t-1}) \frac{L\_{k,t-1}}{\int\_0^1 L\_{k,t-1}dk} \tau \theta\_{t-1} a\_{t-1} - R^D\_{t-1} L\_{k,t-1} + \mu\_t^B \bigg( \int\_0^1 \bigg[\bigg(\frac{R\_t^L + \eta \frac{1}{\theta\_t}}{R^L\_{k,t}+ \eta \frac{1}{\theta\_{k,t}}} \bigg)^{\epsilon} x\_t + \gamma^L s\_{k,t-1} \bigg] dj - L\_{k,t} \bigg)
\end{equation}

and the FOC they get for $L\_{k,t}$,

\begin{equation}
\partial L\_{k,t}: p\_{k,t} R^L\_{k,t} + (1-p\_{k,t}) \frac{\tau \theta\_t a\_t}{\int\_0^1 L\_{k,t} dk} - R^D\_t - \mu\_B =0
\end{equation}

I can't seem to make sense of this differentiation of the integral. I have been looking at Leibniz integral rule all day. My understanding was that the following holds when the bounds of the integral are constants,

\begin{equation}
\frac{\partial}{\partial x} \bigg( \int\_0^1 f(x) dx \bigg) = \frac{\partial}{\partial x} f(x) dx \Big|\_0^1
\end{equation}

Using this rule I can't get what the result showen is. Am I incorrect or is this example incorrect?

Much appreciated.

**Tags:** macroeconomics, banking


---

## 1 answers

### Answer by username_1 on 2019-01-20. Score: 2 | Accepted answer

In generic notation, we examine

$$\frac {d}{df} \left(\frac {f(x)}{\int\_0^1 f(x) dx}\right)$$

Note that we take the derivative with respect to $f$ not with respect to $x$. Applying the standard rules we have

$$\frac {d}{df} \left(\frac {f(x)}{\int\_0^1 f(x) dx}\right) = \frac{\int\_0^1 f(x) dx-f\cdot \left[\frac{d}{df}\int\_0^1 f(x) dx\right]}{\left(\int\_0^1 f(x) dx\right)^2}$$

But

$$ \frac{d}{df}\int\_0^1 f(x) dx = 0$$

because this definite integral, having specific values as integration limits, is a number, a constant, not a function. So we end up with

$$\frac {d}{df} \left(\frac {f(x)}{\int\_0^1 f(x) dx}\right) = \frac {1}{\int\_0^1 f(x) dx}$$

that validates the obtained f.o.c.

Leibniz rule for differentiating under the integral sign does not enter the picture here.

> **Comments:**
> **username_0**: Thanks for the reply. I understand that since the integrand ends at dj I am not differentiating through that integral. I should have been more specific. It is the $\frac{L_{k,t}}{\int^1_0 L_{k,t}}$ that seems to be giving me issues. To me, differentiating this w.r.t. $L_{k,t}$ should yield $\frac{\int^1_0 L_{k,t} - L_{k,t}}{(\int^1_0 L_{k,t})^2}$. Is this incorrect?  
> **username_0**: Much appreciated. I see my error now. Thanks!  

---

