<p>Note: Instead of &quot;<span class="math-container">$L$</span>&quot;, I'm going to name the function &quot;<span class="math-container">$y$</span>&quot; since I'm more used to it.</p>
<p>For a function <span class="math-container">$y = y(t)$</span> we have the differential equation</p>
<p><span class="math-container">\begin{equation}
    y' = ny + b
\end{equation}</span></p>
<p>We put the equation in the form <span class="math-container">$y' + p(t)y = q(t)$</span> by subtracting <span class="math-container">$ny$</span> from both sides</p>
<p><span class="math-container">\begin{equation}
    y'-ny=b
\end{equation}</span></p>
<p>Note the equation now has the form <span class="math-container">$y' + p(t)y = q(t)$</span> with <span class="math-container">$p(t) = -n, q(t) = b$</span>. We multiply the equation by the integrating factor <span class="math-container">$\mu = e^{\int p(t) dt} = e^{\int - n dt} = e^{-nt}$</span>.</p>
<p><span class="math-container">\begin{equation}
    e^{-nt} y' - n e^{-nt} y = b e^{-nt}
\end{equation}</span></p>
<p>With this, we can write the left hand side as a derivative through the product rule</p>
<p><span class="math-container">\begin{equation}
    \frac{d}{dt}[e^{-nt} y] = b e^{-nt}
\end{equation}</span></p>
<p>Ïntegrating both sides</p>
<p><span class="math-container">\begin{equation}
    e^{-nt} y = \int b e^{-nt} dt
\end{equation}</span></p>
<p><span class="math-container">\begin{equation}
    e^{-nt} y = - \frac{b}{n} e^{-nt} + C
\end{equation}</span></p>
<p>Isolating <span class="math-container">$y,$</span> the general solution is</p>
<p><span class="math-container">\begin{equation}
    y(t) = - \frac{b}{n} + C e^{nt}
\end{equation}</span></p>
<p>Written in a more elegant form</p>
<p><span class="math-container">\begin{equation}
    y(t) = C e^{nt} - \frac{b}{n}
\end{equation}</span></p>
<p>If we have an initial condition <span class="math-container">$y(0) = y_{0},$</span> we can find the value of <span class="math-container">$C.$</span></p>
<p>Evaluating the equation in <span class="math-container">$t=0$</span></p>
<p><span class="math-container">\begin{equation}
    y(0) = C e^{n \cdot 0} - \frac{b}{n}
\end{equation}</span></p>
<p><span class="math-container">\begin{equation}
    y_0 = C - \frac{b}{n}
\end{equation}</span></p>
<p>Isolating <span class="math-container">$C$</span></p>
<p><span class="math-container">\begin{equation}
    y_0 + \frac{b}{n} = C
\end{equation}</span></p>
<p>Therefore, the solution to the initial value problem is</p>
<p><span class="math-container">\begin{equation}
    y(t) = (y_0 + \frac{b}{n}) e^{nt} - \frac{b}{n}
\end{equation}</span></p>

CC BY-SA 4.0
2022-11-07T15:25:19.340Z
2022-11-07T15:25:19.340Z
Nicolas Torres
<p>A third possible approach,  to make life easier, maybe.</p>
<p>The equation</p>
<p><span class="math-container">$$\dot L(t) = nL(t) + b\;\;\;\; \;\;\;\;\;\;\;\; \;\;\;\;\;\;\;\; \;\;(1)$$</span></p>
<p>is a <strong>first order linear</strong> (non homogeneos) differential equation, that is an equation of the form:</p>
<p><span class="math-container">$$y'+a(t)y=g(t)\;\;\;\; \;\;\;\; a\in \mathbb{R}\;\;\;\; \;\;\;\;\;\;(2)$$</span>
where <span class="math-container">$g(t)$</span> and <span class="math-container">$a(t) \in C^0(I), I \subset \mathbb{R}$</span>, are known functions.</p>
<p>For this kind of equations there is an explicit <strong>solution formula</strong>. The formula is:</p>
<p><span class="math-container">$$y(t)=e^{-A(t)}[c_1+\int g(t) e^{A(t)}\, dt]\;\;\;\;\;\;\;\;(3)$$</span></p>
<p>where</p>
<p><span class="math-container">$$A(t)=\int a(t)\, dt$$</span></p>
<p>anc <span class="math-container">$c_1$</span> is an arbitrary constant, hence formula <span class="math-container">$(3)$</span>, varying <span class="math-container">$c_1$</span> in <span class="math-container">$\mathbb{R}$</span>, gives <strong>infinite solutions</strong> of <span class="math-container">$(2)$</span>, in this sense it is called the <em>general solution.</em></p>
<p>We can apply immediatly this formula to find the solution of <span class="math-container">$(1)$</span>, where</p>
<p><span class="math-container">$$a(t) =-n, g(t)= b$$</span>.</p>
<p>What's the better method to solve an  equation is matter of tastes, if one prefers recalling the formula, at risk of making mistakes, or if one prefers to follow the whole procedure with the integrating factor.</p>
<p>Resorting to the initial condition we have then the particolar solution, as usual .</p>

CC BY-SA 4.0
2022-11-07T16:36:57.807Z
2022-11-07T16:36:57.807Z
BakerStreet
<p>Alternative approach:</p>
<p>For a function <span class="math-container">$y = y(t)$</span> we have the differential equation</p>
<p><span class="math-container">\begin{equation}
    y' = ny + b
\end{equation}</span></p>
<p>To get the form of a linear differential equation, we subtract <span class="math-container">$ny$</span></p>
<p><span class="math-container">\begin{equation}
    y' - ny = b
\end{equation}</span></p>
<p>First we search for a solution to the corresponding homogeneous equation</p>
<p><span class="math-container">\begin{equation}
    y' - n y = 0
\end{equation}</span></p>
<p>We start by searching for a solution of the form <span class="math-container">$y = e^{rt}$</span> and find <span class="math-container">$r$</span>. We substitute this expression into the equation</p>
<p><span class="math-container">\begin{equation}
    r e^{rt} - n e^{rt} = 0
\end{equation}</span></p>
<p>Factoring <span class="math-container">$e^{rt}$</span></p>
<p><span class="math-container">\begin{equation}
    e^{rt} (r - n) = 0
\end{equation}</span></p>
<p>Since <span class="math-container">$e^{rt} \neq 0,$</span></p>
<p><span class="math-container">\begin{equation}
    r - n = 0
\end{equation}</span></p>
<p>Isolating <span class="math-container">$r$</span></p>
<p><span class="math-container">\begin{equation}
    r = n
\end{equation}</span></p>
<p>Therefore the solution to the homogeneous equation is (Since each value of r gives a basis function for the homogeneous solution)</p>
<p><span class="math-container">\begin{equation}
    y_{H} = C e^{nt}
\end{equation}</span></p>
<p>Since the right hand side of the linear (second line) equation is a degree 0 polynomial, we search for a degree 0 polynomial for our particular solution <span class="math-container">$y_{P} = A$</span>. Now we want to solve for <span class="math-container">$A$</span>. Substituting this expression into the equation</p>
<p><span class="math-container">\begin{equation}
    -nA = b
\end{equation}</span></p>
<p>Isolating <span class="math-container">$A$</span></p>
<p><span class="math-container">\begin{equation}
    A = - \frac{b}{n}
\end{equation}</span></p>
<p>Therefore our particular solution is</p>
<p><span class="math-container">\begin{equation}
    y_{P} = - \frac{b}{n}
\end{equation}</span></p>
<p>We get the general solution as the following</p>
<p><span class="math-container">\begin{equation}
    y(t) = y_{H} + y_{P} = C e^{nt} - \frac{b}{n}
\end{equation}</span></p>
<p>If we have an initial condition <span class="math-container">$y(0) = y_{0}$</span>, the value of <span class="math-container">$C$</span> can still be found as in my previous answer to get</p>
<p><span class="math-container">\begin{equation}
    y(t) = (y_{0} + \frac{b}{n}) e^{nt} - \frac{b}{n}
\end{equation}</span></p>
<p>Note: If the solution to the homogeneous equation happened to contain a constant term (making it a multiple of our original candidate <span class="math-container">$y_P$</span>), we must have searched for a particular solution <span class="math-container">$\hat{y_{P}} = t y_{P} = At$</span>, and still solve for <span class="math-container">$A$</span>.</p>

CC BY-SA 4.0
2022-11-07T16:11:43.203Z
When I say "basis", I mean basis as in linear algebra
Nicolas Torres
CC BY-SA 4.0
2022-11-07T16:10:25.620Z
2022-11-08T20:50:45.333Z
2022-11-08T20:50:45.333Z
Nicolas Torres
<p>Could someone help me to solve the following differential equation:</p>
<p><span class="math-container">$\dot L(t) = nL(t) + b$</span>   with <span class="math-container">$n&gt;0$</span>, <span class="math-container">$b&gt;0$</span>, <span class="math-container">$L(O)∈R$</span></p>
<p><span class="math-container">$\dot L(t)=$</span> the time derivative of <span class="math-container">$L(t)$</span></p>

CC BY-SA 4.0
2022-11-05T19:44:39.390Z
By the way we know that L(t)=A*e^(nt)
Sera
CC BY-SA 4.0
2022-11-05T20:52:43.113Z
If you are going to be a regular participant in Economics SE it would be helpful to learn Latex.  For dot notation to show a time derivative, for example, you need \$\dot{L(t)}\$ which yields $\dot{L(t)}$.
Adam Bailey
CC BY-SA 4.0
2022-11-07T09:20:31.767Z
Thank you very much! Next time I will use the right notations :)
Sera
CC BY-SA 4.0
2022-11-07T10:03:06.270Z
what did you tried?
1muflon1
<macroeconomics><mathematical-economics>
Macroeconomics / Differential Equations
Sera
# Macroeconomics / Differential Equations

(Asked by: username_0 on 2022-11-05)

Could someone help me to solve the following differential equation:

$\dot L(t) = nL(t) + b$ with $n>0$, $b>0$, $L(O)∈R$

$\dot L(t)=$ the time derivative of $L(t)$

**Tags:** macroeconomics, mathematical-economics

> **Comments:**
> **username_0**: By the way we know that L(t)=A*e^(nt)  
> **username_1**: If you are going to be a regular participant in Economics SE it would be helpful to learn Latex.  For dot notation to show a time derivative, for example, you need \$\dot{L(t)}\$ which yields $\dot{L(t)}$.  
> **username_0**: Thank you very much! Next time I will use the right notations :)  
> **username_2**: what did you tried?  

---

## 3 answers

### Answer by username_3 on 2022-11-07. Score: 5

Note: Instead of "$L$", I'm going to name the function "$y$" since I'm more used to it.

For a function $y = y(t)$ we have the differential equation

\begin{equation}
y' = ny + b
\end{equation}

We put the equation in the form $y' + p(t)y = q(t)$ by subtracting $ny$ from both sides

\begin{equation}
y'-ny=b
\end{equation}

Note the equation now has the form $y' + p(t)y = q(t)$ with $p(t) = -n, q(t) = b$. We multiply the equation by the integrating factor $\mu = e^{\int p(t) dt} = e^{\int - n dt} = e^{-nt}$.

\begin{equation}
e^{-nt} y' - n e^{-nt} y = b e^{-nt}
\end{equation}

With this, we can write the left hand side as a derivative through the product rule

\begin{equation}
\frac{d}{dt}[e^{-nt} y] = b e^{-nt}
\end{equation}

Ïntegrating both sides

\begin{equation}
e^{-nt} y = \int b e^{-nt} dt
\end{equation}

\begin{equation}
e^{-nt} y = - \frac{b}{n} e^{-nt} + C
\end{equation}

Isolating $y,$ the general solution is

\begin{equation}
y(t) = - \frac{b}{n} + C e^{nt}
\end{equation}

Written in a more elegant form

\begin{equation}
y(t) = C e^{nt} - \frac{b}{n}
\end{equation}

If we have an initial condition $y(0) = y\_{0},$ we can find the value of $C.$

Evaluating the equation in $t=0$

\begin{equation}
y(0) = C e^{n \cdot 0} - \frac{b}{n}
\end{equation}

\begin{equation}
y\_0 = C - \frac{b}{n}
\end{equation}

Isolating $C$

\begin{equation}
y\_0 + \frac{b}{n} = C
\end{equation}

Therefore, the solution to the initial value problem is

\begin{equation}
y(t) = (y\_0 + \frac{b}{n}) e^{nt} - \frac{b}{n}
\end{equation}


---

### Answer by username_4 on 2022-11-07. Score: 3

A third possible approach, to make life easier, maybe.

The equation

$$\dot L(t) = nL(t) + b\;\;\;\; \;\;\;\;\;\;\;\; \;\;\;\;\;\;\;\; \;\;(1)$$

is a **first order linear** (non homogeneos) differential equation, that is an equation of the form:

$$y'+a(t)y=g(t)\;\;\;\; \;\;\;\; a\in \mathbb{R}\;\;\;\; \;\;\;\;\;\;(2)$$
where $g(t)$ and $a(t) \in C^0(I), I \subset \mathbb{R}$, are known functions.

For this kind of equations there is an explicit **solution formula**. The formula is:

$$y(t)=e^{-A(t)}[c\_1+\int g(t) e^{A(t)}\, dt]\;\;\;\;\;\;\;\;(3)$$

where

$$A(t)=\int a(t)\, dt$$

anc $c\_1$ is an arbitrary constant, hence formula $(3)$, varying $c\_1$ in $\mathbb{R}$, gives **infinite solutions** of $(2)$, in this sense it is called the *general solution.*

We can apply immediatly this formula to find the solution of $(1)$, where

$$a(t) =-n, g(t)= b$$.

What's the better method to solve an equation is matter of tastes, if one prefers recalling the formula, at risk of making mistakes, or if one prefers to follow the whole procedure with the integrating factor.

Resorting to the initial condition we have then the particolar solution, as usual .


---

### Answer by username_3 on 2022-11-07. Score: 3

Alternative approach:

For a function $y = y(t)$ we have the differential equation

\begin{equation}
y' = ny + b
\end{equation}

To get the form of a linear differential equation, we subtract $ny$

\begin{equation}
y' - ny = b
\end{equation}

First we search for a solution to the corresponding homogeneous equation

\begin{equation}
y' - n y = 0
\end{equation}

We start by searching for a solution of the form $y = e^{rt}$ and find $r$. We substitute this expression into the equation

\begin{equation}
r e^{rt} - n e^{rt} = 0
\end{equation}

Factoring $e^{rt}$

\begin{equation}
e^{rt} (r - n) = 0
\end{equation}

Since $e^{rt} \neq 0,$

\begin{equation}
r - n = 0
\end{equation}

Isolating $r$

\begin{equation}
r = n
\end{equation}

Therefore the solution to the homogeneous equation is (Since each value of r gives a basis function for the homogeneous solution)

\begin{equation}
y\_{H} = C e^{nt}
\end{equation}

Since the right hand side of the linear (second line) equation is a degree 0 polynomial, we search for a degree 0 polynomial for our particular solution $y\_{P} = A$. Now we want to solve for $A$. Substituting this expression into the equation

\begin{equation}
-nA = b
\end{equation}

Isolating $A$

\begin{equation}
A = - \frac{b}{n}
\end{equation}

Therefore our particular solution is

\begin{equation}
y\_{P} = - \frac{b}{n}
\end{equation}

We get the general solution as the following

\begin{equation}
y(t) = y\_{H} + y\_{P} = C e^{nt} - \frac{b}{n}
\end{equation}

If we have an initial condition $y(0) = y\_{0}$, the value of $C$ can still be found as in my previous answer to get

\begin{equation}
y(t) = (y\_{0} + \frac{b}{n}) e^{nt} - \frac{b}{n}
\end{equation}

Note: If the solution to the homogeneous equation happened to contain a constant term (making it a multiple of our original candidate $y\_P$), we must have searched for a particular solution $\hat{y\_{P}} = t y\_{P} = At$, and still solve for $A$.

> **Comments:**
> **username_3**: When I say "basis", I mean basis as in linear algebra  

---

