Docsity

Engineering Numerical Methods, Study notes of Engineering

Partial preview of the text

Download Engineering Numerical Methods and more Study notes Engineering in PDF only on Docsity!

Engineering Numerical Methods

DWE

Zaid Al-Azzawi

University of Al-Anbar College of Engineering

Brook Taylor

1685 - 1731

Colin Maclaurin

1698 - 1746

___________________________________________________________________________

Syllabus

  • Chapter 0: Introduction
  • Chapter 1: Determinant and Matrices.
  • Chapter 2: Systems of linear Algebraic Equations.
  • Chapter 3: Interpolation and Curve Fitting.
  • Chapter 4: Numerical Differentiation and Integration.
  • Chapter 5 and 6: Numerical Solution of Ordinary Differential Equations.
  • Chapter 7 : Numerical Solution of Partial Differential Equations.

References:

  • Numerical Methods for Engineers, S. C. Chapra and R. P Canale, McGraw-Hill, 6 th

edition 2010.

  • Numerical Methods for Engineers and Scientists by Joe D. Hoffman, 2 nd Edition.
  • Lectures on Numerical Analysis by Dennis Deturck and Herbert S. Wilf.
  • Numerical Analysis Using MATLAB ® and Excel ® by Steven T. Karris, 3 rd Edition.
  • Numerical Methods in Engineering with MATLAB ® by Jaan Kiusalaas.
  • Engineering Analysis- Interactive Methods and Programs with FORTRAN,

QuickBasic, MATLAB, and Mathematica by Y. C. Pao.

د. حسن جميد حسون الدلفي وحممود عطا هللا مشكور.-ليل اهلندسي والعددي التطبيقيالتح -

Assessment method:

30% course exam, 10% homework and self initiative, 10% Lab, and 50% final

exam.

___________________________________________________________________________

Iteration error is the error in an iterative method that approaches the exact

solution of an exact problem asymptotically. Iteration errors must decrease

toward zero as the iterative process progresses. The iteration error itself maybe

used to determine the successive approximations to the exact solution. Iteration

error can be reduced the limit of the computing device. The errors in the solution

of a system of linear algebraic equations by the successive-over-relaxation

(SOR) is an example of this type of errors.

Approximation error is the difference between the exact solution of an

exact problem and the exact solution of an approximation of the exact problem.

Approximation error can be reduced only by choosing a more accurate

approximation of the exact problem. The error in the approximation of a

function by a polynomial is an example of this type of errors. The error in the

solution of a differential equation where the exact derivatives are replaced by

algebraic difference approximations, which have truncation errors, is another

example of this type of error.

Roundoff error is the error caused by the finite word length employed in

the calculations. Roundoff error is more significant when small differences

between large numbers are calculated. Most computers have either 32 bit or 64

bit word length, corresponding to approximately 7 or 13 significant decimal

digits, respectively. Some computers have extended precision capability, which

increases the number of bits to 128. Care must be exercised to ensure that

enough significant digits are maintained in numerical calculations so that

Roundoff is not significant.

Number representation

Numbers are represented in number systems. Any number of bases can be

employed as the base of a number system, for example, the base 10 (i.e.

decimal) system, the base 8 (i.e. octal) system, the base 2 (i.e. binary) system,

etc. The base 10, or decimal, system is the most common system used for human

communication. Digital computers use the base 2, or binary, system. In a digital

computers, a binary number consists of a number of binary bits. The number of

binary bits in a binary number determines the precision with which the binary

number represents a decimal number. The most common size binary number is a

32 bit number, which can represent approximately 7 digits of a decimal number.

Some digital computers have 64 bit binary numbers, which can represent 13 to

14 decimal digits. In many engineering and scientific calculations, 32 bit

arithmetic is adequate. However, in many other applications, 64 arithmetic bit is

required. In a few special solutions, 128 bit arithmetic may be required. On 32

bit computers, 64 bit arithmetic, or even 128 bit arithmetic, can be accomplished

using software enhancements. Such calculations are called double precision or

quad precision , respectively. Such software enhanced precision can require as

much as 10 times the execution time of a single precision calculation.

___________________________________________________________________________

Consequently, some care must be exercised when deciding whether or not

higher precision arithmetic is required.

Except for integers and some fractions, all binary representations of decimal

numbers are approximations, owing to the finite word length of binary numbers.

Thus, some loss of precision in the binary representation of a decimal number is

unavoidable. When binary numbers are combined in arithmetic operations such

as addition, multiplication, etc. the true result is typically a longer binary

number which cannot be represented exactly with the number of available bits in

the binary number capability of the digital computer. Thus, the results are

rounded off in the last available binary bit. This rounding off gives rise to

Roundoff error , which can accumulate as the number of calculations increases.

___________________________________________________________________________

Example: Find Maclaurin for sin(x) , cos(x) , and e x ?

Solution:

n n f x n

f x f f x f x ( 0 ) !

2 () = + + + +

( ) cos ( 0 ) 1

( ) sin ( 0 ) 0

'''( ) cos '''( 0 ) 1

''( ) sin ''( 0 ) 0

'( ) cos '( 0 ) 1

( ) sin ( 0 ) 0

( 5 ) ( 5 )

( 4 ) ( 4 )

= =

= =

=− =−

=− =

= =

= =

f x x f

f x x f

f x x f

f x x f

f x x f

f x x f

....... 7!

1 0 5!

1 0 3!

1 ( ) 0 0

3 5 7 f x = + x + − x + + x + − x +

2 1

1 3 5 7

( 2 1 )!

( 1 ) ............ 7!

1

5!

1

3!

1 sin

−

−

−

− = − + − + +

n

n

x n

x x x x x

2 2

1 2 4 6

( 2 2 )!

( 1 ) ............ 6!

1

4!

1

2!

1 cos 1

−

−

− = − + − + +

n

n

x n

x x x x

x n x n

e x x x !

1 ............ 3!

1

2!

1 1

2 3 = + + + + +

___________________________________________________________________________

Example: Solve dx

x

e

x

1

1 / 2

Solution:

x n x n

e x x x !

1 ............ 3!

1

2!

1 1

2 3 = + + + + +

1

1 / 2

2 3 4

2 3

1

1 / 2

ln

x x x x x

x x x dx

x

dx

x

e

x