Deriving the coefficient formula
Suppose f is a power series about
a on some interval:
f(x) = \sum_{n=0}^{\infty} c_n (x - a)^n = c_0 + c_1(x-a) + c_2(x-a)^2 + c_3(x-a)^3 + \cdots.
We solve for the unknown coefficients c_n one at a time, using the
fact that a power series may be
differentiated term by term.
Step 0 — read off c_0. Set
x = a. Every term with a factor (x-a)
dies, leaving only the constant:
f(a) = c_0.
Step 1 — differentiate once, then set x = a.
Term-by-term differentiation gives
f'(x) = c_1 + 2c_2(x-a) + 3c_3(x-a)^2 + \cdots, \qquad f'(a) = c_1.
Step 2 — differentiate twice. Each differentiation pulls down the current
exponent as a factor:
f''(x) = 2c_2 + (3\cdot 2)c_3(x-a) + \cdots, \qquad f''(a) = 2c_2 \ \Longrightarrow\ c_2 = \frac{f''(a)}{2}.
Step 3 — differentiate three times and see the factorial appear:
f'''(x) = (3\cdot 2 \cdot 1)c_3 + \cdots, \qquad f'''(a) = 6\,c_3 \ \Longrightarrow\ c_3 = \frac{f'''(a)}{3!}.
Step 4 — the general pattern. Differentiating n
times, the (x-a)^n term contributes
n(n-1)\cdots 1 = n! times c_n, and every
lower term has vanished while every higher term still carries a factor
(x-a) that dies at x = a. Hence
f^{(n)}(a) = n!\, c_n, so
\boxed{\,c_n = \frac{f^{(n)}(a)}{n!}\,}
The coefficients are not a choice — they are dictated by the
higher-order derivatives
of f at the centre. Assembling them gives the Taylor series:
f(x) \ \sim \ \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}\,(x-a)^n.
Building the three classics (Maclaurin, a = 0)
The exponential e^x. Every derivative of
e^x is e^x, so
f^{(n)}(0) = e^0 = 1 for all n. Thus
c_n = 1/n!:
e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots.
Sine. The derivatives of \sin x cycle
\sin, \cos, -\sin, -\cos, so at 0 they
read 0, 1, 0, -1 and repeat. Only odd powers survive, with
alternating sign:
\sin x = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n+1)!}\,x^{2n+1} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots.
Cosine. Differentiate the sine series term by term (legal inside the
interval), or evaluate \cos's derivatives at
0, which read 1, 0, -1, 0:
\cos x = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n)!}\,x^{2n} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots.
All three have radius of convergence R = \infty (the factorial in
the denominator crushes the terms), so each series equals its function on the whole real line.
If f is represented by a power series about
a, its coefficients are forced to be
-
c_n = \dfrac{f^{(n)}(a)}{n!}, giving the
Taylor series
\sum_{n\ge 0}\dfrac{f^{(n)}(a)}{n!}(x-a)^n; the
Maclaurin series is the case a = 0.
- e^x = \sum_{n\ge 0}\dfrac{x^n}{n!};
- \sin x = \sum_{n\ge 0}\dfrac{(-1)^n}{(2n+1)!}x^{2n+1};
- \cos x = \sum_{n\ge 0}\dfrac{(-1)^n}{(2n)!}x^{2n}.
Each of these three converges for all x \in \mathbb{R}
(R = \infty).
Line up the three series and a jewel appears. Feed an imaginary argument
ix into the exponential series and use
i^2 = -1, i^3 = -i,
i^4 = 1:
e^{ix} = \sum_{n=0}^{\infty}\frac{(ix)^n}{n!} = 1 + ix - \frac{x^2}{2!} - i\frac{x^3}{3!} + \frac{x^4}{4!} + \cdots.
Now sort the terms into those with no i (even powers) and those
carrying one factor of i (odd powers):
e^{ix} = \underbrace{\left(1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots\right)}_{\cos x} + i\,\underbrace{\left(x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots\right)}_{\sin x}.
The two groups are exactly the cosine and sine series we just built. Therefore
e^{ix} = \cos x + i \sin x,
Euler's formula — and at x = \pi the celebrated
e^{i\pi} + 1 = 0. The deep link between exponential growth and
rotation is not a coincidence; it is three Maclaurin series sitting on top of one another.