# Macroeconomics / Differential Equations

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)$$

• By the way we know that L(t)=A*e^(nt)
– Sera
Commented Nov 5, 2022 at 19:44
• 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)}$. Commented Nov 5, 2022 at 20:52
• Thank you very much! Next time I will use the right notations :)
– Sera
Commented Nov 7, 2022 at 9:20
• what did you tried?
– 1muflon1
Commented Nov 7, 2022 at 10:03

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

$$$$y' = ny + b$$$$

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

$$$$y'-ny=b$$$$

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}$$.

$$$$e^{-nt} y' - n e^{-nt} y = b e^{-nt}$$$$

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

$$$$\frac{d}{dt}[e^{-nt} y] = b e^{-nt}$$$$

Ïntegrating both sides

$$$$e^{-nt} y = \int b e^{-nt} dt$$$$

$$$$e^{-nt} y = - \frac{b}{n} e^{-nt} + C$$$$

Isolating $$y,$$ the general solution is

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

Written in a more elegant form

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

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

Evaluating the equation in $$t=0$$

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

$$$$y_0 = C - \frac{b}{n}$$$$

Isolating $$C$$

$$$$y_0 + \frac{b}{n} = C$$$$

Therefore, the solution to the initial value problem is

$$$$y(t) = (y_0 + \frac{b}{n}) e^{nt} - \frac{b}{n}$$$$

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 .

Alternative approach:

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

$$$$y' = ny + b$$$$

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

$$$$y' - ny = b$$$$

First we search for a solution to the corresponding homogeneous equation

$$$$y' - n y = 0$$$$

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

$$$$r e^{rt} - n e^{rt} = 0$$$$

Factoring $$e^{rt}$$

$$$$e^{rt} (r - n) = 0$$$$

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

$$$$r - n = 0$$$$

Isolating $$r$$

$$$$r = n$$$$

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

$$$$y_{H} = C e^{nt}$$$$

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

$$$$-nA = b$$$$

Isolating $$A$$

$$$$A = - \frac{b}{n}$$$$

Therefore our particular solution is

$$$$y_{P} = - \frac{b}{n}$$$$

We get the general solution as the following

$$$$y(t) = y_{H} + y_{P} = C e^{nt} - \frac{b}{n}$$$$

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

$$$$y(t) = (y_{0} + \frac{b}{n}) e^{nt} - \frac{b}{n}$$$$

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$$.

• When I say "basis", I mean basis as in linear algebra Commented Nov 7, 2022 at 16:11