NARROW DISPLAY WARNING
You are most likely using a tablet or mobile device in portrait orientation. This website is best viewed using a typical computer screen with the browser window maximized.
Viewing this website in portrait orientation can cause problems with equations being longer than the screen width (you can scroll to the right), images being poorly sized, and the font size of maths text being much smaller than regular text. If your only option is a tablet or mobile device, your viewing experience will be better if you view this website in landscape orientation. You might need to refresh the page to fix any problems after rotating.
This may seem like a silly problem made up for a maths course, but it was actually studied in depth by Bernoulli and other mathematicians. Bernoulli investigated what happens to a savings account with interest when the compounding occurs infinitely often. The problem results in a formula for Euler's number $e$ and can be written as a differential equation as the the number of compoundings goes to infinity.
Staring principal $p$, the initial amount in the savings account, and an interest rate $r$ compound $n$ times per year, the calculation for the total amount in the savings account at the end of the year is,
\begin{equation} p \left( 1 + \frac{r}{n} \right)^{n} \end{equation}Compare the different amounts in a savings account after one year with with initial principal of 100 and an interest rate of 5% compound yearly, monthly, and daily.
Approximate the amount in a savings account after one year with with initial principal of 1 and an interest rate of 5% compound continuously. Compare the value with $e^{r}$. Set the interest rate to 100% to calculate an approximate value for $e$.
\begin{equation} \lim_{n \rightarrow \infty} \left( 1 + \frac{r}{n} \right)^{n} \end{equation}With compound interest $n$ times per year, define $\Delta t = \dfrac{1}{n}$ to create the equation
\begin{equation} S(t + \Delta t) = S(t)(1+\Delta t r) + \Delta t k \end{equation}The limit as $\Delta t \rightarrow 0$ results in the ODE,
\begin{equation} \frac{\text{d}S}{\text{d}t} = rS+k \end{equation}where $r$ is the interest rate and $k$ is the amount deposited per year.
If you save for retirement for 40 years in savings account at 5% interest, how much should you deposit each month to have 1,000,000 when you retire?