Professional Documents
Culture Documents
Course Evaluations
Course Outlines
Recommended Books
Motivations
ex − 2x2 + 3 = 0.
How to find integral
√
Z Z
2
sin xdx, ex dx
Motivations
How to fit a polynomial (function) to given data
How to find rate of change, derivative, in the following data
x y
1 10
2 12
3 15
4 17
5 21
Motivations
d2 y dy
+ y = sin y.
dx2 dx
∂u ∂ 2u
+ k 2 = u3 .
∂t ∂x
Brief History
Modern Techniques
Measuring Errors
Error Analysis
Absolute Error and Relative Error
Ep = p∗ − p
Error Analysis
Example
Error Analysis
Example (Contd...)
Error Analysis
Absolute Error and Relative Error
Error Analysis
Absolute Error and Relative Error
Lets say that two students measure two objects with a meter stick. One
student measures the height of a room and gets a value of 3.215 me-
ters ±1mm (±0.001m). Another student measures the height of a small
cylinder and measures 0.075 meters ±1mm (±0.001m). Clearly, the ove-
rall accuracy of the ceiling height is much better than that of the 7.5cm
cylinder. The comparative accuracy of these measurements can be de-
termined by looking at their relative errors
0.001
Rceiling = ∗ 100 = 0.0003%
3.125
0.001
Rcylinder = ∗ 100 = 0.01%
0.075
Error Analysis
Absolute Error and Relative Error
|p∗ − p| 10−d
≤
|p| 2
or
10−d
|Rp | ≤
2
Error Analysis
Absolute Error and Relative Error
Error Analysis
Approximate Errors
or
Ea = pn − pn−1 .
where pn is the nth approximation to the true value p.
Approximate Error
Relative Approximate Error =
Current Approximation
or
pn − pn−1
Ra = .
pn
Truncation Errors
2 x4 x6 x2n
e x = 1 + x2 + + + ··· + + ...
2! 3! n!
might be replaced with the finite number of terms while approximating
2
integral of ex numerically.
Truncation Errors
Given that
Z 1/2
2
ex dx = 0.544987104184 = p, (true value)
0
x4 x6 x8
P8 (x) = 1 + x2 + + +
2! 3! 4!
After calculations, we get
Z 1/2
P8 (x)dx = 0.544986720817 = p∗ , (approx. value)
0
Truncation Errors
since
10−6
|Rp | = 7.03442 ∗ 10−7 ≤
2
∗
The approximation p agrees with the true value p to six significant
digits.
dk .dk+1 dk+2 . . .
Example
22
π= = 3.142857142857142857
7
Propagation of Errors
p + q = (p∗ + p ) + (q ∗ + q )
p + q = (p∗ + q ∗ ) + (p + q )
Thus for addition, the error in the sum is the sum of errors of the
addends.
Mudassar Imran (NA) Department of Mathematics 25 / 33
Propagation of Errors Error Propagation in Product
Propagation of Errors
Error Propagation in Product
pq = (p∗ + p )(q ∗ + q )
pq = p∗ q ∗ + p∗ q + q ∗ p + p q
pq − p∗ q ∗ = p∗ q + q ∗ p + p q
pq − p∗ q ∗ p∗ q q ∗ p p q
= + +
pq pq pq pq
p∗ q∗
Suppose that ≈ 1, ≈ 1 and Rp Rq ≈ 0
p q
Propagation of Errors
pq − p∗ q ∗ p∗ q q ∗ p p q
= + +
pq pq pq pq
pq − p∗ q ∗ q p
= +
pq q p
pq − p∗ q ∗
= Rp + Rq (1)
pq
Thus the relative error in the product is the sum of relative errors in p∗
and q ∗ .
Propagation of Errors
Order of Approximation
|f (h) − p(h)|
< M, for sufficiently small h
|hn |
or
|f (h) − p(h)| < M |hn |
we say that p(h) approximates f (h) with order of approximation O(hn )
and write
f (h) = p(h) + O(hn )
The term O(hn ) is pronounced as oh of hn
Order of Approximation
Properties of O(hn )
Order of Approximation
Theorem
Assume that
Taylor’s Theorem
Theorem
Assume that f ∈ C n+1 [a, b]. If both x0 and x0 + h lie in [a, b]. Then
n
X f k (x0 )
f (x0 + h) = hk + O(hn+1 ).
k!
k=0
Example
Taylor’s expansion of O(h4 ) about x0 = 0 of ex is
h2 h3
eh = 1 + h + + + O(h4 )
2! 3!
Order of Approximation
Example
h2 h3
eh = 1 + h + + + O(h4 )
2! 3!
h2 h4
cos h = 1 −
+ + O(h6 )
2! 4!
Determine the order of approximations of their SUM and PRODUCT.
h3
Ans : eh cos h = 1 + h − + O(h4 ).
3