3.12 Taylor’s Series
Power Series is a smooth function (one can differentiate it infinitely many times: \(C^{\infty}(-R,R)\)) on \((-R, R)\) and \(f'(x) = \sum n a_n x^{n-1}, \quad \forall x \in (-R, R)\) (we can differentiate term by term)
Now, let us think the other way round.
Which functions admit an expression as a power series?
Note that if a function \(f(x) = \sum a_n x^n\) admits such an expression on an interval \((-R, R)\), then it must be infinitely differentiable on such interval.
Hence, not all functions admit the expression as a power series.
So, let us try to figure out some properties of the functions that DO admit the expression.
Theorem
If a function \(f\) admits an expression as a power series \(f(x)=\sum_{n=0}^{\infty}a_nx^n,\forall x\in(-R,R)\)
Then the coefficients of the series are uniquely determined by \(a_n = \frac{f^{(n)}(0)}{n!}, \quad \forall n \geq 0\)
Proof
Suppose \(f(x) = \sum_{n=0}^{\infty} a_n x^n\) on \((-R, R)\).
\(f(0) = a_0\)
\(f'(x) = \sum_{n=1}^{\infty} n a_n x^{n-1} \Rightarrow f'(0) = a_1\)
\(f''(x) = \sum_{n=2}^{\infty} n(n-1) a_n x^{n-2} \Rightarrow f''(0) = 2 a_2 \Rightarrow a_2 = \frac{f''(0)}{2} = \frac{f''(0)}{2!}\)
\(f'''(x) = \sum_{n=3}^{\infty} n(n-1)(n-2) a_n x^{n-3} \Rightarrow f'''(0) = 6 a_3 \Rightarrow a_3 = \frac{f'''(0)}{6} = \frac{f'''(0)}{3!}\)
\(f^{(k)}(0) = k! a_k \Rightarrow a_k = \frac{f^{(k)}(0)}{k!}\)
Now two questions arise:
Given a function \(f\) which is infinitely differentiable. Can we describe it as a power series?
Assume we can construct such a power series. Does it converge to the function \(f\)? On which interval?
By the theorem above, we can always associate \(f\) with a power series
Definition
Let \(f\) be a function that is infinitely differentiable at \(x = 0\).
Its Taylor series at \(x = 0\) is the power series given by \(\sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}x^{n}\)
Remark
As any power series, the Taylor series of a function converges on an interval \((-R, R)\).
Does the value of the function coincide with the value of the series on such an interval?
Observe that both the function \(f\) and its Taylor series coincide at all the derivatives at \(x = 0\).
We may rephrase the question above as follows:
Given two functions \(f\) and \(g\) that are infinitely differentiable at \(x = 0\) and satisfy that \(f^{(n)}(0) = g^{(n)}(0), \quad \forall n \geq 0\)
Is it true that \(f(x) = g(x)\) for some \(R > 0\)?
The answer is clearly NO!
The first example was found by Cauchy.
Now, the next question is the following:
Is this series equal to the function \(f(x) = \sin(x)\)?
The series is a limit of the sequence of functions given by partial sums \(S_n(x)\).
So, if the series is a function, this function is the limit of the sequence of functions \((S_n(x))_{n \geq 0}\) which must coincide with \(f(x) = \sin(x)\).
This leads us to consider the function \(R_n(x) = f(x) - S_n(x)\)
Which gives us the error between the original function and the function given by the partial sums, which is actually the \(n\)-th Taylor polynomial of the function.
In conclusion
The following theorem gives us an estimate for the error function \(R_n(x)\). In particular, this would help us to determine whether \(R_n(x)\) tends to 0 or not.
Theorem (Lagrange's Remainder Theorem)
Let \(f\) be a function that is \((n+1)\)-times differentiable on an open interval \((-R, R)\) with \(R > 0\), and define \(a_n = \frac{f^{(n)}(0)}{n!}, \quad \forall 0 \leq n \leq k\), \(S_k(x) = \sum_{n=0}^{k} a_n x^n\)
Then, given \(x \neq 0\) in \((-R, R)\), there exists \(c \in (-R, R)\) with \(0 < |c| < |x|\), such that \(R_{k}(x) = \frac{f^{(k+1)}(c)}{(k+1)!}x^{k+1}\)
Remark
\(E_N(0)=0,E_N^{(k)}(0)=0\)
Example
\(f(x) = \sin(x)\)
\(f(0) = \sin(0) = 0\)
\(f'(0) = \cos(0) = 1\)
\(f''(0) = -\sin(0) = 0\)
\(f'''(0) = -\cos(0) = -1\)
\(S_{N,0}(x)=0+\frac{1}{1!}x+\frac{0}{2!}x^{2}+\frac{-1}{3!}x^{3}+\frac{1}{5!}x^{5} -\frac{1}{7!}x^{7}+\dots+ \begin{cases} 0 & \text{if }N\text{ is even} \\ \frac{1}{N!}x^{N} & \text{if }N\equiv1\mod4 \\ \frac{-1}{N!}x^{N} & \text{if }N\equiv3\mod4 \end{cases}=\sum_{k=0}^{\infty}\frac{(-1)^{k}}{(2k+1)!}x^{2k+1}\)
Check: Is this series converges to \(\sin x\)?
Apply D'Alambert Criterium
Let \(b_{k}=\frac{(-1)^{k}}{(2k+1)!}x^{2k+1}\) where \(x\) is fixed, then \(\lim_{k\to\infty}\frac{\left|b_{k+1}\right|}{\left|b_{k}\right|}=\lim_{k\to\infty} \frac{\left|\frac{(-1)^{k+1}}{(2k+3)!}x^{2k+3}\right|}{\left|\frac{(-1)^{k}}{(2k+1)!}x^{2k+1}\right|} =\lim_{k\to\infty}\frac{x^{2}}{\left(2k+3\right)\left(2k+2\right)}=0<1,\forall x\)
We get \(S(x)=\sin x\) if \(E_N(x)\to 0,N\to\infty\)
Let's analyze \(|E_{N}(x)|=\left|\frac{f^{(k+1)}(c)}{(k+1)!}x^{k+1}\right|=\frac{\left|f^{(k+1)}(c)\right|}{(k+1)!} x^{k+1}\)
Note that \(f^{(N+1)}\left(x\right)=\pm\sin x,\pm\cos x\Rightarrow\left|f^{(N+1)}\left(x\right )\right|\leq1\)
Then \(\frac{\left|f^{(k+1)}(c)\right|}{(k+1)!}x^{k+1}\leq\frac{\left|x\right|^{N+1}}{\left(N+1\right)!} \rightarrow0\), thus \(E_N(x)\rightarrow 0,N\to\infty,\forall x\)
Thus \(\sin x=\sum_{k=0}^{\infty}\frac{(-1)^{k}}{(2k+1)!}x^{2k+1},\forall x\in\mathbb{R}\)
Also, since term by term differentiability, \(\cos x=\sin^{\prime}(x)=\sum_{k=1}^{\infty}\frac{(2k+1)(-1)^{k}x^{2k}}{(2k+1)!}= \sum_{k=1}^{\infty}\frac{(-1)^{k}x^{2k}}{(2k)!}\)