$$B(t) \quad \text{or} \quad B(\tau)$$ Loan balance vs time
$$B_i$$ Loan balance after the ith payment
$$B_0$$ principal or loan balance at $$t=0$$
$$\phi_i$$ Fraction of payment to interest during the ith payment $$\phi = \frac{rB_i}{P}$$
$$\phi$$ Fraction of payment to interest $$\phi = \frac{rB}{P}$$
$$r$$ Interest rate
$$t_\text{term}$$ Loan term
$$n$$ Number of loan payments
$$\Delta t$$ Time between loan payments$$\Delta t = \frac{t_\text{term}}{n}$$
$$rt_\text{term}$$ Loan product, important parameter which fully specifies a loan
$$R$$ Helpful collection of variables$$R = 1+r\Delta t = 1+\frac{rt_\text{term}}{n}$$
$$P$$ Repayment rate (dollars per time)
$$\tau$$ Fraction of loan term $$\tau= \frac{t}{t_\text{term}}$$
$$I$$ Total payment to interest
$$V$$ Sum of all payments $$V = B_0+I$$
$$\frac{V}{B_0}$$ Overpay ratio $$\frac{V}{B_0} = \frac{B_0+I}{B_0}$$

# In the limit as $$\Delta t$$ approaches 0, the finite difference solution approaches the continuous solution Photo credit to Pixabay

This article is purely a matter of mathematical masturbation. Having solved an ODE with a continuous and finite difference method, we are going to show that by taking the limit of the discrete solution as $$\Delta t \rightarrow$$ 0 we can recover the continuous solution.

## Recovering the continuous solution by limits

Let us review the ODE solutions we found and then show how to recover the continuous solution by taking a limit. We began with an ordinary differential equation.

$$\frac{\partial B}{\partial t} = Br - P$$

The two solutions, discrete and continuous, look different but they should be equivalent in the limit where the discretization parameter $$\Delta t$$ approaches 0.

Continuous solution Discrete solution
$$\displaystyle B(t) = \left(B_0-\frac{P}{r}\right)e^{rt}+\frac{P}{r}$$ $$\displaystyle B_{i} = B_0\left(1+r\Delta t\right)^{t/\Delta t} -\sum_{i=0}^{t/\Delta t-1} P \left(1+r\Delta t\right)^{i} \Delta t$$

In the limit that $$\Delta t \rightarrow$$ 0, we must show two things.

\begin{align} B_0\left(1+r\Delta t\right)^{t/\Delta t} &= B_0 e^{rt} \\ \sum_{i=0}^{t/\Delta t-1} P \left(1+r\Delta t\right)^{i} \Delta t &= \frac{P}{r}\left( e^{rt}-1\right) \end{align}

Begin with the simple case.

\begin{align} \lim_{\Delta t \rightarrow 0}& B_0 \left(1+r\Delta t\right)^{t/\Delta t} \\ \lim_{\Delta t \rightarrow 0}& B_0 e^{t\log(1+r\Delta t)/\Delta t} \\ \lim_{\Delta t \rightarrow 0}& B_0 e^{rt \frac{1}{1+r\Delta t}} \qquad \text{L'Hopital's rule}\\ & B_0 e^{rt} \end{align}

Notice that the more complicated case is the same problem but wrapped in a definition of a definite integral.

$$\lim_{\Delta t \rightarrow 0} \sum_{i=0}^{t/\Delta t-1} f(i) \Delta t = \int_0^{t}f(\tau) d\tau$$

The limit of a sum is the sum of the limits.

\begin{align} \lim_{\Delta t \rightarrow 0} \sum_{i=0}^{t/\Delta t-1} & P \left(1+r\Delta t\right)^{i} \Delta t \\ \lim_{\Delta t \rightarrow 0} \sum_{i=0}^{t/\Delta t-1} & Pe^{rt} \Delta t\\ \int_0^{t} & Pe^{r\tau} d\tau\\ & \frac{P}{r}\left( e^{rt}-1\right) \end{align}

This section just serves to show there is no contradiction between the two methods - the limit of the discrete solution as $$\Delta t \rightarrow$$ 0 is the continuous solution.

$$\lim_{\Delta t \rightarrow 0} \left( B_0\left(1+r\Delta t\right)^{t/\Delta t} -\sum_{i=0}^{t/\Delta t-1} P \left(1+r\Delta t\right)^{i} \Delta t \right) = \left(B_0-\frac{P}{r}\right)e^{rt}+\frac{P}{r}$$