<p>The <strong>Leibnitz rule</strong> for differentiation of an integral is a consequence of the <em><strong>fundamental theorem of integral calculus.</strong></em></p>
<p>A so-called <em>integral function</em> is defined as</p>
<p><span class="math-container">$$F(x) = \int_a^x f(t)dt\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(1)$$</span></p>
<p>where <span class="math-container">$f(t): (a,b) \subseteq\mathbb{R} \rightarrow \mathbb{R}$</span>, under appropriate assumptions on <span class="math-container">$f$</span>.<span class="math-container">$^1$</span></p>
<p>The <strong>fundamental theorem of integral calculus</strong> states that, under the assumption above considered:</p>
<p><span class="math-container">$$F'(x) = f(x),\;\;\;\; \forall x \in (a,b)\;\;\;\;\;\;\;\; (2)$$</span>.</p>
<p>In particular, the fundamental theorem of integral calculus together with the <em>chain rule</em> for differentiation of <em>composite functions</em> gives us the formula <strong>if the extremes of integration are function of <span class="math-container">$x$</span> and <span class="math-container">$f(x,y)$</span> is a function of two variables</strong> that can be integrated with respect to <span class="math-container">$t$</span> and differentiated with respect to <span class="math-container">$x$</span>:</p>
<p><span class="math-container">$$F'(x) = \int_{a(x)}^{b(x)} f_x (x,t) dt+ f(x,b(x)) b'(x) - f(x,a(x)) a’(x) \;\;\;\;(3) $$</span></p>
<p>This last formula is the <strong>Leibnitz Rule</strong><span class="math-container">$^2$</span>.</p>
<p>If <span class="math-container">$a(x) =a$</span> is a constant and <span class="math-container">$b(x)= x$</span> the rule simplifies as:</p>
<p><span class="math-container">$$F'(x)= f(x,x) + \int_{a}^{x} f_x (x,t) dt \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (4)$$</span></p>
<p><span class="math-container">$$\;\;\;\;$$</span></p>
<p>In the case, as in the formula in Barro &amp; Sala i Martin of the question, <strong>an extreme of integration (or both) is not finite</strong> (it is <span class="math-container">$\pm \infty$</span>), we have an <em>improper integral</em>, in particular an integral on an infinite interval. An improper integral of this kind is, by definition, the limit for <span class="math-container">$x \rightarrow \pm \infty$</span> (the integration extreme as in <span class="math-container">$(4)$</span>) of the same integral with a finite extreme, so that we can proceed as usual calculating the integral with a finite extreme and then taking the limit.<span class="math-container">$^3$</span></p>
<p>This is a general, indicative, framework.</p>
<p><span class="math-container">$$***$$</span></p>
<p>Now, let's <strong>come back to the formula by Barro &amp; Sala i Martin.</strong>
We will use the Leibnitz Rule in the form of formula (4) above. <strong>I re-write (4), for the sake of clarity, conforming the notations</strong> to the formulas of Barro &amp; Sala i Martin, that is using the same variables as in the question:</p>
<p><span class="math-container">$$F'(t)= f(t,t) + \int_{a}^{t} f_t (t,s) ds \;\;\;\;\;\;
\;\;\;\;\; (4\;bis)$$</span></p>
<p><strong>I re-write also the problem</strong> in the question:</p>
<p><span class="math-container">$$V(t)=\int\limits_t^\infty \pi e^{-\bar{r}(t,s)(s-t)} ds\;\;\;\;\;\;\;\;\;\;\;\;\;\;(5) $$</span></p>
<p>where
<span class="math-container">$$ \   \bar{r}(t,s)=\frac{1}{s-t}\int\limits_t^sr(\omega)d\omega.\;\;\;\;\;\;\;\;\;\;\;\;(6)$$</span></p>
<p>We should get</p>
<p><span class="math-container">$$r(t)=\frac{\pi}{V(t)}+\frac{\dot{V}(t)}{V(t)}. \;\;\;\;\;\; (7)$$</span></p>
<p><span class="math-container">$$\;$$</span></p>
<p>A step by step <strong>SOLUTION</strong>:</p>
<p>I re-write <span class="math-container">$(5)$</span> substituting <span class="math-container">$(6)$</span> in it. We get:</p>
<p><span class="math-container">$$V(t)=\int\limits_t^\infty \pi e^{-\int _t^s r(\omega)d \omega} ds\;\;\;\;\;\;\;\;\;\;\;\;\;\;(8)$$</span>
Then I divide by <span class="math-container">$\pi$</span>, I exchange the extremes of integration (so that the integral changes its sign), and take <span class="math-container">$a$</span>, a constant, instead of <span class="math-container">$\infty$</span> as extreme of integration: later, we will take the limit as <span class="math-container">$a \rightarrow \infty$</span> to get the improper integral. We have:</p>
<p><span class="math-container">$$\frac{1}{\pi} V(t)=-\int\limits_a^t  e^{-\int _t^s {r(\omega)} d\omega} ds\;\;\;\;\;\;\;\;\;\;\;\;\;\;(9)$$</span></p>
<p>Now we can apply Leibnitz formula <span class="math-container">$(4 \;bis)$</span>. We get:
<span class="math-container">$$-\frac{1}{\pi}\dot {V(t)}= e^{-\int _t^t {r(\omega)} d\omega} + \int _a^t e^{\int _s^t {r(\omega)} d\omega}  r(t) ds  \;\;\;\;\;\;(10)$$</span></p>
<p>The first term after the equality sign is <span class="math-container">$1$</span> (we have <span class="math-container">$e^0$</span> ). In the integral of the second term we have the derivative with respect to <span class="math-container">$t$</span> of our <span class="math-container">$f(t)=e^{-\int _t^s r(\omega)} d\omega$</span>,  the <span class="math-container">$f_t$</span> of the Leibnitz rule <span class="math-container">$(4 \;bis)$</span> (I explain this derivative separately in a remark at the end of the answer, otherwise the exposition becomes cumbersome).</p>
<p>Now the steps are enough simple (the most difficult thing is not to make a mess with signs).</p>
<p>Re-write <span class="math-container">$(10)$</span> as:</p>
<p><span class="math-container">$$-\frac{1}{\pi}\dot {V(t)}= 1+ r(t)  \int _a^t e^{\int _s^t {r(\omega)} d\omega}  ds  \;\;\;\;\;\;(11)$$</span></p>
<p>We took <span class="math-container">$r(t)$</span> outside the integral sign, as it doesn't depend on the integration variable <span class="math-container">$s$</span>.</p>
<p>Now, multiply both sides by <span class="math-container">$\pi$</span> and exchange the integration variables <span class="math-container">$a$</span> and <span class="math-container">$t$</span>:</p>
<p><span class="math-container">$$-\dot {V(t)}= \pi- r(t)  \int _t^a \pi e^{\int _s^t  {r(\omega)} d\omega}  ds  \;\;\;\;\;\;(12)$$</span></p>
<p>Then, we can take the limit as <span class="math-container">$a \rightarrow \infty$</span> to obtain:</p>
<p><span class="math-container">$$-\dot {V(t)}= \pi- r(t)  \int _t^{\infty} \pi e^{\int _s^  {r(\omega)} d\omega}  ds  \;\;\;\;\;\;(13)$$</span></p>
<p>The integral term in <span class="math-container">$(13)$</span>, according to <span class="math-container">$(5)$</span> and <span class="math-container">$(6)$</span>, is <span class="math-container">$V(t)$</span>. So we can rewrite <span class="math-container">$(13)$</span> as:</p>
<p><span class="math-container">$$-\dot {V(t)}= \pi- r(t) V(t)  \;\;\;\;\;\;(14)$$</span></p>
<p>from which it is easily obtained</p>
<p><span class="math-container">$$r(t)=\frac{\pi}{V(t)}+\frac{\dot{V}(t)}{V(t)} $$</span></p>
<p>that is <span class="math-container">$(7)$</span>.</p>
<p><span class="math-container">$$ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\Box$$</span></p>
<p><span class="math-container">$$\;$$</span></p>
<p><strong>REMARK</strong>. Derivative <span class="math-container">$f_t$</span> of <span class="math-container">$f(t)=e^{-\int _t^s r(\omega)} d\omega$</span>, as it appears in equation <span class="math-container">$(10)$</span>.</p>
<p>We have <span class="math-container">$f_t= e^{\int _s^t {r(\omega)} d\omega}  r(t)$</span> for the chain rule and for the fundamental theorem of calculus <span class="math-container">$(2)$</span>.</p>
<p>Remember <span class="math-container">$\frac{d e ^{g(t)}}{dt} = e ^{g(t)} g'(t)\;\;\;\;\;\;\;\;\;\;\;\;\;\;(15)$</span>.</p>
<p>The derivative with respect to <span class="math-container">$t$</span> of <span class="math-container">$\int _s^t r(\omega) d\omega$</span>, our <span class="math-container">$g(t)$</span>, for the fundamental theorem of calculus <span class="math-container">$(2)$</span>, is <span class="math-container">$r(t)$</span>.</p>
<p>So, according to <span class="math-container">$(15)$</span>, we have:</p>
<p><span class="math-container">$$f_t= e^{\int _s^t {r(\omega)} d\omega}  r(t)$$</span>.</p>
<hr />
<p><span class="math-container">$^1$</span> <sup> <span class="math-container">$f(t)$</span> continuous or discontinuous at a finite or countable numbers of points. More generally and rigorously, a function <span class="math-container">$f$</span> is Riemann-integrable if the set of the points of discontinuity of <span class="math-container">$f$</span> is a <em>set of zero Lebesgue-measure</em>. See for example Royden, <em>Real Analysis</em>. Of course, the derivative (2) will exist only at points where <span class="math-container">$f$</span> is not discontinuous. </sup></p>
<p><span class="math-container">$^2$</span> <sup> This is the formula you find in the Appendix A.5.6 of Barro &amp; Sala i Martin, equation (A.119). </sup></p>
<p><span class="math-container">$^3$</span> <sup> If both extremes of integration are infinite, we must 'crack' the integral in two pieces, take the limits separately, then adding them. </sup></p>
<p><sup> In the case we have an improper integral, we must remember that an improper integral is a limit that extends an integral to an unlimited, infinite, area and this limit doesn’t always exist finite. If the integral exists, finite, we say that the integral <em>converges</em>. Otherwise, the integral <em>diverges</em>, and we cannot apply Leibnitz rule.
So, to apply the Leibnitz formula when we have an infinite extreme of integration, we must be sure that the integral converges, otherwise the derivative of <span class="math-container">$F$</span> doesn’t exist.  For a discussion of this complicated matter, you can see <a href="https://math.stackexchange.com/questions/298458/using-leibniz-integral-rule-on-infinite-region">https://math.stackexchange.com/questions/298458/using-leibniz-integral-rule-on-infinite-region</a>.</sup></p>
<hr />

CC BY-SA 4.0
2023-02-16T17:06:40.020Z
2023-02-18T14:33:49.503Z
2023-02-18T14:33:49.503Z
BakerStreet
<p>I'm studying growth theory from Barro/Sala-i-Martin and I stumbled upon a problem where some more advanced level of calculus is required in chapter 6 (Models with Expanding Variety: p. 294 eq. 6.18).</p>
<p>Let <span class="math-container">$V(t)$</span> be the present value of returns such that
<span class="math-container">$$V(t)=\int\limits_t^\infty \pi e^{-\bar{r}(t,s)(s-t)} ds$$</span>
<span class="math-container">$$where \   \bar{r}(t,s)=\frac{1}{s-t}\int\limits_t^sr(\omega)d\omega$$</span></p>
<p>By Free Market Entry condition: <span class="math-container">$ \ \ V(t)=\eta \ \  \forall t $</span>   and <span class="math-container">$\eta $</span> is a constant.
The authors claim that if we differentiate <span class="math-container">$V(t)=\eta$</span> w.r.t. time we get</p>
<p><span class="math-container">$$r(t)=\frac{\pi}{V(t)}+\frac{\dot{V}(t)}{V(t)}$$</span></p>
<p>In the footnotes it is specified that Leibniz's rule for differentiation of a definite integral must be applied. I tried but I have not been able to solve it.</p>

CC BY-SA 4.0
2023-02-06T09:55:15.457Z
In general, the Leibniz integral rule for differentiation for an integral of the form 

$$V(t)=\int_{f(t)}^{g(t)}\phi(t,s)ds$$

where $-\infty<f(t)$, $g(t)<\infty$ and the integrands are dependent on $t$ is given by the following derivative of this integral

$$\frac{d V(t)}{dt}= \frac{d\left(\int_{f(t)}^{g(t)}\phi(t,s)ds\right) }{dt}=\phi(t,g(t))\cdot\frac{d(g(t))}{dt}-\phi(t,f(t))\cdot\frac{d(f(t))}{dt}$$

The book you refer has a mathematical appendix and refers to the Leibniz integral rule
in "$A.5.6$ Rules of Differentiation of Integrals". Have you tried anything?
Oliver Queen
CC BY-SA 4.0
2023-02-06T13:19:31.733Z
Yes, I tried to use that formula but I am afraid my math skills might not be adequate enough. Furthermore, it is not clear to me how to deal with the infinity bound  $g(t)=\infty$. A step-by-step solution would be greatly appreciated.
Dario
<mathematical-economics><interest-rate><economic-growth><endogenous-growth><model>
How to use Leibniz Rule of integration to find interest rate in Expanding Variety model
Dario
# How to use Leibniz Rule of integration to find interest rate in Expanding Variety model

(Asked by: username_0 on 2023-02-05)

I'm studying growth theory from Barro/Sala-i-Martin and I stumbled upon a problem where some more advanced level of calculus is required in chapter 6 (Models with Expanding Variety: p. 294 eq. 6.18).

Let $V(t)$ be the present value of returns such that
$$V(t)=\int\limits\_t^\infty \pi e^{-\bar{r}(t,s)(s-t)} ds$$
$$where \ \bar{r}(t,s)=\frac{1}{s-t}\int\limits\_t^sr(\omega)d\omega$$

By Free Market Entry condition: $ \ \ V(t)=\eta \ \ \forall t $ and $\eta $ is a constant.
The authors claim that if we differentiate $V(t)=\eta$ w.r.t. time we get

$$r(t)=\frac{\pi}{V(t)}+\frac{\dot{V}(t)}{V(t)}$$

In the footnotes it is specified that Leibniz's rule for differentiation of a definite integral must be applied. I tried but I have not been able to solve it.

**Tags:** mathematical-economics, interest-rate, economic-growth, endogenous-growth, model
> **Comments:**
> **username_1**: In general, the Leibniz integral rule for differentiation for an integral of the form   $$V(t)=\int_{f(t)}^{g(t)}\phi(t,s)ds$$  where $-\infty<f(t)$, $g(t)<\infty$ and the integrands are dependent on $t$ is given by the following derivative of this integral  $$\frac{d V(t)}{dt}= \frac{d\left(\int_{f(t)}^{g(t)}\phi(t,s)ds\right) }{dt}=\phi(t,g(t))\cdot\frac{d(g(t))}{dt}-\phi(t,f(t))\cdot\frac{d(f(t))}{dt}$$  The book you refer has a mathematical appendix and refers to the Leibniz integral rule in "$A.5.6$ Rules of Differentiation of Integrals". Have you tried anything?  
> **username_0**: Yes, I tried to use that formula but I am afraid my math skills might not be adequate enough. Furthermore, it is not clear to me how to deal with the infinity bound  $g(t)=\infty$. A step-by-step solution would be greatly appreciated.  

---

## 1 answers

### Answer by username_2 on 2023-02-16. Score: 7 | Accepted answer

The **Leibnitz rule** for differentiation of an integral is a consequence of the ***fundamental theorem of integral calculus.***

A so-called *integral function* is defined as

$$F(x) = \int\_a^x f(t)dt\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(1)$$

where $f(t): (a,b) \subseteq\mathbb{R} \rightarrow \mathbb{R}$, under appropriate assumptions on $f$.$^1$

The **fundamental theorem of integral calculus** states that, under the assumption above considered:

$$F'(x) = f(x),\;\;\;\; \forall x \in (a,b)\;\;\;\;\;\;\;\; (2)$$.

In particular, the fundamental theorem of integral calculus together with the *chain rule* for differentiation of *composite functions* gives us the formula **if the extremes of integration are function of $x$ and $f(x,y)$ is a function of two variables** that can be integrated with respect to $t$ and differentiated with respect to $x$:

$$F'(x) = \int\_{a(x)}^{b(x)} f\_x (x,t) dt+ f(x,b(x)) b'(x) - f(x,a(x)) a’(x) \;\;\;\;(3) $$

This last formula is the **Leibnitz Rule**$^2$.

If $a(x) =a$ is a constant and $b(x)= x$ the rule simplifies as:

$$F'(x)= f(x,x) + \int\_{a}^{x} f\_x (x,t) dt \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (4)$$

$$\;\;\;\;$$

In the case, as in the formula in Barro & Sala i Martin of the question, **an extreme of integration (or both) is not finite** (it is $\pm \infty$), we have an *improper integral*, in particular an integral on an infinite interval. An improper integral of this kind is, by definition, the limit for $x \rightarrow \pm \infty$ (the integration extreme as in $(4)$) of the same integral with a finite extreme, so that we can proceed as usual calculating the integral with a finite extreme and then taking the limit.$^3$

This is a general, indicative, framework.

$$\*\*\*$$

Now, let's **come back to the formula by Barro & Sala i Martin.**
We will use the Leibnitz Rule in the form of formula (4) above. **I re-write (4), for the sake of clarity, conforming the notations** to the formulas of Barro & Sala i Martin, that is using the same variables as in the question:

$$F'(t)= f(t,t) + \int\_{a}^{t} f\_t (t,s) ds \;\;\;\;\;\;
\;\;\;\;\; (4\;bis)$$

**I re-write also the problem** in the question:

$$V(t)=\int\limits\_t^\infty \pi e^{-\bar{r}(t,s)(s-t)} ds\;\;\;\;\;\;\;\;\;\;\;\;\;\;(5) $$

where
$$ \ \bar{r}(t,s)=\frac{1}{s-t}\int\limits\_t^sr(\omega)d\omega.\;\;\;\;\;\;\;\;\;\;\;\;(6)$$

We should get

$$r(t)=\frac{\pi}{V(t)}+\frac{\dot{V}(t)}{V(t)}. \;\;\;\;\;\; (7)$$

$$\;$$

A step by step **SOLUTION**:

I re-write $(5)$ substituting $(6)$ in it. We get:

$$V(t)=\int\limits\_t^\infty \pi e^{-\int \_t^s r(\omega)d \omega} ds\;\;\;\;\;\;\;\;\;\;\;\;\;\;(8)$$
Then I divide by $\pi$, I exchange the extremes of integration (so that the integral changes its sign), and take $a$, a constant, instead of $\infty$ as extreme of integration: later, we will take the limit as $a \rightarrow \infty$ to get the improper integral. We have:

$$\frac{1}{\pi} V(t)=-\int\limits\_a^t e^{-\int \_t^s {r(\omega)} d\omega} ds\;\;\;\;\;\;\;\;\;\;\;\;\;\;(9)$$

Now we can apply Leibnitz formula $(4 \;bis)$. We get:
$$-\frac{1}{\pi}\dot {V(t)}= e^{-\int \_t^t {r(\omega)} d\omega} + \int \_a^t e^{\int \_s^t {r(\omega)} d\omega} r(t) ds \;\;\;\;\;\;(10)$$

The first term after the equality sign is $1$ (we have $e^0$ ). In the integral of the second term we have the derivative with respect to $t$ of our $f(t)=e^{-\int \_t^s r(\omega)} d\omega$, the $f\_t$ of the Leibnitz rule $(4 \;bis)$ (I explain this derivative separately in a remark at the end of the answer, otherwise the exposition becomes cumbersome).

Now the steps are enough simple (the most difficult thing is not to make a mess with signs).

Re-write $(10)$ as:

$$-\frac{1}{\pi}\dot {V(t)}= 1+ r(t) \int \_a^t e^{\int \_s^t {r(\omega)} d\omega} ds \;\;\;\;\;\;(11)$$

We took $r(t)$ outside the integral sign, as it doesn't depend on the integration variable $s$.

Now, multiply both sides by $\pi$ and exchange the integration variables $a$ and $t$:

$$-\dot {V(t)}= \pi- r(t) \int \_t^a \pi e^{\int \_s^t {r(\omega)} d\omega} ds \;\;\;\;\;\;(12)$$

Then, we can take the limit as $a \rightarrow \infty$ to obtain:

$$-\dot {V(t)}= \pi- r(t) \int \_t^{\infty} \pi e^{\int \_s^ {r(\omega)} d\omega} ds \;\;\;\;\;\;(13)$$

The integral term in $(13)$, according to $(5)$ and $(6)$, is $V(t)$. So we can rewrite $(13)$ as:

$$-\dot {V(t)}= \pi- r(t) V(t) \;\;\;\;\;\;(14)$$

from which it is easily obtained

$$r(t)=\frac{\pi}{V(t)}+\frac{\dot{V}(t)}{V(t)} $$

that is $(7)$.

$$ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\Box$$

$$\;$$

**REMARK**. Derivative $f\_t$ of $f(t)=e^{-\int \_t^s r(\omega)} d\omega$, as it appears in equation $(10)$.

We have $f\_t= e^{\int \_s^t {r(\omega)} d\omega} r(t)$ for the chain rule and for the fundamental theorem of calculus $(2)$.

Remember $\frac{d e ^{g(t)}}{dt} = e ^{g(t)} g'(t)\;\;\;\;\;\;\;\;\;\;\;\;\;\;(15)$.

The derivative with respect to $t$ of $\int \_s^t r(\omega) d\omega$, our $g(t)$, for the fundamental theorem of calculus $(2)$, is $r(t)$.

So, according to $(15)$, we have:

$$f\_t= e^{\int \_s^t {r(\omega)} d\omega} r(t)$$.

---

$^1$  $f(t)$ continuous or discontinuous at a finite or countable numbers of points. More generally and rigorously, a function $f$ is Riemann-integrable if the set of the points of discontinuity of $f$ is a *set of zero Lebesgue-measure*. See for example Royden, *Real Analysis*. Of course, the derivative (2) will exist only at points where $f$ is not discontinuous.

$^2$  This is the formula you find in the Appendix A.5.6 of Barro & Sala i Martin, equation (A.119).

$^3$  If both extremes of integration are infinite, we must 'crack' the integral in two pieces, take the limits separately, then adding them.

In the case we have an improper integral, we must remember that an improper integral is a limit that extends an integral to an unlimited, infinite, area and this limit doesn’t always exist finite. If the integral exists, finite, we say that the integral *converges*. Otherwise, the integral *diverges*, and we cannot apply Leibnitz rule.
So, to apply the Leibnitz formula when we have an infinite extreme of integration, we must be sure that the integral converges, otherwise the derivative of $F$ doesn’t exist. For a discussion of this complicated matter, you can see <https://math.stackexchange.com/questions/298458/using-leibniz-integral-rule-on-infinite-region>.

---


---

