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.

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

Now at t = 0, S = 0, therefore , so

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

Hope this helps.