Set of ODE: how can I solve it?

121 Views Asked by At

I want to solve this system, but I have never solved a system of ODE, can you help me?

$$ \begin{cases} \frac{dA}{dt}=-aA\\ \frac{dB}{dt}=aA-bB\\ \frac{dC}{dt}=bB \end{cases}$$

I have solved the first equation: $$A(t)=A_0e^{-a t}$$ Thanks for any help!

3

There are 3 best solutions below

5
On

After putting solution of first equation in 2nd, we get, $$\frac{dB}{dt}+bB=aA_0e^{-at}$$

This is a linear differential equation in $B$ which can be solved by multiplying integrating factor$(e^{bt})$ on both sides.

EDIT: $$e^{bt}\frac{dB}{dt}+be^{bt}B=aA_0e^{(b-a)t}$$

Now L.H.S. is equal to $\frac{d(Be^{bt})}{dt}$

Hence, $$Be^{bt}=aA_0\int e^{(b-a)t}dt=aA_0\frac{e^{(b-a)t}}{(b-a)}+k\tag{k is some constant}$$ which gives $B=aA_0\frac{e^{-at}}{(b-a)}+ke^{-bt}$

Now, if we add three ODE's, we have, $$\frac{d(A+B+C)}{dt}=0\implies A+B+C=c_0\tag{$c_0$ is some constant}$$

Now put $A,B$ to get $C$

0
On

If you solve the first two equations as Avatar suggested you don't really need to substitute into $(3)$ to find $C$ since $(1) + (2) + (3)$ gives $$\frac{d}{dt}(A+B+C) = \frac{dA}{dt} + \frac{dB}{dt} + \frac{dC}{dt} = 0 \Longleftrightarrow A + B + C = \text{const} \Longleftrightarrow C = \text{const} - A - B.$$

0
On

In general, when you have a generic set of $N$ linear differential equation of $N$ independent variables, there is a standard methods to solve it. As said before, this method work, even in those situation in which there is no evidence of suitable simplification (i.e. $\dot{A}+\dot{B}+\dot{C}=0$).

First of all, you have to pass to a matricial description of your system.

Let $X(t) = [A(t) ~ B(t) ~ C(t)]^T$ the solution vector. Then $\dot{X}(t) = [\dot{A}(t) ~ \dot{B}(t) ~ \dot{C}(t)]^T$. We want to find a matricial (linear) relationship between $X(t)$ and $\dot{X}(t)$. This relationship is represented by matrix $F$ defined as follows: \begin{equation}F = \left[\begin{array}{ccc}-a & 0 & 0\\a & -b & 0\\0 & b & 0\end{array}\right]\end{equation}

So we can write that $\dot{X} = FX$. An important result in this field, is that the solution is the following: $$X(t) = e^{Ft}X(0)$$ where $e^{Ft}$ is the exponential of the matrix $Ft$.

Calculation of $e^{Ft}$ is based upon the eigenvalues-eigenvectors calculus of matrix $F$. In particular, let $F = VDV^{-1}$ the diagonalisation of $F$, where $D$ is a diagonal matrix which diagonal entries are the eigenvalues of $F$, and $V$ is constructed, by column, with the eigenvectors of $F$. For the particular $F$, we have that:

\begin{equation}D = \left[\begin{array}{ccc}0 & 0 & 0\\0 & -b & 0\\0 & 0 & -a\end{array}\right]\end{equation}

\begin{equation}V = \left[\begin{array}{ccc}0 & 0 & \frac{a-b}{b}\\0 & -1 & -\frac{a}{b}\\1 & 1 & 1\end{array}\right]\end{equation}

We know that $e^{Ft} = Ve^{Dt}V^{-1}$. Since $D$ is diagonal, then

\begin{equation}e^{Dt} = \left[\begin{array}{ccc}e^{0\cdot t} & 0 & 0\\0 & e^{-bt} & 0\\0 & 0 & e^{-at}\end{array}\right] = \left[\begin{array}{ccc}1 & 0 & 0\\0 & e^{-bt} & 0\\0 & 0 & e^{-at}\end{array}\right]\end{equation}

Finally, solution is obtained by calculating $X(t) = e^{Ft}X(0) = Ve^{Dt}V^{-1}X(0)$

Solution is the following: \begin{equation}X(t) = \left[\begin{array}{c} A(0)e^{-at}\\ B(0)e^{-bt} - \frac{aA(0)}{a-b}(e^{-at} - e^{-bt})\\ A(0) + C(0) - B(0)(e^{-bt} - 1) + \frac{A(0)}{a-b}\left( be^{-at}-ae^{-bt}\right) \end{array}\right] \end{equation}

(Hope that results are good, sorry for calculus mistakes!!!)