TITLE: Proof of Continuous compounding formula
QUESTION [8 upvotes]: Following is the formula to calculate continuous compounding
A = P e^(RT)
Continuous Compound Interest Formula
    where,  P = principal amount (initial investment)
r = annual interest rate (as a decimal)
t = number of years
A = amount after time t

The above is specific to continuous compounding. The general compounding formula is
$$A=P\left(1+\frac{r}{n}\right)^{nt}$$
I want to understand how continuous compounding formula is derived from general compounding formula, given t=1, n=INFINITY.

REPLY [4 votes]: Let's start with the general compounding formula and take the limit as $N \to \infty$. 
$$\frac{A}{P}=\lim_{n \to \infty}{\left( 1+\frac{r}{n}\right)^{nt}}$$
We start by taking logs:
$$\log\left(\frac{A}{P}\right)=\log\lim_{n \to \infty}{\left( 1+\frac{r}{n}\right)^{nt}}$$ 
And because $log(x)$ is continuous at $x\neq0$, we can swap the limit and the log:
$$\log\left(\frac{A}{P}\right)=\lim_{n \to \infty}{\log\left( 1+\frac{r}{n}\right)^{nt}}$$
$$\log\left(\frac{A}{P}\right)=\lim_{n \to \infty}{nt \log\left( 1+\frac{r}{n}\right)}$$ 
Next let's take the Taylor series of the log:
$$\log\left(\frac{A}{P}\right)=\lim_{n \to \infty}{nt \left( \frac{r}{n} - \frac{r^2}{2n^2} + \frac{r^3}{3n^3} - \frac{r^4}{4n^4} + \dots\right)}$$
$$\log\left(\frac{A}{P}\right)=\lim_{n \to \infty}{ \left( rt - \frac{tr^2}{2n} + \frac{tr^3}{3n^2} - \frac{tr^4}{4n^3} + \dots\right)}$$ 
Finally let's distribute the limit operator (it's linear) and take the limits:
$$\log\left(\frac{A}{P}\right)=\lim_{n \to \infty}{rt} - \lim_{n \to \infty}{ \frac{tr^2}{2n} + \lim_{n \to \infty}\frac{tr^3}{3n^2} - \lim_{n \to \infty}\frac{tr^4}{4n^3} + \dots}$$
$$\log\left(\frac{A}{P}\right)= rt $$
$$\frac{A}{P}= e^{rt}$$
$$A=Pe^{rt}$$ 
Which was what we wanted.