making it as simple, and generic, as i can, say you have the following set of quantities :
K for an initial capital (well, i suppose positive unless we're in debt
a an annuity (positive or not)
p the rate ( that is (1+t) where t is the more common (interest) rate, usually expressed in % in money related jargon )
n the number of periodes (years?) we are considering
This is how this works:
annuities can be added or substracted... well we will be adding, just change the sign of 'a' and you are happy, if that is what you are looking for.
that same operation can be done after or before applying the rate : we will be doing it before... again whange what is to be so you smile.
now we can consider the evolution of the remaining capital after n periods and see the equation when it gets to equate a certain amount...
for that last amount we will be considering 0 (zero) but of course you are free to bring your values : I just set it simple and generic.
the story goes this way :
(...((K+a)*p+a)*p+...)*p+a=0
which can then be developped into :
K*p^n+a*(p^n+p^(n-1)+...+p+1)=0
leading to a more compact :
K*p^n+a*(p^(n+1)-p)/(p-1)=0
[tex]Kp^{n}+a\frac{p^{n+1}-p^{n}}{p-1}=0[/tex]
also, multiplying both sides by 'p-1' :
[tex](K+a)p^{n+1}-Kp^{n}+ap=0[/tex]
Now, if we look into this trying to isolate the quantities this is what i got :
(1) having (K,n,p) -> [tex]a=-K\frac{p^{n}(p-1)}{p^{n+1}-p}[/tex] , so we can extract the annuity knowing all the others
(2) with (K,a,p) -> [tex]n=\frac{ln(\frac{ap}{ap-K(p-1)})}{ln(p)}[/tex] , telling us how many years the story lasts
(3) whereas (a,n,p) -> [tex]K=-a\frac{p^{n+1}-p}{p^{n}(p-1)}[/tex] , thus we now know the required initial capital for this triplet
but how do we solve the equation in order to express the rate p function of the other three values?
that is p=f(K,a,n) from [tex](K+a)p^{n+1}-Kp^{n}+ap=0[/tex]
which i prefer to bring down to its more general form : [tex]x^{n+1}+a*x^n+b=0[/tex]
when feeding Maxima with it :
(%i1) solve(x^(n+1)+a*x^n+b=0,x);
(%o1) [x^n=-(x^(n+1)+b)/a]
let's say it really is stuck and doesn't realize it;
if you try it with Maple then :
> solve(x^(n+1)+a*x^n+b=0,x);
(n + 1) n
RootOf(_Z + a _Z + b)
how much better is this?
I have to acknowledge the latter solved (2) :
> solve(x^(n+1)+a*x^n+b=0,n);
b
ln(- -----)
x + a
-----------
ln(x)
when the former kept giving the same useless answer :
(%i1) solve(x^(n+1)+a*x^n+b=0,n);
(%o1) [x^n=-(x^(n+1)+b)/a]
(notice 'n' instead of 'x' above)
there you have it all :
from [tex](K+a)p^{n+1}-Kp^{n}+ap=0[/tex]
(4) with (K,a,n) -> p=?
or more simply put, what is the correct answer to
solve(x^(n+1)+a*x^n+b=0,x) ?
thanks a lot for your patient reading
tonio
20150621

MENU