$Question:$ Suppose that $x_n$ is the amount owed on a mortgage after n years, $\$m$ is the monthly repayment and $r$ is the annual percentage interest rate charged on the amount of the mortgage outstanding.
(i) Derive a difference equation satisfied by $x_n$.
(ii) Solve the difference equation derived in (i) for a loan of $\$M$ to be repaid over $N$ years and hence determine what the monthly payment should be.
(iii) If the interest rate is $5\%$, show that the monthly repayment on a loan of $\$50,000$ to be repaid over $25$ years is $\$295.64$.
(iv) What is the total amount paid back on the loan?
$My$ $answer$ $so$ $far:$
(i) Let $\$m=x_0$. We need to derive an equation for $x_n$ which will be the amount owed after $n$ years. Thus, $x_0$ is the loan amount owed after $0$ years. So we know that $x_{n-1}$ is the amount owed from the previous year. Also, $x_n$ (the amount owed for the $n_{th}$ year) is related to $x_{n-1}$ (the amount owed for the previous year). $$x_n = f(x_{n-1}) = x_{n-1} + adjustments$$ We make $12$ monthly payments of $m$, so we substract $12m$: $$x_n =x_{n-1} -12m + adjustments$$ Then we are charged $r$ times the amount owed the previous year: $$x_n = x_{n-1} - 12m + r x_{n-1}$$ and hence, $$x_n=(1+r)x_{n-1} - 12m$$
However, I assume my answer is incorrect as I can't find a way to turn it into a difference equation. Any help would be appreciated.