Can someone help me solve this Definite Integral: Integrating variable n from 0 -> (RetirementAge-CurrentAge-1). The formula to integrate is ((Salary*Deferral%)*(1+Inflation)^n)*(1+MarketRate)^(RetirementAge-CurrentAge-n). For those who are curious, this is for a Retirement Finance calculation and my hope is to convert this integral into something I can put into Excel!
do any of the values that appear as words in this integral vary with n?
salary, deferral, etc?
Well, yes, in that n is used in the exponent of each part of the equation. Is that what you meant?
no, I mean that we can rteat salary,Deferral%, market rate as constant? i.e. they are not functions of n ?
treat ?
That is mostly correct. Constants are Deferral%, Inflation, MarketRate, RetiremetnAge, and CurrentAge. Salary will be increasing though by the rate of Inflation each year. The first part of the equation, (Salary*Deferral%)*(1+Inflation)^n), represents the increase of Salary each year after the first by Inflation.
well mathematically we have to either know exactly how those varaibales are functions of n, or else treat them as constant.... I don't know enough about economics to say how dependent those variables are on n and whether or not we can ignore that effect
Treat them as constants. Only n is being integrated. Nothing else is dependent on n.
I see. Salary is also constant. Thus, yes, aside from n, all the rest are Constants.
My Calculus speak is not what it used to be...
if we just say all those things are constants RetirementAge=A Current age=a Salary=S Deferral%=D Inflation=I MarketRate=r the integral is\[\int_0^{A-a-1}SD(1+I)^n(1+r)^{A-a-n}dn\]I guess...
Yes, save that I don't know what the dn is.
it just means that we are integrating with respect to n
not that I know how to do this integral offhand...
Yes, that is the correct formula. It's what I tried to type up front, but since this was my first post, I didn't realize i could do the fancy formatting you just did.
Haha, wait, you don't know how to integrate this D:< ?
S and D are constant, so we can tqake them out of the integral\[SD\int_0^{A-a-1}(1+I)^n(1+r)^{A-a-n}dn\]now we have two differently based exponential functions, so this is not an easy integral
we can even pull out (1+r)^(A-a)\[SD(1+r)^{A-a}\int_0^{A-a-1}(1+I)^n(1+r)^{-n}dn\]okay now I think I can do it :)
Very nice!
\[SD(1+r)^{A-a}\int_0^{A-a-1}(\frac{1+I}{1+r})^ndn\]it's going to be tricky to type, but this can be integrated
the formula to use is\[\int a^xdx=\frac{a^x}{\ln x}+C\]in your case a= that whole fraction\[\large SD(1+r)^{A-a}\int_0^{A-a-1}(\frac{1+I}{1+r})^ndn=\left .\frac{(\frac{1+I}{1+r})^n}{\ln(\frac{1+I}{1+r})}\right|_0^{A-a-1}\]
sorry, forgot the part I took out of the integral\[ SD(1+r)^{A-a}\int_0^{A-a-1}(\frac{1+I}{1+r})^ndn= SD(1+r)^{A-a}\left .\frac{(\frac{1+I}{1+r})^n}{\ln(\frac{1+I}{1+r})}\right|_0^{A-a-1}\]
so this is the same as\[{SD(1+r)^{A-a}\over \ln(\frac{1+I}{1+r})}\left .(\frac{1+I}{1+r})^n\right|_0^{A-a-1}\]
evaluating n this gives\[={SD(1+r)^{A-a}\over \ln(\frac{1+I}{1+r})}[(\frac{1+I}{1+r})^{A-a-1}-1]\]not sure how you want to simplify this...
anyway, that would be your answer if we haven't had any miscommunications along the way hope that helped!
I think I can just sink this into excel lock/stock and it will work. I'll test and let you know!
please do!
Quick clarification, the part is brackets is to be multiplied by the first quotient, right?
right
\[{SD(1+r)^{A-a}\over \ln(\frac{1+I}{1+r})}\left[(\frac{1+I}{1+r})^{A-a-1}-1\right]\]here it is more clear
or if you prefer this is the same as\[{SD(1+r)^{A-a}\over \ln(1+I)-\ln(1+r)}\left[(\frac{1+I}{1+r})^{A-a-1}-1\right]\]there are many ways to write the answer
You nailed it TuringTest >:D !
Join our real-time social learning platform and learn together with your friends!