The annual rate of interest of the mortgage is r%. The equivalent monthly rate is taken to be (r/12)%. Assume the amount to be repaid is P and the monthly installment is E.
To find E, the following geometric series has to be solved. Each installment is discounted by a factor of (1 + r/12)^t where t is the number of months left. Adding all the discounted monthly payments should give P.
`E/(1+r/12)^120 + E/(1 + r/12)^119 + ...+ E/(1 + r/12) = P`
=> `E/(1+r/12)^120( 1 + (1+r/12) +...+ (1+r/12)^119) = P`
=> `E/(1+r/12)^120((1+r/12)^120 - 1)/(r/12) = P`
=> `E = P*(r/12)*(1+r/12)^120/((1+r/12)^120 - 1)`
The monthly payment for an amount P borrowed at an annual rate of interest r for 10 years is `E = P*(r/12)*(1+r/12)^120/((1+r/12)^120 - 1)`