Having deposited $\$5,000$ at $9\%$ annual interest, for how many years can you withdraw $\$500$? What’s a good way to iterate this

algebra-precalculusexponential functionfinance

NOTES:
I hope the tags are appropriate, this is a homework problem EDIT (another note): if it makes a difference, this question may involve calculus since it's in my calculus homework… I doubt it would make sense to use calculus in any way here

If you deposit $5,000$ dollars at $9\%$ annual interest, for how many years can you withdraw $500$ dollars (starting after the first year) without running out of money?

I've tried several equations, such as: $f(x)=5000(1.09)^x-500x$ but this never reaches $0$

The most recent thing I've tried is setting up an iteration equation: $x_{n+1}=x_n(1.09)-500$ where $x_0=5000$ which I will iterate until $x_{n+1}\le0$.

Question: Can I easily make Desmos (and the like) repeat iteration equations to infinity? AND Is there a way I can solve this problem without having to iterate (an equation that doesn't use the previous output as the next input)?

Bonus: If there's a way to turn my iteration into a "regular"<–(lack of technical terms) equation, can all iteration equations be made that way as well? Is there a general way to take an iteration equation and turn it into a simple $f(x)$ function?

Best Answer

The problem with your formulation of $f(x)$ is that you're compounding the 9% for $x$ years and then removing $ \$500$ per year as an aggregate after $x$ years, not each year. You want to reformulate the function by compounding the $ \$500 $ every year too:

$$ f(x) = 5000*1.09^x - \sum_{k=1}^{x} {500*1.09^{k-1}} . $$

This is a geometric series, so you can find a closed-form solution to the sum, then iterate.

Related Question