Constructing a Taylor Series

Key Questions

• One of the benefits of a Taylor series is the ease of differentiation since it can be done term by term. So, the Talyor series

f(x)=sum_{n=0}^infty{f^{(n)}(a)}/{n!}(x-a)^n

can be differentiated as

f'(x)=sum_{n=0}^infty{f^{(n)}(a)}/{n!}[(x-a)^{n}]'

by Power Rule,

=sum_{n=1}^infty{f^{(n)}(a)}/{n!}[n(x-a)^{n-1}]

(Note: $n$ starts from $1$ since the term is zero when $n = 0$)
by simplifying a little further,

=sum_{n=1}^infty{f^{(n)}(a)}/{(n-1)!}(x-a)^{n-1}

I hope that this was helpful.

• Let us solve $y ' ' + y = 0$ by Power Series Method.

Let $y = {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n}$, where ${c}_{n}$ is to be determined.

By taking derivatives,

$y ' = {\sum}_{n = 1}^{\infty} n {c}_{n} {x}^{n - 1} R i g h t a r r o w y ' ' = {\sum}_{n = 2}^{\infty} n \left(n - 1\right) {c}_{n} {x}^{n - 2}$

We can rewrite $y ' ' + y = 0$ as

${\sum}_{n = 2}^{\infty} n \left(n - 1\right) {c}_{n} {x}^{n - 2} + {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n} = 0$

by shifting the indices of the first summation by 2,

$R i g h t a r r o w {\sum}_{n = 0}^{\infty} \left(n + 2\right) \left(n + 1\right) {c}_{n + 2} {x}^{n} + {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n} = 0$

by combining the summations,

$R i g h t a r r o w {\sum}_{n = 0}^{\infty} \left[\left(n + 2\right) \left(n + 1\right) {c}_{n + 2} + {c}_{n}\right] {x}^{n} = 0$,

$R i g h t a r r o w \left(n + 2\right) \left(n + 1\right) {c}_{n + 2} + {c}_{n} = 0$

$R i g h t a r r o w {c}_{n + 2} = - \frac{{c}_{n}}{\left(n + 2\right) \left(n + 1\right)}$

Let us look at even coefficients.

c_2={-c_0}/{2cdot1}=-c_0/{2!}
c_4={-c_2}/{4cdot3}={-1}/{4cdot3}cdot{-c_0}/{2!}=c_0/{4!}
c_6={-c_4}/{6cdot5}={-1}/{6cdot5}cdot c_0/{4!}=-{c_0}/{6!}
.
.
.
c_{2n}=(-1)^n{c_0}/{(2n)!}

Let us look at odd coefficients.

c_3={-c_1}/{3cdot2}=-{c_1}/{3!}
c_5={-c_3}/{5cdot4}={-1}/{5cdot4}cdot{-c_1}/{3!}={c_1}/{5!}
c_7={-c_5}/{7cdot6}={-1}/{7cdot6}cdot{c_1}/{5!}=-{c_1}/{7!}
.
.
.
c_{2n+1}=(-1)^n{c_1}/{(2n+1)!}

Hence, the solution can be written as:

$y = {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n}$

by splitting into even terms and odd terms,

$= {\sum}_{n = 0}^{\infty} {c}_{2 n} {x}^{2 n} + {\sum}_{n = 0}^{\infty} {c}_{2 n + 1} {x}^{2 n + 1}$

by pluggin in the formulas for ${c}_{2 n}$ and ${c}_{2 n + 1}$ we found above,

=c_0sum_{n=0}^infty(-1)^n{x^{2n}}/{(2n)!}+c_1 sum_{n=0}^infty(-1)^n{x^{2n+1}}/{(2n+1)!}

by recognizing the power series,

$= {c}_{0} \cos x + {c}_{1} \sin x$

I hope that this was helpful.

• The Taylor series of a function is a power series, all of whose derivatives match their corresponding derivatives of the function.

Let us derive the Taylor series of a function $f \left(x\right)$, centered at $c$.

Let

$f \left(x\right) = {\sum}_{n = 0}^{\infty} {a}_{n} {\left(x - c\right)}^{n}$

$= {a}_{0} + {a}_{1} \left(x - c\right) + {a}_{2} {\left(x - c\right)}^{2} + \cdots$,

where coefficients ${a}_{1} , {a}_{2} , {a}_{3} , \ldots$ are to be determined.

By taking the derivatives,

$f ' \left(x\right) = {a}_{1} + 2 {a}_{2} \left(x - c\right) + 3 {a}_{3} {\left(x - c\right)}^{2} + \cdots$

$f ' ' \left(x\right) = 2 {a}_{2} + 3 \cdot 2 {a}_{3} \left(x - c\right) + 4 \cdot 3 {a}_{4} {\left(x - c\right)}^{2} + \cdots$

$f ' ' ' \left(x\right) = 3 \cdot 2 {a}_{3} + 4 \cdot 3 \cdot 2 {a}_{4} \left(x - c\right) + 5 \cdot 4 \cdot 3 {a}_{5} {\left(x - c\right)}^{2} + \cdots$
.
.
.

By plugging in $x = c$,

f(c)=a_0=0! cdot a_0

f'(c)=a_1=1! cdot a_1

f''(c)=2a_2=2! cdot a_2

f'''(c)=3cdot2 a_3=3! cdot a_3
.
.
.
f^{(n)}(c)=n! cdot a_n

By dividing by n!,

a_n={f^{(n)}(c)}/{n!}

Hence, we have the Taylor series of $f \left(x\right)$, centered at $c$

f(x)=sum_{n=0}^infty{f^{(n)}(c)}/{n!}(x-c)^n.

I hope that this was helpful.