A college professor contributes $5,000 per year into her retirement fund by making many small deposits throughout the year. The fund grows at a rate of 7% per year compounded continuously. After 30 years, she retires and begins withdrawing from her fund at a rate of $3,000 per month. If she does not make any deposits after retirement, how long will the money last? {Hint: Solve this in two steps, before retirement and after retirement.}

2 answers

".. by making many small deposits throughout the year. "
I don't know what you mean by that.
- how often are they made ?
- are the payments the same ?
Before retirement:
dy/dt = .07y+5000
separate and solve:
1/(.07y+5000)dy = dt
(1/.07)*ln(.07y+5000) = t+c
ln(.07y+5000) = .07t+c
.07y+5000 = ce^(.07t)
y = [c*e^(.07t)-5000]/.07
plug in y(0)=0 to find c. c=5000 so
y = [5000e^(.07t)-5000]/.07
plug in t=30 to get y=511869.27 (this is the amount in the fund after 30 yrs)

After retirement:
dy/dt = .07y-3000(12)
dy/dt = .07y-36000
separate and solve (almost the same as above)
you get y = [ce^(.07t)+36000]/.07
to solve for c, plug in y=511869.28 when t=0 since that is our starting amount. You get c = -169.15 so
y = [-169.15e^(.07t)+36000]/.07
When y=0, t = 76.58

So the money will last 76.58 years after she retires