# Morgage(Loan Amortization)

ratprint:false;

FORMULA 3  morgage, annuity

F3A: PV=nusum(rvalue/(1+r/Times)^(i*Times/rTimes), i, 1, N*rTimes);

PROBLEM (1)
Given Data: 
 PV:3000, r:0.02, rTimes:12, Times:12, N:10;
Unknown:
 rvalue;

val: float(solve(ev(F3A, PV:3000, r:0.02, rTimes:12, Times:12, N:10),rvalue));

val2:rhs(val[1]);

Graphics: down the line, PV to be increased and your repayments to be increased
LL(loan)=RR(repayment)

numer:TRUE;

RR:float(ev(rvalue*nusum((1+r/Times)^((i-1)*Times/rTimes), i, 1, N*rTimes), 
     r:0.02, rTimes:12, Times:12, rvalue:val2) );

LL:ev(PV*(1+r/Times)^(N*rTimes), PV:3000, r:0.02, rTimes:12, Times:12);

plot2d([RR, LL], [N, 0,12]);

PROBLEM(2)
Given Data: 
 PV:3000, r:0.02, rTimes:12, Times:12, rvalue:30;
Unknown:
 N;

We should use find_root() instead of realroots().

realroots(ev(F3A, PV:3000, r:0.02, rTimes:12, Times:12, rvalue:30));

find_root(ev(F3A, PV:3000, r:0.02, rTimes:12, Times:12, rvalue:30),N,0,1000);

Graphics: down the line, PV to be increased and your repayments to be increased

RR2:ev(rvalue*nusum((1+r/Times)^((i-1)*Times/rTimes), i, 1, N*rTimes), 
     r:0.02, rTimes:12, Times:12, rvalue:30 );

plot2d([LL,RR,RR2], [N, 0,12]);

Legal Notice: The copyright for this application is owned by the authors.
The authors are not responsible for any errors contained within and are not liable
for any damages resulting from the use of this material.
This application is intended for non-commercial, non-profit use only.
Contact the authors for permission if you wish to use this application in for-profit activities.
Contact address: Prof. Yukari Shirota, Faculty of Economics, Gakushuin University, 1-5-1 Mejiro,
Toshima-ku, Tokyo, 171-8588 JAPAN,  yukari.shirota@ipsj.or.jp