[Math] Compound interest Differential Equation

differentialordinary differential equations

A college student starts a savings account with an initial balance of $\$0$. He plans to save money at a continuous rate of $\$200$ per week. Also, at every week he plans to increase this rate by $\$10$. (ex. At the 4th month he would be saving at a rate of $\$240$ per week). Additionally, the college student finds a bank account that pays continuously compounded interest at a rate of $4\%$ per year. Estimate the time it'll take for the college student to save $\$500,000$.
Hint: set up and solve a differential equation and plot the solution to make the final estimate.

My attempt:

The differential equation is hard to set up.

Let $S =$ amount saved.

Let $t =$ time.

$$\frac{dS}{dt} = \frac{0.04}{52}(200 + 10t)$$

I tried this differential equation but it doesn't satisfy the initial condition.

Can someone help me come up with the differential equation?

Thanks!

Best Answer

$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ $$ \mbox{Let}\quad \left\{\begin{array}{rclcl} b_{n} &:& \mbox{Balance after}\ n\ \mbox{weeks}.&& b_{0} = 0 \\[2mm] s_{0} & : & \mbox{Initial week saving} & = & 200 \\[2mm] \Delta s & : & \mbox{Amount added to the every week saving} & = & 10 \\[2mm] r & : & \mbox{Bank interest} \pars{~\mbox{per one per week}~} & = & {4/\pars{12\times 4} \over 100} = {1 \over 1200} \end{array}\right. $$ We assumed $4$ weeks per month.

$$ \begin{array}{rclc} b_{0} & = & 0 \\ b_{1} & = & s_{0} \\ b_{2} & = & b_{1}\pars{1 + r} + \pars{s_{0} + \Delta s} \\ b_{3} & = & b_{2}\pars{1 + r} + \pars{s_{0} + 2\Delta s} \\ b_{4} & = & b_{3}\pars{1 + r} + \pars{s_{0} + 3\Delta s} \\ \vdots & = & \vdots\quad\vdots\quad\vdots\quad\vdots\quad\vdots\quad\vdots\quad\vdots\vdots \end{array} $$

In general we have to solve: $$ b_{n} = b_{n - 1}\pars{1 + r} + \bracks{s_{0} + \pars{n - 1}\Delta s}\,,\quad n=2,3,4,\ldots\,;\qquad b_{1} = s_{0}\tag{1} $$

Lets $\quad\ds{{\rm B}\pars{z} \equiv \sum_{n = 1}^{\infty}b_{n}z^{n}}\quad$ with $\quad\ds{\verts{z} < {1 \over 1 + r}}$:

\begin{align} \sum_{n = 2}^{\infty}b_{n}z^{n} &= \pars{1 + r} \sum_{n = 2}^{\infty}b_{n - 1}z^{n} +s_{0}\sum_{n = 2}^{\infty}z^{n} + \Delta s\sum_{n = 2}\pars{n - 1}z^{n} \\[3mm]{\rm B}\pars{z} - b_{1}z &= \pars{1 + r}\ \underbrace{\sum_{n = 1}^{\infty}b_{n}z^{n + 1}}_{\ds{=\ z\,{\rm B}\pars{z}}} + s_{0}\,{z^{2} \over 1 - z} + \Delta s\,{z^{2} \over \pars{1 - z}^{2}} \\[5mm] \bracks{1 - \pars{r + 1}z}{\rm B}\pars{z}& =s_{0}\,{z \over 1 - z} + \Delta s\,{z^{2} \over \pars{1 - z}^{2}} \end{align}

$$ {\rm B}\pars{z} ={s_{0}\ z/\pars{1 - z} + \Delta s\ z^{2}/\pars{1 - z}^{2} \over 1 - \pars{r + 1}z} $$ $$ b_{n}= \frac{\left[\left(r + 1\right)^{n} - n r-1\right]\Delta s + \left[\left(r + 1\right)^{n} - 1\right] r\,s_{0}} {r^{2}} $$ $$ \color{#66f}{\large b_{n}} =\color{#66f}{\large 12000\braces{1220\bracks{\pars{1201 \over 1200}^{n} - 1} - n}} $$

$$ b_{284} \approx 499,325.84\,,\qquad b_{\color{#c00000}{\Large 285}} \approx 502,781.94\,,\qquad b_{286} \approx 506,250.93 $$

$$ \color{#c00000}{\Large 285} = \color{#66f}{\Large 5} \times 48 + \color{#66f}{\Large 11} \times 4 + \color{#66f}{\Large 1} $$

$$\color{#66f}{\large% 5\ \mbox{years}, 11\ \mbox{months and $1$ week}. } $$

enter image description here