SlideShare a Scribd company logo
A Brief Bit About Taylor Series
                                             John Haga
It was mentioned in class that Taylor series are possibly the most useful consequence of calculus.
In the real world, exactness isn’t always important (talk to any physicist and they’ll tell you that
things get very very blurry when you look on a smaller and smaller scale... the weird thing is, that
the blurriness isn’t just a consequence of our poor ability to see, but is in fact the nature of the
universe itself). Because of this fact, we can get quite far by just knowing how to make approximate
calculations. While we have this freedom, it’s also important to be able to know exactly how close of
an approximation we need to make. The theory behind Taylor series allows us to make controlled
approximations of actual calculations (controlled in the sense that we can calculate with some
certainty how close our approximation is to the real value). This gives us tremendous power: we
can take nasty smelly functions like ex and ln(x) and express them in terms of basic arithmetic
operations that can be handled by a computer. In fact, when you plug in ln(2.3) into your calculator
and 0.832909122935 pops out, your calculator is NOT actually evaluating ln(2.3), but instead is
finding a close approximation using algorithms developed that utilize the fundamental ideas behind
Taylor series. This is almost always adequate for government work.
Now that you know how powerful this tool is, let’s see how it works by working through an example.
Recall that the Taylor series for a given function f (x) is given by the following formula:
                                                      ∞
                                                            f (k) (c)
                               f (x) around x = c =                   (x − c)k
                                                               k!
                                                      k=0

What does this gobbledygook mean? It means that if we’re extremely lucky, we can find a power
series representation for our function that EQUALS our function (at certain places)! This turns
f (x) into
                                 a0 + a1 x + a2 x2 + · · · + ai xi + · · ·
So what? Well.. if this infinite sum converges to our function, then we have that
                               f (x) ≈ a0 + a1 x + a2 x2 + · · · + an xn
which is great. Why is it great? Because it can be calculated with a finite number of arithmetic
operations (i.e. so easy a computer can do it). Of course, this is only beneficial if we can USE it
somehow. We can. To see this, let’s calculate the Taylor series for the function f (x) = cos(x), find
the interval of convergence of the series, and then show that on the interval, the series is in fact
equal to cos(x).


Step 1: Calculate the Taylor Series
To calculate the Taylor Series, we need to know the point about which we’re going to expand
(the point c). This is either given information, or is left up to you to choose. In the event that
you have to choose, pick a value for c at which the function behaves well (i.e. don’t pick c = 0
for f (x) = ln(x)). Since f (x) = cos(x) behaves well everywhere, we can pick any c we like. For
simplicity, let’s expand cos(x) about c = 0 (recall that in this case, the series we obtain is given
the special name Maclaurin series).
As always, the ugliest part of the calculation is finding a general expression for f (k) (c). Letting
c = 0 let’s make a table of values in hopes of figuring out what such an expression would be:
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


So it appears that f (n) (0) = 1 or −1 when n is even, and 0 otherwise. Writing out the series for
cos(x) we get a sum that looks something like this:
         ∞
              f (k) (c)               1 0   0     −1 2  0    1    0     −1 6
                        (x − c)k =       x + x1 +    x + x3 + x4 + x5 +    x + ···
                 k!                   0!    1!    2!    3!   4!   5!    6!
        k=0
                                             1 2     1    1
                                = 1−            x + x4 − x6 + · · ·
                                             2!     4!    6!
                                       ∞
                                                    1 2k
                                =           (−1)k       x
                                                  (2k)!
                                      k=0

And this is our Taylor series for f (x) = cos(x) taken about the point x = 0. Excellent.




Step 2: Finding the Interval of Convergence: Now that we have our Taylor series, it’s
important to know exactly where it realistically represents our function. The first thing we must
do is see where the series itself actually converges (since if it diverges someplace, it can’t hardly
represent our function). To get this information, we use the Ratio Test:
                                                                    1
                                     ak+1               (−1)k+1 (2(k+1))! x2(k+1)
                            lim               =   lim                   1
                            k→∞       ak          k→∞           (−1)k (2k)! x2k
                                                          (2k)!
                                              =   lim             x2
                                                  k→∞   (2k + 2)!
                                                                  1
                                              = |x2 | · lim
                                                       k→∞ (2k + 2)(2k + 1)
                                                  2
                                              = |x | · 0
                                              = 0<1
This gives us that the Taylor series centered at c evaluated at some point x is given by
                                             1 2   1    1
                                S(x) = 1 −      x + x4 − x6 + · · ·.
                                             2!    4!   6!
Keep in mind that S(x) is a function. We have that the Taylor series for cos(x) converges absolutely
for all x (i.e. that the radius of convergence is ∞). Wonderful. So what? Is S(x) = cos(x)? Who
knows. Let’s figure it out.



Step 3: Demonstrating that the Taylor series for cos(x) converges to cos(x): Before we
start, let’s restate Taylor’s theorem:
THEOREM: Suppose that f has (n + 1) derivatives on the interval (c − r, c + r) for some r > 0.
Then, for x ∈ (c − r, c + r), f (x) ≈ Pn (x) and the error in using Pn to approximate f (x) is

                                           Rn = f (x) − Pn (x)

and moreover
                                                 f (n+1) (z)
                                    Rn (x) =                 (x − c)n+1
                                                  (n + 1)!
for some number z between x and c.                                                                     •
The proof of Taylor’s Theorem is given in your text, and you can use it freely in your homework
and on quizzes without proving it. If lim Rn (x) = 0 for all values of x then we have that our series
                                      n→∞
function S(x) = cos(x). Now we calculate Rn (x). We have that every derivative of cos(x) is either
± cos(x) or ± sin(x) and for all z we have that −1 ≤ ± cos(z), ± sin(z) ≤ 1. Recalling that in this
case that c = 0 we can write:

                             −1            f (n+1) (z) n+1      1
                                    xn+1 ≤            x    ≤          xn+1
                           (n + 1)!         (n + 1)!         (n + 1)!
                                                                                 ∞
                                                                                          1
Just as in class, we will indirectly calculate the limit of interest. Consider                  xn+1 . We
                                                                                       (n + 1)!
                                                                                 n=0
can use the ratio test to test the convergence of this series:
                                                          1       (n+1)+1
                                    an+1              ((n+1)+1)! x
                              lim            =     lim      1     n+1
                             n→∞     an           n→∞
                                                          (n+1)! x
                                                          1
                                             =     lim         x
                                                  n→∞  (n + 2)
                                                               1
                                             = |x| · lim
                                                     n→∞ (n + 2)
                                             = |x| · 0
                                             = 0<1
                                                                                       1
Which gives us that the series converges for all x. In fact, this means that lim            xn+1 = 0
                                                                               n→∞ (n + 1)!
for all x because if it weren’t 0, the series would diverge by the kth-term test. Thus Rn (x) → 0 as
n → ∞ for all x, as desired. This means that the Taylor series function for cos(x), the function we
called S(x) is equal to cos(x) everywhere on the real line.

Part 4: Using the Taylor Expansion to Approximate cos(x) at some point of interest, to
given degree: Let’s pretend we’re a calculator and someone presses cos(0.1) and we’re expected
to show 8 significant figures of accuracy (i.e. as many as will show in our little window). What
this means, is that we should use the Taylor expansion of cos(x) to obtain an estimate of cos(0.1)
accurate to within 10−7 . How far do we have to sum? Let’s see.
   Since we’ve expanded cos(x) around x = 0, and by Taylor’s Theorem, we have that Rn (x) =
f n+1 (z) n+1
 (n+1)! x  for some z between 0 and 0.1. Since −1 ≤ f (n+1) (z) < 1 we have that

                                f (n+1) (z)                1
                                            (0.1 − 0) ≤          (0.1)
                                 (n + 1)!               (n + 1)!

and as long as the right hand side is less than 10−7 we have the requisite accuracy. We can solve
this equality by using trial and error. It turns out that as long as n > 9 the inequality holds (you
may groan when I write “trial and error”, but it only takes about a minute with a calculator to
find that n larger than 9 will work). Using Excel to calculate partial sums of this expansion, one
can obtain the following table:
                                                              n
                                         (−1)n 2n                  (−1)k 2k
                           n      an =          0.1   Sn =                0.1
                                          (2n)!                     (2k)!
                                                             k=0


                           0               1                       1

                           1             −0.005               0.995

                           2       4.16667 × 10−6          0.99500417

                           3      −1.38889 × 10−9          0.99500417


Notice that we didn’t have to go out as far as n = 9. The approximation that we used before
merely tells us that if we go out as far as n = 9, we are guaranteed the accuracy we need (but in
some situations it overshoots by a lot as you can see). Plugging cos(0.1) into your a calculator we
obtain cos(0.1) ≈ 0.995004165 which agrees with our calculated approximation.

More Related Content

What's hot

Sect1 2
Sect1 2Sect1 2
Sect1 2
inKFUPM
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)
asghar123456
 
Lesson 27: Integration by Substitution, part II (Section 10 version)
Lesson 27: Integration by Substitution, part II (Section 10 version)Lesson 27: Integration by Substitution, part II (Section 10 version)
Lesson 27: Integration by Substitution, part II (Section 10 version)
Matthew Leingang
 
Lesson 16: Derivatives of Logarithmic and Exponential Functions
Lesson 16: Derivatives of Logarithmic and Exponential FunctionsLesson 16: Derivatives of Logarithmic and Exponential Functions
Lesson 16: Derivatives of Logarithmic and Exponential Functions
Matthew Leingang
 
Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)
Matthew Leingang
 
Lesson 18: Maximum and Minimum Values (slides)
Lesson 18: Maximum and Minimum Values (slides)Lesson 18: Maximum and Minimum Values (slides)
Lesson 18: Maximum and Minimum Values (slides)
Matthew Leingang
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
Matthew Leingang
 
Roots equations
Roots equationsRoots equations
Roots equations
oscar
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)
Matthew Leingang
 
Stuff You Must Know Cold for the AP Calculus BC Exam!
Stuff You Must Know Cold for the AP Calculus BC Exam!Stuff You Must Know Cold for the AP Calculus BC Exam!
Stuff You Must Know Cold for the AP Calculus BC Exam!
A Jorge Garcia
 
Prml
PrmlPrml
Prml
syou6162
 
Profº Marcelo Santos Chaves Cálculo I (limites trigonométricos)
Profº Marcelo Santos Chaves   Cálculo I (limites trigonométricos)Profº Marcelo Santos Chaves   Cálculo I (limites trigonométricos)
Profº Marcelo Santos Chaves Cálculo I (limites trigonométricos)
MarcelloSantosChaves
 
Calculus cheat sheet_integrals
Calculus cheat sheet_integralsCalculus cheat sheet_integrals
Calculus cheat sheet_integrals
UrbanX4
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
Matthew Leingang
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Matthew Leingang
 
Hw2 s
Hw2 sHw2 s
Hw2 s
Nick Nick
 
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
Michael Soltys
 

What's hot (17)

Sect1 2
Sect1 2Sect1 2
Sect1 2
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)
 
Lesson 27: Integration by Substitution, part II (Section 10 version)
Lesson 27: Integration by Substitution, part II (Section 10 version)Lesson 27: Integration by Substitution, part II (Section 10 version)
Lesson 27: Integration by Substitution, part II (Section 10 version)
 
Lesson 16: Derivatives of Logarithmic and Exponential Functions
Lesson 16: Derivatives of Logarithmic and Exponential FunctionsLesson 16: Derivatives of Logarithmic and Exponential Functions
Lesson 16: Derivatives of Logarithmic and Exponential Functions
 
Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)Lesson 8: Basic Differentation Rules (slides)
Lesson 8: Basic Differentation Rules (slides)
 
Lesson 18: Maximum and Minimum Values (slides)
Lesson 18: Maximum and Minimum Values (slides)Lesson 18: Maximum and Minimum Values (slides)
Lesson 18: Maximum and Minimum Values (slides)
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
 
Roots equations
Roots equationsRoots equations
Roots equations
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)
 
Stuff You Must Know Cold for the AP Calculus BC Exam!
Stuff You Must Know Cold for the AP Calculus BC Exam!Stuff You Must Know Cold for the AP Calculus BC Exam!
Stuff You Must Know Cold for the AP Calculus BC Exam!
 
Prml
PrmlPrml
Prml
 
Profº Marcelo Santos Chaves Cálculo I (limites trigonométricos)
Profº Marcelo Santos Chaves   Cálculo I (limites trigonométricos)Profº Marcelo Santos Chaves   Cálculo I (limites trigonométricos)
Profº Marcelo Santos Chaves Cálculo I (limites trigonométricos)
 
Calculus cheat sheet_integrals
Calculus cheat sheet_integralsCalculus cheat sheet_integrals
Calculus cheat sheet_integrals
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
 
Hw2 s
Hw2 sHw2 s
Hw2 s
 
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
The proof complexity of matrix algebra - Newton Institute, Cambridge 2006
 

Similar to Taylor problem

03 truncation errors
03 truncation errors03 truncation errors
03 truncation errors
maheej
 
Identidades
IdentidadesIdentidades
Identidades
mchamorro2
 
Taylor series
Taylor seriesTaylor series
Taylor series
John Weiss
 
0708 ch 7 day 8
0708 ch 7 day 80708 ch 7 day 8
0708 ch 7 day 8
festivalelmo
 
Cs229 cvxopt
Cs229 cvxoptCs229 cvxopt
Cs229 cvxopt
cerezaso
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
asghar123456
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Mel Anthony Pepito
 
Cse41
Cse41Cse41
Ch 04 Arithmetic Coding ( P P T)
Ch 04  Arithmetic  Coding ( P P T)Ch 04  Arithmetic  Coding ( P P T)
Ch 04 Arithmetic Coding ( P P T)
anithabalaprabhu
 
Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)
anithabalaprabhu
 
Fourier 3
Fourier 3Fourier 3
Fourier 3
nugon
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementation
Quasar Chunawala
 
Assignment6
Assignment6Assignment6
Assignment6
asghar123456
 
Class 10 Maths Ch Polynomial PPT
Class 10 Maths Ch Polynomial PPTClass 10 Maths Ch Polynomial PPT
Class 10 Maths Ch Polynomial PPT
Sanjayraj Balasara
 
8-6 Solving Rational Functions
8-6 Solving Rational Functions8-6 Solving Rational Functions
8-6 Solving Rational Functions
rfrettig
 
DEV
DEVDEV
DEV
DEVDEV
1010n3a
1010n3a1010n3a
1010n3a
Faiza Saher
 
Roots equations
Roots equationsRoots equations
Roots equations
oscar
 
Varian, microeconomic analysis, solution book
Varian, microeconomic analysis, solution bookVarian, microeconomic analysis, solution book
Varian, microeconomic analysis, solution book
José Antonio PAYANO YALE
 

Similar to Taylor problem (20)

03 truncation errors
03 truncation errors03 truncation errors
03 truncation errors
 
Identidades
IdentidadesIdentidades
Identidades
 
Taylor series
Taylor seriesTaylor series
Taylor series
 
0708 ch 7 day 8
0708 ch 7 day 80708 ch 7 day 8
0708 ch 7 day 8
 
Cs229 cvxopt
Cs229 cvxoptCs229 cvxopt
Cs229 cvxopt
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
Lesson 14: Derivatives of Logarithmic and Exponential Functions (slides)
 
Cse41
Cse41Cse41
Cse41
 
Ch 04 Arithmetic Coding ( P P T)
Ch 04  Arithmetic  Coding ( P P T)Ch 04  Arithmetic  Coding ( P P T)
Ch 04 Arithmetic Coding ( P P T)
 
Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)
 
Fourier 3
Fourier 3Fourier 3
Fourier 3
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementation
 
Assignment6
Assignment6Assignment6
Assignment6
 
Class 10 Maths Ch Polynomial PPT
Class 10 Maths Ch Polynomial PPTClass 10 Maths Ch Polynomial PPT
Class 10 Maths Ch Polynomial PPT
 
8-6 Solving Rational Functions
8-6 Solving Rational Functions8-6 Solving Rational Functions
8-6 Solving Rational Functions
 
DEV
DEVDEV
DEV
 
DEV
DEVDEV
DEV
 
1010n3a
1010n3a1010n3a
1010n3a
 
Roots equations
Roots equationsRoots equations
Roots equations
 
Varian, microeconomic analysis, solution book
Varian, microeconomic analysis, solution bookVarian, microeconomic analysis, solution book
Varian, microeconomic analysis, solution book
 

More from dinhmyhuyenvi

Các từ theo sau chắc chắn là v ing
Các từ theo sau chắc chắn là v ingCác từ theo sau chắc chắn là v ing
Các từ theo sau chắc chắn là v ing
dinhmyhuyenvi
 
Say speak talk tell
Say    speak      talk      tellSay    speak      talk      tell
Say speak talk tell
dinhmyhuyenvi
 
Cách đưa ra lời cảnh báo
Cách đưa ra lời cảnh báoCách đưa ra lời cảnh báo
Cách đưa ra lời cảnh báo
dinhmyhuyenvi
 
13 quy tắc trọng âm trong tiếng anh
13 quy tắc trọng âm trong tiếng anh13 quy tắc trọng âm trong tiếng anh
13 quy tắc trọng âm trong tiếng anh
dinhmyhuyenvi
 
Chap2
Chap2Chap2
Ch11review
Ch11reviewCh11review
Ch11review
dinhmyhuyenvi
 
Cc10 3 geo_har
Cc10 3 geo_harCc10 3 geo_har
Cc10 3 geo_har
dinhmyhuyenvi
 
11 ma1aexpandednoteswk3
11 ma1aexpandednoteswk311 ma1aexpandednoteswk3
11 ma1aexpandednoteswk3
dinhmyhuyenvi
 

More from dinhmyhuyenvi (8)

Các từ theo sau chắc chắn là v ing
Các từ theo sau chắc chắn là v ingCác từ theo sau chắc chắn là v ing
Các từ theo sau chắc chắn là v ing
 
Say speak talk tell
Say    speak      talk      tellSay    speak      talk      tell
Say speak talk tell
 
Cách đưa ra lời cảnh báo
Cách đưa ra lời cảnh báoCách đưa ra lời cảnh báo
Cách đưa ra lời cảnh báo
 
13 quy tắc trọng âm trong tiếng anh
13 quy tắc trọng âm trong tiếng anh13 quy tắc trọng âm trong tiếng anh
13 quy tắc trọng âm trong tiếng anh
 
Chap2
Chap2Chap2
Chap2
 
Ch11review
Ch11reviewCh11review
Ch11review
 
Cc10 3 geo_har
Cc10 3 geo_harCc10 3 geo_har
Cc10 3 geo_har
 
11 ma1aexpandednoteswk3
11 ma1aexpandednoteswk311 ma1aexpandednoteswk3
11 ma1aexpandednoteswk3
 

Recently uploaded

clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 

Taylor problem

  • 1. A Brief Bit About Taylor Series John Haga It was mentioned in class that Taylor series are possibly the most useful consequence of calculus. In the real world, exactness isn’t always important (talk to any physicist and they’ll tell you that things get very very blurry when you look on a smaller and smaller scale... the weird thing is, that the blurriness isn’t just a consequence of our poor ability to see, but is in fact the nature of the universe itself). Because of this fact, we can get quite far by just knowing how to make approximate calculations. While we have this freedom, it’s also important to be able to know exactly how close of an approximation we need to make. The theory behind Taylor series allows us to make controlled approximations of actual calculations (controlled in the sense that we can calculate with some certainty how close our approximation is to the real value). This gives us tremendous power: we can take nasty smelly functions like ex and ln(x) and express them in terms of basic arithmetic operations that can be handled by a computer. In fact, when you plug in ln(2.3) into your calculator and 0.832909122935 pops out, your calculator is NOT actually evaluating ln(2.3), but instead is finding a close approximation using algorithms developed that utilize the fundamental ideas behind Taylor series. This is almost always adequate for government work. Now that you know how powerful this tool is, let’s see how it works by working through an example. Recall that the Taylor series for a given function f (x) is given by the following formula: ∞ f (k) (c) f (x) around x = c = (x − c)k k! k=0 What does this gobbledygook mean? It means that if we’re extremely lucky, we can find a power series representation for our function that EQUALS our function (at certain places)! This turns f (x) into a0 + a1 x + a2 x2 + · · · + ai xi + · · · So what? Well.. if this infinite sum converges to our function, then we have that f (x) ≈ a0 + a1 x + a2 x2 + · · · + an xn which is great. Why is it great? Because it can be calculated with a finite number of arithmetic operations (i.e. so easy a computer can do it). Of course, this is only beneficial if we can USE it somehow. We can. To see this, let’s calculate the Taylor series for the function f (x) = cos(x), find the interval of convergence of the series, and then show that on the interval, the series is in fact equal to cos(x). Step 1: Calculate the Taylor Series To calculate the Taylor Series, we need to know the point about which we’re going to expand (the point c). This is either given information, or is left up to you to choose. In the event that you have to choose, pick a value for c at which the function behaves well (i.e. don’t pick c = 0 for f (x) = ln(x)). Since f (x) = cos(x) behaves well everywhere, we can pick any c we like. For simplicity, let’s expand cos(x) about c = 0 (recall that in this case, the series we obtain is given the special name Maclaurin series). As always, the ugliest part of the calculation is finding a general expression for f (k) (c). Letting c = 0 let’s make a table of values in hopes of figuring out what such an expression would be:
  • 2. 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 So it appears that f (n) (0) = 1 or −1 when n is even, and 0 otherwise. Writing out the series for cos(x) we get a sum that looks something like this: ∞ f (k) (c) 1 0 0 −1 2 0 1 0 −1 6 (x − c)k = x + x1 + x + x3 + x4 + x5 + x + ··· k! 0! 1! 2! 3! 4! 5! 6! k=0 1 2 1 1 = 1− x + x4 − x6 + · · · 2! 4! 6! ∞ 1 2k = (−1)k x (2k)! k=0 And this is our Taylor series for f (x) = cos(x) taken about the point x = 0. Excellent. Step 2: Finding the Interval of Convergence: Now that we have our Taylor series, it’s important to know exactly where it realistically represents our function. The first thing we must do is see where the series itself actually converges (since if it diverges someplace, it can’t hardly represent our function). To get this information, we use the Ratio Test: 1 ak+1 (−1)k+1 (2(k+1))! x2(k+1) lim = lim 1 k→∞ ak k→∞ (−1)k (2k)! x2k (2k)! = lim x2 k→∞ (2k + 2)! 1 = |x2 | · lim k→∞ (2k + 2)(2k + 1) 2 = |x | · 0 = 0<1
  • 3. This gives us that the Taylor series centered at c evaluated at some point x is given by 1 2 1 1 S(x) = 1 − x + x4 − x6 + · · ·. 2! 4! 6! Keep in mind that S(x) is a function. We have that the Taylor series for cos(x) converges absolutely for all x (i.e. that the radius of convergence is ∞). Wonderful. So what? Is S(x) = cos(x)? Who knows. Let’s figure it out. Step 3: Demonstrating that the Taylor series for cos(x) converges to cos(x): Before we start, let’s restate Taylor’s theorem: THEOREM: Suppose that f has (n + 1) derivatives on the interval (c − r, c + r) for some r > 0. Then, for x ∈ (c − r, c + r), f (x) ≈ Pn (x) and the error in using Pn to approximate f (x) is Rn = f (x) − Pn (x) and moreover f (n+1) (z) Rn (x) = (x − c)n+1 (n + 1)! for some number z between x and c. • The proof of Taylor’s Theorem is given in your text, and you can use it freely in your homework and on quizzes without proving it. If lim Rn (x) = 0 for all values of x then we have that our series n→∞ function S(x) = cos(x). Now we calculate Rn (x). We have that every derivative of cos(x) is either ± cos(x) or ± sin(x) and for all z we have that −1 ≤ ± cos(z), ± sin(z) ≤ 1. Recalling that in this case that c = 0 we can write: −1 f (n+1) (z) n+1 1 xn+1 ≤ x ≤ xn+1 (n + 1)! (n + 1)! (n + 1)! ∞ 1 Just as in class, we will indirectly calculate the limit of interest. Consider xn+1 . We (n + 1)! n=0 can use the ratio test to test the convergence of this series: 1 (n+1)+1 an+1 ((n+1)+1)! x lim = lim 1 n+1 n→∞ an n→∞ (n+1)! x 1 = lim x n→∞ (n + 2) 1 = |x| · lim n→∞ (n + 2) = |x| · 0 = 0<1 1 Which gives us that the series converges for all x. In fact, this means that lim xn+1 = 0 n→∞ (n + 1)! for all x because if it weren’t 0, the series would diverge by the kth-term test. Thus Rn (x) → 0 as
  • 4. n → ∞ for all x, as desired. This means that the Taylor series function for cos(x), the function we called S(x) is equal to cos(x) everywhere on the real line. Part 4: Using the Taylor Expansion to Approximate cos(x) at some point of interest, to given degree: Let’s pretend we’re a calculator and someone presses cos(0.1) and we’re expected to show 8 significant figures of accuracy (i.e. as many as will show in our little window). What this means, is that we should use the Taylor expansion of cos(x) to obtain an estimate of cos(0.1) accurate to within 10−7 . How far do we have to sum? Let’s see. Since we’ve expanded cos(x) around x = 0, and by Taylor’s Theorem, we have that Rn (x) = f n+1 (z) n+1 (n+1)! x for some z between 0 and 0.1. Since −1 ≤ f (n+1) (z) < 1 we have that f (n+1) (z) 1 (0.1 − 0) ≤ (0.1) (n + 1)! (n + 1)! and as long as the right hand side is less than 10−7 we have the requisite accuracy. We can solve this equality by using trial and error. It turns out that as long as n > 9 the inequality holds (you may groan when I write “trial and error”, but it only takes about a minute with a calculator to find that n larger than 9 will work). Using Excel to calculate partial sums of this expansion, one can obtain the following table: n (−1)n 2n (−1)k 2k n an = 0.1 Sn = 0.1 (2n)! (2k)! k=0 0 1 1 1 −0.005 0.995 2 4.16667 × 10−6 0.99500417 3 −1.38889 × 10−9 0.99500417 Notice that we didn’t have to go out as far as n = 9. The approximation that we used before merely tells us that if we go out as far as n = 9, we are guaranteed the accuracy we need (but in some situations it overshoots by a lot as you can see). Plugging cos(0.1) into your a calculator we obtain cos(0.1) ≈ 0.995004165 which agrees with our calculated approximation.