I'm trying to understand a simple equation which expresses the amount of a loan outstanding after $t$ months. The general description of the equation below was taken from the book "Introduction to the Theory of Computation" by Sipser.
In our equation we let $P$ be the principal and let the yearly interest rate equal $0.06$. We define $Y$ to be the monthly payment and $M$ to be the monthly multiplier so that $M=1+\frac{0.06}{12}$. (interest is paid monthly and is compounding).
Now then, our equation which expresses the amount remaining to be paid on the loan after $t$ months, for $t\geq 0$, is
$$P_t=PM^t-Y\left(\frac{M^t-1}{M-1}\right).$$
My question relates to this portion of the equation $\frac{M^t-1}{M-1}$. I understand this is a geometric series with common ratio $M$. But in the definition $Y$ is listed as the monthly payment. To me the equation would make more sense if $Y$ was simply multiplied by $t$ since after $t$ month we have made $t$ payments. I'm assuming that this geometric series is somehow keeping a running tally of the amount of interest we are paying on the loan? But then after $12$ months our multiplier is approximately $12.33$ which is much higher than the amount of interest the compounding interest would create. If anyone can explain this that would be great, I'm sure it's a very straightforward concept that is simply not registering.
The two differences only between monthly repayments and yearly repayments is the interest rate and the definition of the $t$ .
In case of monthly payments $t$ is the duration of repayment period in months and in case of monthly payments $t$ is the duration of repayment period in years.
The used monhtly interest rate is not equivalent to the yearly interest rate. The equivalent monthly interest rate $i_m$ can be evaluated by solving the following equation
$\left(1+i_m\right)^{12}=1+i$
But we can see that the monthly interest $\frac{i}{12}$ is a good approximation. For this purpose the binomial theorem can be applied.
$$\left(1+\frac{i}{12} \right)^{12}=\sum_{t=0}^{12} {12 \choose t} \cdot \left(\frac{i}{12} \right)^t\cdot 1^{12-t}$$
The first five summands are
$$=\color{blue}{1+i}+\frac{11}{24}i^2+\frac{55}{432}i^3+\frac{55}{2304}i^4\ldots$$
Since $i<1$ the terms $i^3,i^4,i^5,\ldots$ get smaller and smaller the greater the exponent is. Additionally $i$ is commonly much smaller than $1$.
Finally in case of monthly repayments we have
$$\frac{1-q_m^t}{1-q}=1+q_m+q_m^2+q_m^3+\ldots +q_m^{t-1}$$
with $q_m=1+\frac{i}{12}$ and $t$ in months
In comparison the yearly case is
$$\frac{1-q^t}{1-q}=1+q+q^2+q^3+\ldots +q^{t-1}$$
with $q=1+i$ and $t$ in years