
Brandon B. answered 03/02/21
Physics PhD. 10+ years teaching calculus based physics.
The discrete case of compounded interest is A = P(1+r/n)nt, where n is the number of compounding periods per year, t is the number of years, P is the principal, and r is the interest rate. The continuous case can be found by taking the limit n → ∞. This gives A = Pert.
If we have a flow of P dollars each year then after N years we have A = P + Per + Pe2r + Pe3r + ... + PeNr. This can be simplified using the expression for a geometric series: A = P(e(N+1)r-1)/(er-1)