p103_1_S10

# p103_1_S10 - EE103 Lecture Notes Spring 2010 Prof S.E...

This preview shows pages 1–4. Sign up to view the full content.

EE103 Lecture Notes, Spring 2010, Prof S.E. Jacobsen Section 1 i © Copyright Stephen E Jacobsen, 2010 ....................................................................................................... i SECTION 1: INTRODUCTION ................................................................................................................. 1 Motivation Example 1 : ............................................................................................................................ 1 Motivation Example 2 : ............................................................................................................................ 2 Motivation Example 3: ............................................................................................................................. 4 Motivation Example 4: ............................................................................................................................. 5 Motivation Example 5 : . .......................................................................................................................... 11 The Bisection Algorithm: ....................................................................................................................... 14 © Copyright Stephen E Jacobsen, 2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
EE103 Lecture Notes, Spring 2010, Prof S.E. Jacobsen Section 1 1 SECTION 1: INTRODUCTION This section contains several examples that demonstrate a few issues that arise in the area of engineering and scientific computing. Motivation Example 1 1 : We are all familiar with the quadratic formula for finding the roots of the quadratic equation, 2 ax bx c 0,a 0  . Of course, the two roots are given by the expression 2 b b4 a c 2a  . Leta 1, b 62.1, c 1  . The roots of the equation 2 62.1 1 0 xx  are, approximately (to seven decimal places), 12 -0.0161072 -62.0838928 r and r . Now, assume we have a finite precision machine (computer, calculators, etc.) that only can provide "four digit arithmetic" (to be defined later) to compute the two roots. Of course, we'd hope that the answers would be close to the two roots given above, expressed in "four digit arithmetic". That is, we'd like the answers to be close to 1 r 0.01611 and 2 r 62.08   . Now, using only four digit arithmetic, we compute 22 b 4ac (62.1) 4.0 = 3856-4.0 3852 62.06  . We'll use the notation 41 () f lr , for the four digit approximation to the root 1 r , to emphasize the fact that the answer is an approximation ("fl" stands for "floating point"). We then have that ( ) ( 62.1 62.06)/2 0.02 fl r  . Therefore, the absolute error is given by 1 | ( ) | | 0.02 0.01611| 0.00389 fl r r   , but the relative error, using four digit arithmetic, is given by 1 1 1 | ( ) | 0.00389 2.4 10 | | 0.01611 fl r r x r  . That is, the percentage error (relative_error x 100) is approximately 24%, an error that is clearly unacceptable. However, note that we may write
EE103 Lecture Notes, Spring 2010, Prof S.E. Jacobsen Section 1 2 22 2 b b4 a c b a c ( b a c ) 2 2a 2a (b b 4 a c ) b + 4 c ba c    . If we use this expression we get, using four digit arithmetic, 41 2.000 2.000 ( ) 0.01610 62.10 62.06 124.2 fl r and, therefore, 4 1 1 | ( ) | 0.00001 6.2 10 | | 0.01611 fl r r x r  , a far more acceptable percentage error ( 62 % 1000 ). The lesson: When using finite precision arithmetic, the manner by which a mathematical expression is formulated may have a serious impact upon the accuracy of the computed result. Motivation Example 2 2 : Consider the simple 2x2 system of linear equations 12 kk x x 2 (1 10 )x x 2 10  The exact solution of this system is, clearly, ** (x , x ) (1, 1) . However, imagine that we have no idea what the solution is but that someone has suggested a solution; for instance, it has been suggested that the solution is (x , x ) (0, 2) . It appears to be natural to "test" the suggested solution by "plugging" that solution into the given system of equations.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 06/01/2010 for the course EE EE 103 taught by Professor Jacobsen during the Spring '09 term at UCLA.

### Page1 / 16

p103_1_S10 - EE103 Lecture Notes Spring 2010 Prof S.E...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online