Application Center - Maplesoft

App Preview:

Mortgages

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




Mortgages

Douglas Lewit

 

Consider the problem of borrowing $250,000 to buy a house.  You borrow the money at a fixed interest rate of 4.8% compounded monthly.  The term of the mortgage is for 20 years.  However, you decide against making minimum payments.  Instead you decide to pay an additional $200 every month.  How long will it take you to pay off the loan and how much have you saved on interest by paying off the loan early?

.048/12;

0.4000000000e-2

(1)

I'm not happy with all those "trailing zeros".  We can clean those up by opening up the Rule Assistant options box and then selecting the option, "Strip trailing zeros from floats" (note that this option is available only if you are using Extended Typesetting, which is not on by default.).  

Typesetting:-RuleAssistant();

.048/12;

0.4000000000e-2

(2)

with(Finance,annuity);

[annuity]

(3)

20*12;

240

(4)

solve(annuity(payment,0.004,240)=250000,payment);

1622.393675

(5)

payment:=(5);

1622.393675

(6)

Payment:=payment+200;

1822.393675

(7)

balance:=[250000];

[250000]

(8)

Balance:=[250000];

[250000]

(9)

Now let's generate the list of values that reflect making the minimum payment every month.  We can use a simple "for" loop to accomplish the task.

for n to 240 do
a:=nops(balance):
b:=1.004*balance[a]-payment:
balance:=[op(balance),b]:
end do:
a:='a':
b:='b':
nops(balance);

241

(10)

balance[241];  (* The final balance should be very close to 0, or just 0.  There is probably some roundoff error. *)

-0.8001e-2

(11)

Now let's generate the list of values that model the problem of paying an additional $200 per month.

for n to 240 do
a:=nops(Balance):
b:=1.004*Balance[a]-Payment:
Balance:=[op(Balance),b]:
end do:
a:='a':
b:='b':
nops(Balance);

241

(12)

balance[241];

-0.8001e-2

(13)

Balance[241];   (* This curve reached $0 before the 240th payment!  That's great news for the borrower.  Ideally, we should all strive to pay off our debts early.  That way we will owe less in interest. *)

-80335.01464

(14)

balance2:=[seq([n-1,balance[n]],n=1..241)]:  # generate the paired data values for the first graph.

Balance2:=[seq([n-1,Balance[n]],n=1..241)]:  # generate the paired data values for the second graph.

with(plots):

plot1:=listplot(balance2,color=black,thickness=3,axis[1]=[gridlines=[spacing(20),color=[COLOR(RGB,0,0.65,0.65)]]],axis[2]=[gridlines=[spacing(25000),color=[COLOR(RGB,0,0.65,0.65)]]],tickmarks=[[seq(40*n,n=0..6)],[seq(25000*n,n=-3..10)]],font=[Helvetica,Bold,9]):

plot2:=listplot(Balance2,color=red,thickness=3,axis[1]=[gridlines=[spacing(20),color=[COLOR(RGB,0,0.65,0.65)]]],axis[2]=[gridlines=[spacing(25000),color=[COLOR(RGB,0,0.65,0.65)]]],tickmarks=[[seq(40*n,n=0..6)],[seq(25000*n,n=-3..10)]],font=[Helvetica,Bold,9]):

display(plot1,plot2);

payment;

1622.393675

(15)

Payment;

1822.393675

(16)

balance2[241];

[240, -0.8001e-2]

(17)

Balance2[201];

[200, -1239.704072]

(18)

240*payment-250000;

139374.4820

(19)

200*Payment-250000;

114478.7350

(20)

(19)-(20);

24895.7470

(21)

By paying an additional $200 every month, you have reduced the cost of the loan by almost $25,000.  Not bad!  That's actually a pretty big savings, especially in today's dubious economy.