I'm doing a course in computational science and I need to solve analytically a system of differential equation:
$$\left\{ \begin{array}{c} \frac{dS}{dt} = – IS \cdot \frac{B}{N} \\
\frac{dI}{dt} = IS \cdot \frac{B}{N} \end{array} \right.$$
Where $B$ and $N$ are constants.
I haven't solved by hand any differential equations in a long time, can anyone help?
Best Answer
Note that $S+I$ is a constant $K$; you can see that by adding the equations. Then the first equation becomes
$$\frac{dS}{dt} = -S (K-S) \frac{B}{N} $$
This equation is separable as follows:
$$\frac{dS}{S (K-S)} = -\frac{B}{N} dt $$
which is equivalent to
$$dS \frac{1}{K} \left ( \frac1{S} + \frac1{K-S} \right ) = -\frac{B}{N} dt$$
Now integrate; hopefully you see this is easy:
$$\log{\left ( \frac{S}{K-S} \right )} = C - K \frac{B}{N} t $$
where $C$ is a constant of integration. Solve for $S$. To get $I$, note that $I = K-S$.
You may find $K$ and $C$ by proper initial conditions on $S$ and $I$.