Chapter 3
Are
errors that result from using
approximation in place of an exact
mathematical procedure
Provides a means to predict a function value
at one point in terms of the function value
and its derivatives at another point
Any smooth function can be approximated as
a polynomial
If the function f and its first n+1 derivatives are
continuous on an interval containing a and x then the
value of the function is given by
𝑓′′(𝑥𝑖 ) 2 𝑓′′′(𝑥𝑖 ) 3
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓′
𝑥𝑖 ℎ + ℎ + ℎ +⋯
2! 3!
𝑓(𝑛) 𝑛
+ 𝑛! ℎ + 𝑅𝑛
𝑓 𝑛+1 𝜉 𝜉 = 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥 𝑡ℎ𝑎𝑡 𝑙𝑖𝑒𝑠 𝑠𝑜𝑚𝑒𝑤ℎ𝑒𝑟𝑒
𝑅𝑛 = (ℎ𝑛+1 )
𝑛+1 ! 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑥𝑖 𝑎𝑛𝑑 𝑥𝑖+1
ℎ = 𝑥𝑖+1 − 𝑥𝑖 step size
Taylor Series Approximation of a Polynomial
Use zero to fourth-order Taylor series expansions
to approximate the function
𝑓 𝑥 = −0.1𝑥 4 − 0.15𝑥 3 − 0.5𝑥 2 − 0.25𝑥 + 1.2
from 𝑥𝑖 = 0 with ℎ = 1. That is predict the
functions value at 𝑥𝑖+1 = 1
𝑈𝑠𝑖𝑛𝑔 𝑒𝑥𝑎𝑐𝑡 𝑎𝑛𝑎𝑙𝑦𝑠𝑖𝑠
𝑎𝑡 𝑥 = 1
𝑓 𝑥 = −0.1𝑥 4 − 0.15𝑥 3 − 0.5𝑥 2 − 0.25𝑥 + 1.2
𝑓 𝑥 = −0.1 1 4 − 0.15 1 3 − 0.5 1 2 − 0.25(1) + 1.2
𝑓 𝑥 = −0.1 − 0.15 − 0.5 − 0.25 + 1.2
𝑓 𝑥 = 0.2 𝑒𝑥𝑎𝑐𝑡 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛
𝑡𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒
𝑈𝑠𝑖𝑛𝑔 𝑒𝑥𝑎𝑐𝑡 𝑎𝑛𝑎𝑙𝑦𝑠𝑖𝑠
𝑤𝑖𝑡ℎ 𝑛 = 0, 𝑧𝑒𝑟𝑜 − 𝑜𝑟𝑑𝑒𝑟 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
𝑓 𝑥 = −0.1𝑥 4 − 0.15𝑥 3 − 0.5𝑥 2 − 0.25𝑥 + 1.2
𝑥=0
𝑓 𝑥 = −0.1(0)4 − 0.15(0)3 − 0.5 0 2 − 0.25(0) + 1.2
𝑓 𝑥 = 1.2
𝑇𝑟𝑢𝑛𝑐𝑎𝑡𝑖𝑜𝑛 𝐸𝑟𝑟𝑜𝑟
𝐸𝑡 = 𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒 − 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒
𝐸𝑡 = 0.2 − 1.2
𝐸𝑡 = −1.0
𝑤𝑖𝑡ℎ 𝑛 = 1, 1𝑠𝑡 𝑑𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝑚𝑢𝑠𝑡 𝑏𝑒 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑑
𝑓 𝑥 = −0.1𝑥 4 − 0.15𝑥 3 − 0.5𝑥 2 − 0.25𝑥 + 1.2
𝑓 𝑥 = −0.1 4 𝑥 3 − 0.15 3 𝑥 2 − 0.5 2 𝑥 1 − 0.25 + 0
𝑥=0
𝑓 𝑥 = −0.1 4 03 − 0.15 3 02 − 0.5 2 01 − 0.25 + 0
𝑓 𝑥 = −0.25
𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑡ℎ𝑒 𝑓𝑖𝑟𝑠𝑡 𝑜𝑟𝑑𝑒𝑟 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 𝑖𝑠
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓 ′ 𝑥𝑖 ℎ
𝑓 𝑥𝑖+1 = 1.2 − 0.25ℎ
ℎ=1
𝑓 1 = 1.2 − 0.25 1 = 0.95
𝐸𝑡 = 0.2 − 0.95 = −0.75
𝑤𝑖𝑡ℎ 𝑛 = 2, 2𝑛𝑑 𝑑𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝑚𝑢𝑠𝑡 𝑏𝑒 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒𝑑
𝑓′ 𝑥 = −0.1 4 𝑥 3 − 0.15 3 𝑥 2 − 0.5 2 𝑥 1 − 0.25 + 0
𝑓′′ 𝑥 = −0.4 3 𝑥 2 − 0.45 2 𝑥 1 − 1.0 1 𝑥 0 − 0
𝑥=0
𝑓′′ 0 = −0.4 3 02 − 0.45 2 02 − 1.0 1
𝑓 𝑥 = −1.0
𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑡ℎ𝑒 2𝑛𝑑 𝑜𝑟𝑑𝑒𝑟 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 𝑖𝑠
𝑓 ′′ 𝑥𝑖 2
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓′ 𝑥𝑖 ℎ + ℎ
2!
𝑓 𝑥𝑖+1 = 1.2 − 0.25ℎ − 0.5ℎ2
𝑓 1 = 1.2 − 0.25(1) − 0.5(1)2 = 0.45
𝐸𝑡 = 0.2 − 0.45 = −0.25
𝑤𝑖𝑡ℎ 𝑛 = 3,
𝑓′′ 𝑥 = −0.4 3 𝑥 2 − 0.45 2 𝑥 1 − 1.0
𝑓′′′ 𝑥 = −2.4𝑥 1 − 0.9
𝑓 0 = −0.9
𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑡ℎ𝑒 3𝑟𝑑 𝑜𝑟𝑑𝑒𝑟 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 𝑖𝑠
𝑓 ′′ 𝑥𝑖 2 𝑓 ′′′ 𝑥𝑖 3
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓′ 𝑥𝑖 ℎ + ℎ + ℎ
2! 3!
𝑓 𝑥𝑖+1 = 1.2 − 0.25ℎ − 0.5ℎ2 − 0.15ℎ3
𝑓 1 = 1.2 − 0.25(1) − 0.5(1)2 − 0.15 1 3 = 0.3
𝐸𝑡 = 0.2 − 0.3 = −0.1
𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑡ℎ𝑒 4𝑡ℎ 𝑜𝑟𝑑𝑒𝑟 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 𝑖𝑠
𝑓 𝑥𝑖+1 = 1.2 − 0.25ℎ − 0.5ℎ2 − 0.15ℎ3 − 0.1ℎ4
𝑓 1 = 1.2 − 0.25(1) − 0.5(1)2 − 0.15 1 3
− 0.1(1)4 = 0.2
𝐸𝑡 = 0.2 − 0.2 = 0
Taylor
Series and Infinite number of
Derivatives
Use Taylor series expansion with n=0 to 6
𝜋
approximate 𝑓 𝑥 = cos 𝑥 at 𝑥𝑖+1 = on the basis
3
of the value of 𝑓(𝑥) and its derivatives at 𝑥𝑖 =
𝜋 𝜋 𝜋 𝜋
. Note this means that ℎ = − =
4 3 4 12
𝑛=0
𝑓 ′′ 𝑥
𝑖
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓 ′ 𝑥𝑖 ℎ + ℎ2
2!
𝜋
𝑓 = cos(𝑥)
3
𝜋 𝜋
𝑓 = cos
3 4
𝜋
𝑓 = 0.707106781
3
𝑝𝑒𝑟𝑐𝑒𝑛𝑡 𝑟𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝑒𝑟𝑟𝑜𝑟
0.5 − 0.707106781
𝜀𝑡 = 100% = −41.4%
0.5
𝑛 =1
𝑓 ′′ 𝑥
𝑖
𝑓 𝑥𝑖+1 = 𝑓 𝑥𝑖 + 𝑓 ′ 𝑥𝑖 ℎ + ℎ2
2!
𝑓 𝑥 = cos(𝑥)
𝑓′ 𝑥 = −sin(𝑥)
𝜋 𝜋 𝜋 𝜋
𝑓 = cos − sin
3 4 4 12
𝜋
𝑓 = 0.521986659
3
𝑝𝑒𝑟𝑐𝑒𝑛𝑡 𝑟𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝑒𝑟𝑟𝑜𝑟
0.5 − 0.521986659
𝜀𝑡 = 100% = −4.40%
0.5
Order (n) 𝑓 𝑛
(𝑥) 𝑓 𝜋 Τ3 𝜀𝑡 (%)
0 cos(x) 0.707106781 -4.14E+01
1 -sin(x) 0.521986659 -4.40E+00
2 -cos(x) 0.497754491 4.49E-01
3 sin(x) 0.499869147 2.62E-02
4 cos(x) 0.500007551 -1.51E-03
5 -sin(x) 0.500000304 -6.08E-05
6 -cos(x) 0.499999988 2.44E-06
Usezero through 3rd order Taylor series
expansion to predict
𝑓 2 = 25𝑥 3 − 6𝑥 2 + 7𝑥 − 88
Using a base point at x=1.
Compute the true percent relative error εt for
each approximation
Use the Maclaurin series expansion for the sin x
to estimate sin(pi/3)
Compute the true and approximate percent
relative errors. Add terms until the absolute value
of the approximate error estimate falls below an
error criterion conforming to 5 significant figures
Errors
in numbers can propagate through
mathematical functions.
Find the bounds for the propagation in
adding two numbers x and y
Where
x=1.5 ± 0.05
y = 3.4 ± 0.04
𝑥 = 1.5 ± 0.05
𝑦 = 3.4 ± 0.04
𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥 𝑎𝑛𝑑 𝑦
𝑥 + 𝑦 = 1.55 + 3.44 = 4.99
𝑢𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑚𝑖𝑛𝑖𝑚𝑢𝑚 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥 𝑎𝑛𝑑 𝑦
𝑥 + 𝑦 = 1.45 + 3.36 = 4.81
𝑡ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒
4.81 ≤ 𝑥 + 𝑦 ≤ 4.99
Todetermine the effect of discrepancy
between 𝑥 (exact value) and 𝑥ҧ
(approximation of x) on the value of 𝑓 𝑥
Problem!!!
𝑓 𝑥 𝑖𝑠 𝑢𝑛𝑘𝑛𝑜𝑤𝑛 𝑏𝑒𝑐𝑎𝑢𝑠𝑒
𝑥 𝑖𝑠 𝑢𝑛𝑘𝑛𝑜𝑤𝑛
∆𝑓 𝑥ҧ = 𝑓 𝑥 − 𝑓(𝑥)ҧ
𝑖𝑓 𝑥ҧ 𝑖𝑠 𝑐𝑙𝑜𝑠𝑒 𝑡𝑜 𝑥 𝑎𝑛𝑑 𝑓 𝑥ҧ 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑠 𝑎𝑛𝑑 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡𝑖𝑎𝑏𝑙𝑒,
𝑇𝑎𝑦𝑙𝑜𝑟 𝑠𝑒𝑟𝑖𝑒𝑠 𝑐𝑎𝑛 𝑏𝑒 𝑢𝑠𝑒𝑑 𝑡𝑜 𝑓 𝑥 𝑛𝑒𝑎𝑟𝑓 𝑥ҧ
′
𝑓 ′′ (𝑥)
2
𝑓 𝑥 = 𝑓 𝑥 + 𝑓 (𝑥)
𝑥 − 𝑥 + 𝑥 − 𝑥 +⋯
2!
𝑑𝑟𝑜𝑝𝑝𝑖𝑛𝑔 𝑡ℎ𝑒 2𝑛𝑑 𝑎𝑛𝑑 ℎ𝑖𝑔ℎ𝑒𝑟 𝑜𝑟𝑑𝑒𝑟 𝑡𝑒𝑟𝑚𝑠
𝑓 𝑥 = 𝑓 𝑥 + 𝑓 ′ (𝑥)
𝑥 − 𝑥
𝑓 𝑥 − 𝑓 𝑥 ≅ 𝑓 ′ (𝑥)
𝑥 − 𝑥
∆𝑓 𝑥 = 𝑓 ′ (𝑥)
𝑥 − 𝑥ҧ
∆𝑓 𝑥 = 𝑓 ′ (𝑥)
∆𝑥
∆𝑓(𝑥)
= 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑒𝑟𝑟𝑜𝑟 𝑜𝑓 𝑡ℎ𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛
∆𝑥 = 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 𝑜𝑓 𝑒𝑟𝑟𝑜 𝑜𝑓 𝑥, 𝑥 − 𝑥
Given a value of 𝑥 = 2.5 with an error of
∆𝑥 = 0.01, estimate the resulting error in the
function, 𝑓 𝑥 = 𝑥 3 .
∆𝑓 𝑥 = 𝑓 ′ (𝑥)
∆𝑥
𝑓 2.5 = 2.5 3
∆𝑓 𝑥 = 𝑓 ′ 𝑥 3 (0.01)
𝑓 2.5 = 15.625 ∆𝑓 𝑥 = 3𝑥 2 (0.01)
∆𝑓 𝑥 = 3 2.5 2 (0.01)
∆𝑓 𝑥 = 0.1875
𝑓 2.5 = 15.625 ± 0.1875
𝜕𝑓 𝜕𝑓 𝜕𝑓
∆𝑓 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 , = ∆𝑥1 + ∆𝑥2 + ⋯ + ∆𝑥𝑛
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑛
The deflection y of the top of a sailboat mast is 𝑦 =
𝐹𝐿4
. Estimate the error in y given the following data:
8𝐸𝐼 F = uniform side loading (lb/ft)
L = height (ft)
E = modulus of elasticity
I = moment of inertia
𝐹෨ = 50 𝑙𝑏/𝑓𝑡 ∆𝐹෨ = 2 𝑙𝑏/𝑓𝑡
𝐿෨ = 30 𝑓𝑡 ∆𝐿෨ = 0.1 𝑓𝑡
𝐸෨ = 1.5 × 108 𝑙𝑏/𝑓𝑡 2 ∆𝐸෨ = 0.01 × 108 𝑙𝑏/𝑓𝑡 2
𝐼ሚ = 0.06 𝑓𝑡 4 ∆𝐼ሚ = 0.0006 𝑓𝑡 4
𝐹𝐿4
𝑦=
8𝐸𝐼
𝜕𝑓 𝜕𝑓 𝜕𝑓
∆𝑓 𝑥1 , 𝑥2 , ⋯ , 𝑥𝑛 , = ∆𝑥1 + ∆𝑥2 + ⋯ + ∆𝑥𝑛
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑛
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
෨ 𝐿෨ , 𝐸,
∆𝑦 𝐹, ෨ 𝐼ሚ = ∆𝐹෨ + ∆𝐿෨ + ∆𝐸෨ + ∆𝐼ሚ
𝜕𝐹 𝜕𝐿 𝜕𝐸 𝜕𝐼
𝐿4 𝐹𝐿3 𝐹𝐿4 𝐹𝐿4
෨ 𝐿෨ , 𝐸,
∆𝑦 𝐹, ෨ 𝐼ሚ = ∆𝐹෨ + ∆𝐿෨ + ∆𝐸෨ + ∆𝐼ሚ
8𝐸𝐼 2𝐸𝐼 2
8𝐸 𝐼 8𝐸𝐼 2
෨ 𝐿෨ , 𝐸,
∆𝑦 𝐹, ෨ 𝐼ሚ = 0.0225 + 0.0075 + 0.00375 + 0.005625
෨ 𝐿෨ , 𝐸,
∆𝑦 𝐹, ෨ 𝐼ሚ = 0.039375
𝐹𝐿4
𝑦= ± 0.039375
8𝐸𝐼
50 ∙ (30)4
𝑦= ± 0.039375
8 ∙ 1.5 × 108 ∙ (0.06)
𝑦 = 0.5625 ± 0.039375
𝑦𝑚𝑖𝑛 = 0.5625 − 0.039375
𝑦𝑚𝑎𝑥 = 0.5625 + 0.039375
The strain in an axial member of a square
cross-section is given by
F 𝐺𝑖𝑣𝑒𝑛 F 72 0.9 N
2 h 4 0.1 mm
h E E 70 1.5 GPa
Find the maximum possible error in the
measured strain.
72 F
(4 10 3 ) 2 (70 10 9 ) h 2E
64.286 10 6
1
2
64.286 F h E
2F
F h E 3
F h E h hE
F
2 2
F h E E h E
F h E
𝑇ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒
1 2F F
F h E
h2 E h3 E h2 E 2
1 2F F
2
F 3
h 2 2
E
h E hE h E
1 2 72
0 . 9 0.0001
( 4 10 3 ) 2 (70 109 ) ( 4 10 3 ) 3 (70 109 )
72
3 2
1.5 109
( 4 10 ) (70 10 )
9 2
5.3955
64.286 5.3955