Taylor Series
- Page ID
- 219495
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Taylor Series
Recall that the Taylor polynomial of degree n for a differentiable function f(x) centered
at x = c is
\( \displaystyle\sum_{k=0}^{n} \frac{f^{(k)}(c)}{k!}(x-c)^k \)
If we let n approach infinity, we arrive at the Taylor Series for f(x) centered at x = c.
| Definition The Taylor Series for f(x) centered at x = c is \[ \displaystyle\sum_{n=0}^{\infty} \frac{f^{(n)}(c)}{k!}(x-c)^n \] |
If c = 0 we call this series the Mclaurin Series for f(x). Recall that the error of the nth degree Taylor Polynomial is given by
f (n+1)(z)
R = (z - c)n+1
(n + 1)!
Hence if
\( \lim\limits_{n\to \infty} R = 0 \)
then the Taylor Series converges.
Example
Find the McLaurin Series expansion for
f(x) = cos(x)
Solution
We construct the following table.
| n | f (n)(x) | f (n)(0) |
| 0 | cos x | 1 |
| 1 | -sin x | 0 |
| 2 | -cos x | -1 |
| 3 | sin x | 0 |
| 4 | cos x | 1 |
| 5 | -sin x | 0 |
| 6 | -cos x | -1 |
Hence we have the series
x2 x4 x6 x8
1 - + - + - ...
2! 4! 6! 8!
Notice that the series only contains even powers of x and even factorials. Even numbers can be represented by 2n. Also notice that this is an alternating series, hence the McLaurin series is
\( \lim\limits_{n\to \infty} \frac{(-1)^n x^{2n}}{(2n)!} \)
Exercises Find the Taylor series expansion for
-
sin(x) centered at \( x = \frac{\pi}{2}\)
-
sinh(x) centered at x = 0
Statistics
The Standard Normal Distribution function is defined by
| Normal Distribution Function
\( f(x) = \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2}{2}} \) |
We define the probability as follows:
|
Definition of Probability \( P(a < x < b) = \int_a^b f(x) dx \) |
Example:
Use McLaurin series and the fact that
\( \displaystyle\sum_{n=0}^{\infty} \frac{x^n}{n!} \)
to approximate the probability of getting a "B" in this class if the average is 70 and the standard deviation is 10 and the instructor grades on a "curve". A "B" corresponds to between 1 and 2 standard deviations from the mean, hence we need to compute
\( P(1 < x < 2) = \int_1^2 \frac{1}{\sqrt{2\pi}}e^-\frac{x^2}{2}dx = \frac{1}{\sqrt{2\pi}} \int_1^2 \displaystyle\sum_{n=0}^{\infty} \frac{(-\frac{x^2}{2})^n}{n!}dx \)
\( = \frac{1}{\sqrt{2\pi}} \displaystyle\sum_{n=0}^{\infty}\int_1^2 \frac{(-\frac{x^2}{2})^n}{n!}dx = \frac{1}{\sqrt{2\pi}} \displaystyle\sum_{n=0}^{\infty}\int_1^2 \frac{(-1)^n x^{2n}}{2^n n!}dx \)
\( = [ \frac{1}{\sqrt{2\pi}} \displaystyle\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{2^n (2n+1) n!}]_1^2 = \frac{1}{\sqrt{2\pi}} \displaystyle\sum_{n=0}^{\infty} \frac{(-1)^n 2^{2n+1}}{2^n (2n+1) n!} - \frac{1}{\sqrt{2\pi}} \displaystyle\sum_{n=0}^{\infty} \frac{(-1)^n }{2^n (2n+1) n!} \)
We can calculate the first many terms on the calculator to get an approximate value of
0.76
In the first quarter you learned a proof that
\( \lim\limits_{x\to 0} \frac{1 - cos(x)}{x} \)
In the second quarter you used L'Hopitals rule. Now we will do it a third way: We have
\( cos(x) = \displaystyle\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2} + \frac{x^4}{24} - ... \)
Hence
x2 x4
1 - cos x = - + ...
2 24
Now divide both sides by x to get
1 - cos x x x3
= - + ...
x 2 24
When x = 0, the right hand side becomes zero, hence so does the left hand side.
Exercise
Prove L'Hopital's Rule using power series.
Addition and Subtraction of Power Series
|
Theorem |
Example:
We have that the power series representation of
1
ln(1 - x) +
1 - x
is
\( \displaystyle\sum_{n=0}^{\infty} \frac{-x^{n+1}}{n+1} + \displaystyle\sum_{n=0}^{\infty} x^n = \displaystyle\sum_{n=0}^{\infty} (\frac{-x^{n+1}}{n+1} + x^n) \)
\( = (-x+1) +(-\frac{x^2}{2} + x) +(-\frac{x^3}{3} + x^2) +(-\frac{x^4}{4} + x^3 + ... \)
\( = 1 +\frac{1}{2}x^2 + \frac{2}{3}x^3 + \frac{3}{4}x^4 + ... \)
Exercise
Find the power Series Representation for
arctan x + arctanh x
Multiplication of Power Series
Suppose we have two power series
\( f(x) = \displaystyle\sum_{n=0}^{\infty} a_n x^n \)
and
\( g(x) = \displaystyle\sum_{n=0}^{\infty} b_n x^n \)
What is the power series for
f(x)g(x)
Consider the following example. Let
\( \frac{e^x}{1-x} = e^x \frac{1}{1-x} = (\displaystyle\sum_{n=0}^{\infty} \frac{x^n}{n!})(\displaystyle\sum_{n=0}^{\infty} x^n) \)
\( = ( 1 + x +\frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + ...)(1 + x + x^2 + x^3 + x^4 + ...)\)
We can multiply these series as though they were finite series. We collect the coefficients:
-
The constant term is 1.
-
The first degree term is 1 + 1 = 2.
-
The second degree term is 1 + 1 + 1/2 = 5/2.
-
The third degree term is 1 + 1 + 1/2 + 1/6 = 8/3
-
The fourth degree term is 1 + 1 + 1/2 + 1/6 + 1/24 = 65/24
We can continue this process indefinitely, or better yet use a computer to generate the terms.
The series is
5 8 65
1 + x + x2 + x3 + x4 + ...
2 3 24
Division of Power Series
Suppose we want to find the power series representation of
\( \frac{arctan(x)}{e^x} = \frac{ \displaystyle\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{2n+1}}{\displaystyle\sum_{n=0}^{\infty} \frac{x^n}{n!}} \)
\( = \frac{x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + ... }{1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + ... } = c_0 + c_1 x + c_2 x^2 + c_3 x^3 + ... \)
We multiply by the denominator and equate coefficients:
(c0 + c1x + c2x2 + ...)(1 + x + x2/2 + x3/6 + x4/24 + ...) = (x - x3/3 + x5/5- x7/7 +...)
-
The constant coefficient gives us c0 = 0.
-
The first degree term gives us c0 + c1 = 1. Hence c1 = 1.
-
The second degree term gives us 1 + c2 = 0. Hence c2 = -1.
-
The third degree term gives us 1/2 - 1 + c3 = -1/3. Hence c3 = 1 - 1/2 - 1/3 = 1/6.
and so on.
The series is
1
x - x2 + x3 + ...
6

