Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Measuring Errors - Numerical Methods - Lecture Slides, Slides of Mathematical Methods for Numerical Analysis and Optimization

Main points are: Measuring Errors, Accuracy of Numerical Results, Iterative Algorithms, True Error, Numerical Method, Approximate Value, Differential Calculus, Relative True Error, Approximate Error, Significant Digits

Typology: Slides

2012/2013

Uploaded on 04/16/2013

mmadhav
mmadhav 🇮🇳

5

(8)

76 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Measuring Errors
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Measuring Errors - Numerical Methods - Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Measuring Errors

Why measure errors?

1) To determine the accuracy of numerical

results.

2) To develop stopping criteria for iterative

algorithms.

Example—True Error

The derivative, f^ ′(^ x ) of a function f^ ( x ) can be

approximated by the equation,

h

f x h f x f x

If

x

f x e

  1. 5

( )= 7 and^ h =^0.^3

a) Find the approximate value of f '(^2 )

b) True value of f '(^2 )

c) True error for part (a)

Example (cont.)

Solution:

a) For x^ =^2 and h =^0.^3

f f f

f ( 2. 3 )− f ( 2 )

  1. 5 ( 2. 3 ) 0. 5 ( 2 ) ee =
= =^10.^263

Relative True Error

• Defined as the ratio between the true error,

and the true value.

Relative True Error ( ∈ t^ ) =^

True Error

True Value

Example—Relative True Error

Following from the previous example for true error,

find the relative true error for

x f x e

  1. 5

( )= 7 at f '(^2 )

with h =^0.^3

Et =− 0. 722

From the previous example,

True Value

TrueError ∈ t =

Relative True Error is defined as

  1. 5140

− 0. 722 = (^) =− 0. 075888

as a percentage,

∈ t =− 0. 075888 × 100 % =− 7. 5888 %

Example—Approximate Error

For

x

f x e

  1. 5

( )= 7 at x^ =^2 find the following,

a) f^ ′(^2 ) using h =^0.^3

b) f^ ′(^2 ) using h =^0.^15

c) approximate error for the value of f^ ′(^2 ) for part b)

Solution:

a) For

h

f x h f x f x

x = 2 and h = 0. 3

f f

f

Example (cont.)

f ( 2. 3 )− f ( 2 )

Solution: (cont.)

  1. 5 ( 2. 3 ) 0. 5 ( 2 ) ee =

  2. 3

  3. 107 − 19. 028

b) For x^ =^2 and h =^0.^15

  1. 15

( 2 0. 15 ) ( 2 ) ( 2 )

' f f f

  • − ≈

f ( 2. 15 )− f ( 2 )

Relative Approximate Error

• Defined as the ratio between the

approximate error and the present

approximation.

Relative Approximate Error (

Approximate Error

Present Approximation

∈ a ) =

Example—Relative Approximate Error

For

x

f x e

  1. 5

at x^ =^2 , find the relative approximate

error using values from h^ =^0.^3 and h =^0.^15

Solution:

From Example 3, the approximate value of f ′(^2 )=^10.^263

using h^ =^0.^3 and f^ ′(^2 )=^9.^8800 using h =^0.^15

= a E (^) Present Approximation – Previous Approximation

How is Absolute Relative Error used as a

stopping criterion?

If |∈^ a^ |≤∈ s where ∈ s^ is a pre-specified tolerance, then

no further iterations are necessary and the process is

stopped.

If at least m significant digits are required to be

correct in the final answer, then

| | 0. 5 10 %

2 m a

− ∈ ≤ ×

Table of Values

For

x

f x e

  1. 5

at x^ =^2 with varying step size, h

0.3 10.263 N/A 0

h f^ ′(^2 ) a

∈ m