4.2 Taylor–Series

One of the main motivations to investigate infinite series is the desired to write arbitrary functions f(x) as polynomials of infinite degree, i.e.

\begin{eqnarray} f(x)& =& {a}_{0} + {a}_{1}x + {a}_{2}{x}^{2} + {a}_{ 3}{x}^{4} + ...%& \\ & =& {\mathop{∑ }}_{k=0}^{∞}{a}_{ k}{x}^{k}. %&(4.15) \\ \end{eqnarray}

For each fixed x, this is an infinite series of the form S :={\mathop{ \mathop{∑ }}\nolimits }_{k=0}^{∞}{b}_{k} with {b}_{k} := {a}_{k}{x}^{k}. An important question is, e.g., how to determine the coefficients {a}_{k} for a given function f(x), and to decide for which values of x the series for f(x) does converge.

4.2.1 The Exponential Function

We already know one example for such a series which is the exponential function

\begin{eqnarray} \mathop{exp}\nolimits (x) ={ \mathop{∑ }}_{n=0}^{∞}{{x}^{n}\over n!} & & %&(4.16) \\ \end{eqnarray}

You have to remember this formula throughout your whole life. This series converges for arbitrary values of (complex or real) x since (ratio test!)

\begin{eqnarray} R :={\mathop{ lim}}_{n→∞}\left |{{x}^{n+1}∕(n + 1)!\over {x}^{n}∕n!} \right | ={\mathop{ lim}}_{n→∞} {x\over n + 1} = 0.& & %&(4.17) \\ \end{eqnarray}

By use of the this exponential series one defines the famous Euler number

\begin{eqnarray} e :={ \mathop{∑ }}_{n=0}^{∞} {1\over n!} =\mathop{ exp}\nolimits (1).& & %&(4.18) \\ \end{eqnarray}

4.2.2 Power Series for \mathop{sin}\nolimits (x) and \mathop{cos}\nolimits (x)

We repeat our result for the series that define \mathop{sin}\nolimits and \mathop{cos}\nolimits :

\begin{eqnarray} \mathop{sin}\nolimits (x)& :=& {\mathop{∑ }}_{n=0}^{∞}{{(−1)}^{n}{x}^{2n+1}\over (2n + 1)!} = x −{{x}^{3}\over 3!} + {{x}^{5}\over 5!} −{{x}^{7}\over 7!} + ...%& \\ \mathop{cos}\nolimits (x)& :=& {\mathop{∑ }}_{n=0}^{∞}{{(−1)}^{n}{x}^{2n}\over (2n)!} = 1 −{{x}^{2}\over 2!} + {{x}^{4}\over 4!} −{{x}^{6}\over 6!} + ... %&(4.19) \\ \end{eqnarray}

4.2.3 General Case

Now we treat the case of an arbitrary function

\begin{eqnarray} f(x)& =& {a}_{0} + {a}_{1}x + {a}_{2}{x}^{2} + {a}_{ 3}{x}^{4} + ... ={ \mathop{∑ }}_{k=0}^{∞}{a}_{ k}{x}^{k}.%&(4.20) \\ \end{eqnarray}

The above equation means that we try to represent the function by an ‘infinite’ polynomial. In the following, we assume that all derivatives of f(x), i.e. f'(x) =: {f}^{(1)}(x), f''(x) =: {f}^{(2)}(x), f'''(x) =: {f}^{(3)}(x), ... etc. exist. We write

\begin{eqnarray} f(x = 0)& =&{ \left .{a}_{0} + {a}_{1}x + {a}_{2}{x}^{2} + {a}_{ 3}{x}^{3} + ...\right |}_{ x=0} = {a}_{0} %& \\ f'(x = 0)& =&{ \left .{a}_{1} + 2{a}_{2}x + 3{a}_{3}{x}^{2} + 4{a}_{ 4}{x}^{3} + ...\right |}_{ x=0} = {a}_{1} %& \\ f''(x = 0)& =&{ \left .2{a}_{2} + 2 ⋅ 3{a}_{3}x + 3 ⋅ 4{a}_{4}{x}^{2} + ...\right |}_{ x=0} = 1 ⋅ 2{a}_{2}%& \\ {f}^{(3)}(x = 0)& =&{ \left .2 ⋅ 3{a}_{ 3} + 2 ⋅ 3 ⋅ 4{a}_{4}x + ...\right |}_{x=0} = 1 ⋅ 2 ⋅ 3{a}_{3} %& \\ ...& =& ... %& \\ {f}^{(n)}(x = 0)& =& 1 ⋅ 2 ⋅ ... ⋅ n ⋅ {a}_{ n} = n!{a}_{n} %& \\ ⇝ {a}_{n}& =& {{f}^{(n)}(x = 0)\over n!} . %&(4.21) \\ \end{eqnarray}

Collecting all terms, we find the

Taylor expansion of f(x) around x = 0,

\begin{eqnarray} f(x) = {f(x = 0)\over 0!} + {f'(x = 0)\over 1!} x + {f''(x = 0)\over 2!} {x}^{2} + ... ={ \mathop{∑ }}_{n=0}^{∞}{{f}^{(n)}(x = 0)\over n!} {x}^{n}.& & %&(4.22) \\ \end{eqnarray}

We define the truncated Taylor series

\begin{eqnarray}{ f}_{N}(x) :={ \mathop{∑ }}_{n=0}^{N}{{f}^{(n)}(x = 0)\over n!} {x}^{n} ⇝ f(x) ={\mathop{ lim}}_{ N→∞}{f}_{N}(x).& & %&(4.23) \\ \end{eqnarray}

The truncated Taylor series for finite N is often used as an approximation for the function f(x). For larger and larger N, we expect that this approximation of the function f(x) by a polynomial of degree N becomes better and better, if the series converges, of course. Let us look at an example to see how this works:

4.2.4 Example: The Exponential Function \mathop{exp}\nolimits (x)

We calculate the Taylor series of f(x) =\mathop{ exp}\nolimits (x) around x = 0. To do so, we have to calculate the derivatives

\begin{eqnarray}{ f}^{(0)}(x = 0) ≡ f(x = 0)& =&{ \left .{e}^{x}\right |}_{ x=0} = 1%& \\ {f}^{(1)}(x = 0)& =&{ \left .{e}^{x}\right |}_{ x=0} = 1%& \\ {f}^{(2)}(x = 0)& =&{ \left .{e}^{x}\right |}_{ x=0} = 1%& \\ ...& & ... %&(4.24) \\ \end{eqnarray}

This is particularily simple because all the derivatives of {e}^{x} are {e}^{x}. This means that

\begin{eqnarray} f(x)& =& {\mathop{lim}}_{N→∞}{f}_{N}(x) ={\mathop{ lim}}_{N→∞}{\mathop{∑ }}_{n=0}^{N}{{f}^{(n)}(x = 0)\over n!} {x}^{n}%& \\ & =& {\mathop{lim}}_{N→∞}{\mathop{∑ }}_{n=0}^{N}{{x}^{n}\over n!} ={ \mathop{∑ }}_{n=0}^{∞}{{x}^{n}\over n!} . %&(4.25) \\ \end{eqnarray}

We recognise that the Taylor expansion of f(x) =\mathop{ exp}\nolimits (x) just reproduces our old result, Eq. (4.16).


exp˙Taylor

Figure 4.1:
Approximation of the function f(x) =\mathop{ exp}\nolimits (x) by the truncated Taylor Series {f}_{N}(x), Eq. (4.25), for N = 2,4,6. For the interval x ∈ [−3,3] shown here, the approximation of \mathop{exp}\nolimits (x) by {f}_{6}(x) is already very good.

We can apply the ratio test to the series for the exponential. WIth {a}_{n} = {x}^{n}∕n!, we find R ={\mathop{ lim}}_{n→∞}x∕(n + 1) = 0 for every fixed x. The Taylor series for the exponent thus converges for all x.