Numerical Analysis in Engineering: Taylor Series

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Module 2

Numerical Analysis in
Engineering: Taylor
Series
M2: Numerical Analysis in
Engineering: Taylor Series

L1: TAYLOR SERIES


Learning Outcomes
• Define the Taylor Series Expansion
• Compute the approximate of a function using
zero-to-fourth order Taylor Series Expansion
Not all functions are friendly!!!
This is way more
1. Polynomial Function friendly!

𝑓 𝑥 = 𝑎 + 𝑏𝑥 + 𝑐𝑥 2 + 𝑑𝑥 3 + 𝑒𝑥 4 …
can be evaluated arithmetically, easy to differentiate and integrate

2. Other Non-Linear Functions


1 𝑓 𝑥 = sin 𝑥 𝑓 𝑥 = 𝑒𝑥 𝑓 𝑥 = ln(𝑥)
𝑓 𝑥 =
𝑥−1
sin 𝑥 hard to integrate using
cannot be directly evaluated using න simple integrating
arithmetic, sometimes hard to differentiate 𝑥 methods
and integrate
Fortunately, we can still be friends with the non-
linear functions!
But How??? : WE ARE GOING TO APPROXIMATE THEM!

Method of Approximation : TAYLOR SERIES EXPANSION

This is how it works!!!


𝑓 𝑥 = sin 𝑥
Taylor Series Manipulation 𝑓 𝑥 = 𝑎 + 𝑏𝑥 + 𝑐𝑥 2 …
𝑓 𝑥 = ln(𝑥)

We need to change these… …into this.


Prior to Taylor Series Expansion, let’s have first the
Maclaurin Series Expansion.
The Maclaurin Series Expansion
is used to approximate functions using the power series form below.
𝑓 𝑥 = 𝑐0 + 𝑐1 𝑥 + 𝑐2 𝑥 2 + 𝑐3 𝑥 3 + ⋯
where c’s are constants to be determined, and assuming that f(x) exists
within certain interval of convergence.
How to solve the c’s?? : WE ARE GOING TO TAKE SUCCESSIVE DERIVATIVES
Successive derivatives when x = 0, we find…
𝑓 ′ 𝑥 = 𝑐1 + 2𝑐2 𝑥 + 3𝑐3 𝑥 2 + ⋯ 𝑓 ′ 0 = 𝑐1

𝑓 ′′ 𝑥 = 2! 𝑐2 + 3! 𝑐3 𝑥 + 4 ∙ 3𝑐4 𝑥 2 … 𝑓 ′′ 0 = 2! 𝑐2

𝑓 ′′′ 𝑥 = 3! 𝑐3 + 4! 𝑐4 𝑥 + 5 ∙ 4 ∙ 3𝑐5 𝑥 2 … 𝑓 ′′′ 0 = 3! 𝑐3


The Maclaurin Series Expansion
Solving for c’s and substituting in the first equation…
We turn this… 𝑓 𝑥 = 𝑐0 + 𝑐1 𝑥 + 𝑐2 𝑥 2 + 𝑐3 𝑥 3 + ⋯
..into this. 𝑓 ′′ 0 𝑓 𝑛 0
𝑓 𝑥 = 𝑓 0 + 𝑓′ 0 𝑥 + 𝑥2 + ⋯ + 𝑥𝑛 + ⋯
2! 𝑛!

𝑓 ′ 0 = 𝑐1
It is formulated and
𝑓 ′′ 0 = 2! 𝑐2 named for the Scottish
mathematician Colin
𝑓 ′′′ 𝑥 = 3! 𝑐3 Maclaurin (1698-1746)
Sadly, not all non-linear functions can be
approximated by the Maclaurin Series
These are…
𝑓 𝑥 = ln(𝑥) 𝑓 𝑥 = cot(𝑥) 𝑓 𝑥 = 𝑥3

Reasons…
The f(x) and all of its derivatives does not exist at x = 0.
Well, let’s move on and have some problems
instead…
Maclaurin Series Problem 1:
Problem Statement: Obtain the Maclaurin’s Series for sin x.
Solution:
1. Target polynomial approximation (Maclaurin Series Expansion)
Maclaurin Series Problem 1:
Problem Statement: Obtain the Maclaurin’s Series for sin x.
Solution:
2. Solve the successive derivatives of the given functions
Maclaurin Series Problem 1:
Problem Statement: Obtain the Maclaurin’s Series for sin x.
Solution:
3. Substituting and Writing the equivalent Maclaurin Expansion
Maclaurin Series Problem 2:
Problem Statement: Estimate the value of sin 54 degrees using the
Maclaurin Series up to 4 terms. Solve for the
percentage error.
Solution:
1. Formulating the Maclaurin Series for sin x up to 4 terms.

2. Substituting value of x = 54 degrees and solve for the approximate value.


Maclaurin Series Problem 2:
Problem Statement: Estimate the value of sin 54 degrees using the
Maclaurin Series up to 4 terms. Solve for the
percentage error.
Solution:
3. Solving for the True Percentage Relative Error
how about the interval of convergence???
Maclaurin Series Problem 3:
Problem Statement: Obtain the Maclaurin Series of ln (x+1) and established
their convergence.
Solution:
1. Target polynomial approximation (Maclaurin Series Expansion)
Maclaurin Series Problem 3:
Problem Statement: Obtain the Maclaurin Series of ln (x+1) and established
their convergence.
Solution:
2. Solve the successive derivatives of the given functions
Maclaurin Series Problem 3:
Problem Statement: Obtain the Maclaurin Series of ln (x+1) and established
their convergence.
Solution:
3. Interval of Convergence
We can also perform algebraic operations in our
Power Series, too.
Theorem I: Addition
Two power Series may be added together for all values of the variable for
which both series converge.
In symbol…
𝑓 𝑥 = 𝑐0 + 𝑐1 𝑥 + 𝑐2 𝑥 2 + 𝑐3 𝑥 3 + ⋯ Plus 𝑔 𝑥 = 𝑏0 + 𝑏1 𝑥 + 𝑏2 𝑥 2 + 𝑏3 𝑥 3 + ⋯

𝑓 𝑥 + 𝑔(𝑥) = (𝑐0 +𝑏0 ) + (𝑐1 +𝑏1 )𝑥 + (𝑐2 +𝑏2 )𝑥 2 + (𝑐3 +𝑏3 )𝑥 3 + ⋯


Theorem II: Multiplication
Two power series may be multiplied together for all values of the variable for
which one series is convergent and the other is absolutely convergent.
In symbol…
𝑓 𝑥 = 𝑐0 + 𝑐1 𝑥 + 𝑐2 𝑥 2 + 𝑐3 𝑥 3 + ⋯ and 𝑔 𝑥 = 𝑏0 + 𝑏1 𝑥 + 𝑏2 𝑥 2 + 𝑏3 𝑥 3 + ⋯

𝑓 𝑥 ∙ 𝑔(𝑥) = (𝑐0 ∙ 𝑏0 ) + (𝑏0 𝑐1 ∙ 𝑏1 𝑐0 )𝑥 + (𝑏0 𝑐2 +𝑏1 𝑐1 + 𝑏2 𝑐0 )𝑥 2 …


Example:
𝑓 𝑥 = 𝑒 𝑥 cos 𝑥
Theorem III: Division
Two powers can be divided given that both are convergent for a particular
condition and that division by zero is not allowed.
Example:
𝑥
𝑓 𝑥 =
sin 𝑥

We can also perform substitution in power series. Kindly explore it on a separate theorem!!!
with the knowledge of Maclaurin Series Expansion,
let’s solve this definite integral…
1
sin 𝑥

0 𝑥
Maclaurin Series Problem 5:
Problem Statement: Approximate the value of the definite integral below
using the first three terms. Solve also the relative error.
1
sin 𝑥

Solution: 0 𝑥
1. Solving for the approximate value
Maclaurin Series Problem 5:
Problem Statement: Approximate the value of the definite integral below
using the first three terms. Solve also the relative error.
1
sin 𝑥

Solution: 0 𝑥
2. Solving for the relative error
so much for the Maclaurin Series… Let’s have the
Taylor Series Expansion.
References:
1. C. F. Gerald and P. O. Wheatley (2004). Applied Numerical Analysis (7th Ed.) Pearson
Education, Inc.
2. S. C. Chapra and R. P. Canale (2010). Numerical Methods for Engineers (6th Ed.)
McGraw-Hill, New York.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy