Making Technology Work: Applications in Energy and the Environment

We seek an expression for the uniform annual loan payment, A, payable at the end of each year on a loan, P, received at time zero, for a loan term of N years, assuming an annual interest rate r (yr ?1). The cash flow diagram is

Note that this cash flow diagram has been drawn from the perspective of the borrower, who receives the loan at time zero, and makes payments on the loan at the end of each year. The initial loan is therefore drawn as an arrow above the time line, and the cash outlays to repay the loan are conversely drawn below the line. If the diagram had been drawn from the perspective of the lender, the direction of the arrows would have been reversed.
After the end of the first year, the borrower pays interest on the principal, rP, and also repays a portion of the principal, D 1, where
After the end of the second year, the homeowner pays interest on the principal remaining at the end of the first year, ( P- D 1), and repays a further portion of the principal, D 2, where
Substituting for D 1 in (A-2) and solving for D 2 we have
After the end of the third year, the homeowner pays interest on the remaining principal, P D 1 D 2, and repays a further portion...