# another diffeq modeling problem..

• Feb 4th 2009, 04:47 PM
p00ndawg
another diffeq modeling problem..
A young person with no initial capital invests k dollars per year at an annual rate of return r. Assume that
the investments are made continuously and that the return is compounded continuously.

determine the sum S(t) accumalted at any time t.

Im very confused on how to really start the process of modeling the problem.
• Feb 4th 2009, 05:52 PM
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$

$\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.
• Feb 4th 2009, 06:05 PM
p00ndawg
Quote:

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.

can u explain the bolded step, it seems you divided by r and solved. Not sure why, is that to get it into a form we can use?
• Feb 4th 2009, 07:44 PM
Rincewind
Quote:

Originally Posted by p00ndawg
can u explain the bolded step, it seems you divided by r and solved. Not sure why, is that to get it into a form we can use?

I did that so that when I integrate the LHS there wont be a term hanging around. If you want to you can not do that and it will sort itself out as follows...

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

integrating

$\displaystyle \frac{1}{r}\ln(rS + k) = t + C$

now S(0) = 0 therefore C = (1/r)ln(k) so substituting

$\displaystyle \frac{1}{r}\ln(rS + k) = t + \frac{1}{r}\ln(k)$

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

$\displaystyle \ln(rS + k) - \ln(k) = rt$

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

as before,

Does this explain it?
• Feb 5th 2009, 02:41 AM
p00ndawg
Quote:

Originally Posted by Rincewind
I did that so that when I integrate the LHS there wont be a term hanging around. If you want to you can not do that and it will sort itself out as follows...

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

integrating

$\displaystyle \frac{1}{r}\ln(rS + k) = t + C$

now S(0) = 0 therefore C = (1/r)ln(k) so substituting

$\displaystyle \frac{1}{r}\ln(rS + k) = t + \frac{1}{r}\ln(k)$

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

$\displaystyle \ln(rS + k) - \ln(k) = rt$

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

as before,

Does this explain it?

perfect thank you.