# Quick math question



## Superbird (Feb 24, 2011)

I have this question. I know how to find the total amount owed on a loan after x years. (for this example I'll pretend it's compounded monthly)

Total=P * (1+(i/12))^y

where 
P=principal
i=intrest rate, in decimal form
y=# of years.

Now, what is the new equation if I want to factor in an annual payment of x amount? Basically, "if the Principal is $(P) with (i)% intrest , but I've been paying $(x) per year, then how much would I still owe after (y) years?

Is there an equation for that?


----------



## opaltiger (Feb 24, 2011)

If it's compounded monthly your time parameter should be in units of months. Think about it, if you say y = 1 (I would suggest using 't' instead; otherwise you might get too used to working in years, and make mistakes when time is in some other unit), then the equation gives P*(1+(i/12)), which clearly isn't correct.

Anyway, addressing your actual question. The easiest way to figure it out is to work methodically. Let L(t) equal the total amount left to pay off after t years (this is going to be a bit confusing, because the interest equation is in months and the payments are annual, but bear with me):

L(1) = P*(1 + i/12)^12 - N

You simply take the amount after twelve months and subtract your annual payment (which I am calling N).

L(2) = (P*(1 + i/12)^12 - N) * (1 + i/12)^12 - N = P*(1 + i/12)^24 - N*(1 + i/12)^12 - N

A bit more complicated; now you have to take L(1) as the base, rather than simply P. Let's introduce a new constant to make this a bit easier, say a = (1 + i/12)^12, since that appears to be showing up a lot. Then L(2) = Pa^2 - Na - N. Perhaps you're beginning to see where this is going!

L(3) = (Pa^2 - Na - N)*a - N = Pa^3 - Na^2 - Na - N

From which you can, I think, fairly easily generalise:

L(t) = Pa^t - Na^(t-1) - Na^(t-2) ... - Na - N

Caveat: I am historically awful at this sort of problem and it is entirely possible I've made a mistake somewhere.

An aside: this problem was always presented to me in terms of bank accounts and savings. I am sort of amused that they gave you loan payments instead.


----------



## 1. Luftballon (Feb 26, 2011)

You can also write it:

L(0) = P
L(t) = (L(t-1) - x)*(1+i/12)^12

but yeah, recursion.

incidentally, whatever happened to the miscellaneous maths thread?

also, I'd rather write it:

L(t) = Pa^t - N(a^(t-1) - a^(t-2) ... - a^0)

because then you have a sum of exponents, which there's a formula for

L(t) = Pa^t - N(1-a^(t-1))/(1-a)

I think it ends up being?

see also: http://www.mathguide.com/lessons/SequenceGeometric.html


----------

