Originally Posted by

**Rincewind** The modelling aspect is to consider the time rate of change of investiment. There are two components. The investment amount k and the interest r*S. This leads to the d.e.

$\displaystyle \frac{dS}{dt} = rS + k$

Which can be solved for S(0) = 0 as the boundary condition as follows...

$\displaystyle \frac{dS}{S + k/r} = r\,dt$<__------------this step.__

$\displaystyle \ln(S + k/r) = rt + C$

Now at t = 0, S = 0, therefore $\displaystyle C = \ln(k/r)$, so

$\displaystyle \ln(rS/k + 1) = rt$

$\displaystyle \frac{r}{k} S + 1 = \exp(rt)$

$\displaystyle S = \frac{k(\exp(rt) - 1)}{r}.$

Note this is assuming $\displaystyle r \ne 0$. If $\displaystyle r = 0$ then the d.e. simplifies and the solution is simply S = kt, as you would expect with no interest.

Hope this helps.