# Analytical solution for a system of differential equation

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?

• Yeah, i'm sure. It's from an Epidemiological Model. Where I is the infected, S the susceptible part, N the total number and B an adjustable parameter. – Matheus Calvelli da Silva Mar 2 '15 at 21:51
• Are there any constraints on $I,S$? I'm assuming positivity at least? – jameselmore Mar 2 '15 at 21:59

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