%% mortgages.tex
\documentstyle[12pt]{article}
\pagestyle{empty}
% \setlength\topmargin{-0.75in}
% \setlength\textheight{9.00in}
\begin{document}
\begin{centering}

{\Large Mortgage Interest \& Principal Payments}

\bigskip
{\Large Seth Teller}

\end{centering}

\vspace*{0.25in}
Suppose we wish to take a loan of $A$ dollars at yearly
interest rate $R$ to be paid monthly over $Y$ years.
The object of this problem is to compute the (constant) 
total monthly payment $T$, and its (varying) apportionment
between principal $P_k$ and interest $I_k$.
Define $M$, the monthly interest rate, as $R / 12$,
and $N$, the number of monthly payments, as $Y \cdot 12$.

\bigskip
{\bf \noindent Problem:}

Express $T$, $P_k$, and $I_k$ as functions of
$M$, $N$, and the loan amount $A$.

\bigskip
{\bf \noindent Solution:}

Define the balance after the $k^{th}$ payment as $B_k$.
Then 
$$
B_0 = A
$$
and
$$
B_N = 0
$$
Moreover, the first interest payment
will be on the entire loan amount:
$$
I_0 = M A
$$
and the sum of all the principal payments must 
equal the loan amount:
$$
\sum_{k=1}^{N}{P_k} = A
$$
The monthly payment $T$ is constant;
thus $T_{k-1} = T_k$ for any $k > 1$, and
$$
M(A - \sum_{j = 1}^{k-2}{P_j}) + P_{k-1} = 
M(A - \sum_{j = 1}^{k-1}{P_j}) + P_{k}
$$
Cancelling common terms yields
$$
P_k = (1+M) P_{k-1}
$$
so that
$$
P_N = (1+M)^{N-1} P_1
$$

\noindent
Now, consider the initial balance $A$ and sequence of $N$ payments

\bigskip \noindent
\begin{tabular}{|r|c|c|c|c|}
					 \hline
  k &	    $I_k$	     &	  $P_k$   &	$T$                   & $B_k$         \\ \hline
  0 &       	     &        &                     & A         \\ \hline
  1 &  $M A$	     & $P_1$  & $M A + P_1$         & $A - P_1$ \\ \hline
  2 &  $M (A - P_1)$ & $P_2$  & $M A - M P_1 + P_2$ & $A - P_1 - P_2$ \\ \hline
 $\cdots$ &  	     &		&			&	\\ \hline
  $N$ &  $M ( A - \sum_{k = 1}^{N-1}{P_k})$ 
    &  $P_N$ & $M ( A - \sum_{k = 1}^{N-1}{P_k}) + P_N$ 
    &  $A - \sum_{k = 1}^{N}{P_k}$ \\ \hline
\end{tabular}

\bigskip \noindent Since $\sum{P_k} = A$, we can rewrite the last row
(i.e., the $N^{th}$ payment) as

\bigskip % \noindent
\begin{center}
\begin{tabular}{|r|c|c|c|c|}
					 \hline
   k &	  $I_N$	 &  $P_N$   &	$T$  & $B_N$         \\ \hline
%  $N$ &  $M ( A - \sum_{k = 1}^{N-1}{P_k})$ 
%    &  $P_N$ & $M ( A - \sum_{k = 1}^{N-1}{P_k}) + P_N$ 
%    &  $A - \sum_{k = 1}^{N}{P_k}$ \\ \hline
  $N$ & $M P_N$ &   $P_N$   & $(1 + M) P_N$ & 0 \\ \hline
\end{tabular}
\end{center}

\bigskip \noindent
Equating $T = T_1 = T_N$ and substituting for $P_N$ yields
$$
P_1 = \frac{M A}{(1 + M)^N - 1}
$$

\bigskip \noindent
We can now express $T$, $P_k$, and $I_k$ solely as 
functions of $M$, $N$, $A$, and $k$:
$$
T = (1+M)^N P_1 = \frac{M A (1+M)^N}{(1 + M)^N - 1}
$$
\bigskip
$$
P_k = (1+M)^{k-1} P_1 = (1+M)^{k-1} \frac{M A}{(1 + M)^N - 1}
$$
\bigskip
$$
I_k = T - P_k
$$

\bigskip \noindent
Banks probably compute mortgage tables using the above
closed-form expression for $T$, the recurrence
$$
 B_0 = A 
 \mbox{;}\quad I_k = M B_{k-1}  
 \mbox{;}\quad P_k = T - I_k 
 \mbox{;}\quad B_k = B_{k-1} - P_k
$$
and some rule for rounding intermediate values to whole pennies.

\end{document}

