Lesson 2-Error Estimation
Lesson 2-Error Estimation
Lesson 2-Error Estimation
Numerical Methods
for Engineers
Lesson-02
Error Estimation
Objectives
• True fractional relative error: the true error divided by the true
value.
𝜀𝑡 = 𝑡𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒−𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
𝑡𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒
×100%
Error Definitions
• The previous definitions of error relied on knowing a true value.
If that is not the case, approximations can be made to the error.
𝜀𝑎 = 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑒𝑟𝑟𝑜𝑟
𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 ×100%
s 0.5 10 2 n
%
Roundoff Errors
• Roundoff errors arise because digital computers cannot represent
some quantities exactly. There are two major facets of roundoff
errors involved in numerical calculations:
• Example
Approximation to a derivative using a finite-difference equation:
dv v v(ti 1 ) v(ti )
dt t ti 1 ti
Truncation Errors
• Taylor theorem states that any smooth function can
approximated as a polynomial.
Examples
Given that 𝑓 𝑥 = 9𝑥 2 find 𝑓′(3) at ∆𝑥 = 0.3
Solution:
Approximate value= 56.7
Exact value = 54
Error = 2.7
Relative percentage error = 5%
Examples
Starting with e 1 estimate e
x 0.5
by adding terms one at a time.
Compute the true and approximate percent relative errors after each term
addition. Add terms until the absolute value of the approximate error a
estimate
falls below a prespecified error criterion 𝜀𝑠 conforming to three
significant figures. Use the Maclaurin series expansion
Examples
Use Taylor series expansion with n= 0 to 6 to approximate f(x) = 𝑐𝑜𝑠𝑥 at
𝑥𝑖+1 = 𝜋/3 on the basis of the value of 𝑓 𝑥 and its derivative at 𝑥𝑖 =
𝜋/4