Professional Documents
Culture Documents
Truncation Errors and The Taylor Series: Engr. Aure Flo A. Oraya, MSCE
Truncation Errors and The Taylor Series: Engr. Aure Flo A. Oraya, MSCE
Truncation Errors and The Taylor Series: Engr. Aure Flo A. Oraya, MSCE
FIRST-ORDER APPROXIMATION
Addt’l term includes
𝑓 𝑥𝑖+1 ≅ 𝑓 𝑥𝑖 + 𝑓′(𝑥𝑖 )(𝑥𝑖+1 − 𝑥𝑖 ) slope multiplied by the
distance
Though the change is already predicted in the preceding
approximation, this is only good for linear trend.
SECOND-ORDER APPROXIMATION
𝑓 ′′ 𝑥
𝑖
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓 ′ 𝑥𝑖 𝑥𝑖+1 − 𝑥𝑖 + 𝑥𝑖+1 − 𝑥𝑖 2
2!
𝑓 3 𝑥𝑖 3
𝑓 𝑛
𝑥𝑖
+ 𝑥𝑖+1 − 𝑥𝑖 + ⋯ + 𝑥𝑖+1 − 𝑥𝑖 𝑛 + 𝑅𝑛
3! 𝑛!
SIMPLIFIED FORM
TAYLOR’S THEOREM
0.5
True Value
0
-1 -0.5 0 0.5 1 1.5 2
-0.5
-1
-1.5
-2
ZERO-ORDER APPROXIMATION
FIRST-ORDER APPROXIMATION
THIRD-ORDER APPROXIMATION
𝑓 ′′ 𝑥𝑖
𝑓 𝑥𝑖+1 ≅ 𝑓 𝑥𝑖 + 𝑓 ′ 𝑥𝑖 𝑥𝑖+1 − 𝑥𝑖 + 𝑥𝑖+1 − 𝑥𝑖 2
2!
𝑓 3 𝑥𝑖
+ 𝑥𝑖+1 − 𝑥𝑖 3 𝑓 (3) 𝑥𝑖 = −2.4𝑥 − 0.9
3!
0.9 3
𝑓 𝑥𝑖+1 ≅ 1.2 − 0.25 − 0.5 − 1 ≅ 0.3
3!
FOURTH-ORDER APPROXIMATION
Another
example is
presented in
the book. You
may refer to it.
(Page 86)
TRUNCATION ERRORSAND THE TAYLOR SERIES
In general, the nth-order Taylor series expansion will be
exact for an nth-order polynomial.
The assessment of how many terms are required to get “close enough” is based
on the remainder term of the expansion.
This relationship has two major drawbacks. First, ξ is not known exactly but
merely lies somewhere between 𝑥𝑖 and 𝑥𝑖+1 . Second, to evaluate the
remainder, we need to determine the (n +1)th derivative of f(x).
In general, we can usually assume that the truncation error is decreased by the
addition of terms to the Taylor series.
USING THE TAYLOR SERIES TO ESTIMATE
TRUNCATION ERRORS
truncation error
first order approximation
Recall this from our solution for the numerical solution of the falling
parachutist problem:
Or
∆𝑓𝑖 is referred to as the first forward difference and ℎ is the step size
NUMERICAL DIFFERENTIATION
Truncating the above equation after the first derivative will yield
𝑓 𝑥𝑖 , 𝑓 𝑥𝑖+1
& 𝑓 𝑥𝑖−1
TRUNCATION ERRORSAND THE TAYLOR SERIES
For 𝒉 = 𝟎. 𝟓
𝑥𝑖−1 = 0.5 − ℎ = 0.5 − 0.5 = 0
𝑥𝑖 = 0.5
𝑥𝑖+1 = 0.5 + ℎ = 0.5 + 0.5 = 1
𝑓(𝑥𝑖−1 ) = 𝑓 0.25
= −0.1(0.25)4 −0.15(0.25)3 −0.5(0)2 −0.25(0.25) + 1.2
𝑓(𝑥𝑖−1 ) = 1.10352
𝑓(𝑥𝑖 ) = 𝑓 0.5 = −0.1(0.5)4 −0.15(0.5)3 −0.5(0.5)2 −0.25(0.5) + 1.2
𝑓(𝑥𝑖 ) = 0.925
𝑓(𝑥𝑖+1 ) = 𝑓 0.75
= −0.1(0.75)4 −0.15(0.75)3 −0.5(1)2 −0.25(0.75) + 1.2
𝑓(𝑥𝑖+1 ) = 0.63633
𝑓(𝑥𝑖−1 ) = 𝑓 0.25
= −0.1(0.25)4 −0.15(0.25)3 −0.5(0)2 −0.25(0.25) + 1.2
𝑓(𝑥𝑖−1 ) = 1.10352
𝑓(𝑥𝑖 ) = 𝑓 0.5 = −0.1(0.5)4 −0.15(0.5)3 −0.5(0.5)2 −0.25(0.5) + 1.2
𝑓(𝑥𝑖 ) = 0.925
𝑓(𝑥𝑖+1 ) = 𝑓 0.75
= −0.1(0.75)4 −0.15(0.75)3 −0.5(1)2 −0.25(0.75) + 1.2
𝑓(𝑥𝑖+1 ) = 0.63633
𝑓(𝑥𝑖−1 ) = 𝑓 0.25
= −0.1(0.25)4 −0.15(0.25)3 −0.5(0)2 −0.25(0.25) + 1.2
𝑓(𝑥𝑖−1 ) = 1.10352
𝑓(𝑥𝑖 ) = 𝑓 0.5 = −0.1(0.5)4 −0.15(0.5)3 −0.5(0.5)2 −0.25(0.5) + 1.2
𝑓(𝑥𝑖 ) = 0.925
𝑓(𝑥𝑖+1 ) = 𝑓 0.75
= −0.1(0.75)4 −0.15(0.75)3 −0.5(1)2 −0.25(0.75) + 1.2
𝑓(𝑥𝑖+1 ) = 0.63633