On morgage payments

John Thingstad john.thingstad at chello.no
Thu Oct 18 10:02:23 EDT 2001


Isaw earlier a very inefficient way of calculating morgage on a loan.
The recurence relation:

P = amount
i = interest
d = downpayment

P    = i*P    - d
   n       n-1

was solver by itteration in a loop

I would like to point out:

P     = i * (i*P     - d)  - d
  i+1              i

P       = i * ( i * (i * P   - d) -d) -d)
  i + 2                     i       


P      = i*i*i*P  -d(i^2 + i +1)
  i+2            i

by inspecion i*i*i is a exponential and i^2 + i +1 is a geometric series so we have:

P    = i^n * P    - d * (i^n -1 / i -1)
  n               0

Which can be computed once.





More information about the Python-list mailing list