• 검색 결과가 없습니다.

010.141 NUMERICAL METHODS IN GENERAL MODULE 5

N/A
N/A
Protected

Academic year: 2022

Share "010.141 NUMERICAL METHODS IN GENERAL MODULE 5"

Copied!
38
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

ENGINEERING MATHEMATICS II

010.141

NUMERICAL METHODS IN

GENERAL

MODULE 5

(2)

NUMERICAL METHODS

Ø Methods for solving problems numerically on a computer Ø Steps:

• Modeling,

• Choice of a numerical method, Programming,

• Doing the computation,

• Interpreting the results

Ø Solution of equations by iteration Ø Interpolation

Ø Numerical integration and differentiation

(3)

B.D. Youn 3

2010 Engineering Mathematics II Module 5

Nonlinear Equations in Engineering Fields

f(x) = w

n

(x) - w = 0

x: bridge design variables To design a safe bridge , a natural frequency must be higher than that of an external loading.

f(x) = T (x) - T* = 0

x: battery design variables To design a safe battery, a temperature level must be smaller than a marginal temperature.

f(x) = s (x) - S = 0

x: bridge gusset plate

To design a safe bridge,

a stress level at a critical

bridge element must be

smaller than its strength.

(4)

SOLUTION OF EQUATIONS BY ITERATION

Ø Solving equation f(x) = 0 Ø Methods:

• Fixed – Point Iteration

• Newton's Method

• Secant Method

(5)

B.D. Youn 5

2010 Engineering Mathematics II Module 5

FIXED-POINT ITERATION FOR SOLVING f(x) = 0

Ø Idea: transform f(x) = 0 into x = g(x)

Ø Steps:

1. Choose x 0

2. Compute x 1 = g(x 0 ), x 2 = g(x 1 ), ¼, x n+1 = g(x n )

Ø A solution of x = g(x) is called a fixed point

Ø Depending on the initial value chosen (x 0 ), the related

sequences may converge or diverge

(6)

FIXED-POINT ITERATION FOR SOLVING f(x) = 0

Ø Example: f(x) = x 2 – 3x + 1 = 0

î í

= ì

381966 .

0

618034 .

Solutions 2

(7)

B.D. Youn 7

2010 Engineering Mathematics II Module 5

FIXED-POINT ITERATION FOR SOLVING f(x) = 0

(8)

NEWTON'S METHOD FOR SOLVING f(x) = 0

Ø f must have a continuous derivative f ' Ø The method is simple and fast

( ) ( )

( ) ( ) 0

0 0 1

1 0

0 0

x ' f

x x f

x

x x

x x f

' f tan

-

=

ß

= -

=

b

(9)

B.D. Youn 9

2010 Engineering Mathematics II Module 5

NEWTON'S METHOD FOR SOLVING f(x) = 0

( ) ( )

( ) ( ) n

n n 1

n

1 1 1

2

x ' f

x x f

x

x ' f

x x f

x

-

=

-

=

+

M

(10)

NEWTON'S METHOD FOR SOLVING f(x) = 0

Example: Find the positive solution of f(x) = 2 sin x – x = 0

(11)

B.D. Youn 11

2010 Engineering Mathematics II Module 5

SECANT METHOD FOR SOLVING f(x) = 0

Newton’s method is powerful but disadvantageous because it

is difficult to obtain f '. The secant method approximates f '.

(12)

SECANT METHOD FOR SOLVING f(x) = 0

Ø Newton's Method

Ø Secant

(13)

B.D. Youn 13

2010 Engineering Mathematics II Module 5

SECANT METHOD FOR SOLVING f(x) = 0

(14)

진정성이 마음을 움직인다.

송나라 범관, 계산행려도

(15)

B.D. Youn 15

2010 Engineering Mathematics II Module 5

INTERPOLATION

Ø Function f(x) is unknown

Ø Some values of f(x) are known (f

1

, f

2

, ¼, f

n

)

Ø Idea: Find a polynomial p

n

(x) that is an approximation of f(x)

( ) 0 0 n ( ) 1 1 n ( ) n n

n x f , p x f , , p x f

p = = L =

Ø Lagrange interpolation

• Linear

• Quadratic

• General

Ø Newton's interpolation

• Divided difference

• Forward difference

• Backward difference

Ø Splines

(16)

LINEAR LAGRANGE INTERPOLATION

Ø Use 2 known values of f(x) ® f 0 , f 1

p 1 is the linear Lagrange polynomial.

(17)

B.D. Youn 17

2010 Engineering Mathematics II Module 5

LINEAR LAGRANGE INTERPOLATION

Ø p 1 (x) = L 0 (x)f 0 + L 1 (x)f 1

Ø L 0 and L 1 are linear polynomials (weight functions).

( ) ( )

ï î ï í ì

=

= ï =

î ï í ì

=

=

=

1 0 1

1 0

0 1 if x x

x x if 0 x

L x

x if 0

x x if 1 x

L

( ) ( )

0 1

0 1

1 0

1

0 x x

x x ,

x

x

-

= - -

= - x

x x L

x L

( ) 1

0 1

0 0

1 0

1

1 x x

x x

x

x x f

x f x

p -

+ - -

= -

(18)

LINEAR LAGRANGE INTERPOLATION

Example: Compute ln 9.2 from ln 9.0 = 2.1972 and ln 9.5 = 2.2513 by linear Lagrange interpolation

Solution:

( ) ( )

( )

( ) ( )

( ) ( )

2188 .

2

2513 .

2 4 . 0 1972

. 2 6 . 0

f 2 . 9 L f

2 . 9 L

2 . 9 p 2

. 9 ln

4 . 0 0

. 9 5 . 9

0 . 9 2 . 2 9

. 9 L 6

. 5 0

. 9 0 . 9

5 . 9 2 . 2 9

. 9 L

5 . 9 ln f

, 0 . 9 ln f

, 5 . 9 x

, 0 . 9 x

1 1

0 0

1

1 0

1 0

1 0

=

+

=

+

=

»

- =

= - - =

= -

=

=

=

=

(19)

B.D. Youn 19

2010 Engineering Mathematics II Module 5

QUADRATIC LAGRANGE INTERPOLATION

Ø Use of 3 known values of f(x) ® f 0 , f 1 , f 2

Ø Approximation of f(x) by a second-degree polynomial

( ) ( ) ( ) ( )

( )( )

( )( )

( )( )

( )( )

( )( )

( 2 0 )( 2 1 )

1 2 0

2 1

0 1

2 1 0

2 0

1 0

2 0 1

2 2

1 1

0 0

2

x x

x x

x x

x L x

x x

x x

x x

x L x

x x

x x

x x

x L x

f x L f

x L f

x L x

p

- -

-

= -

- -

-

= -

- -

-

= -

+ +

=

(20)

QUADRATIC LAGRANGE INTERPOLATION

Example: Compute ln 9.2 for f

0

(x

0

= 9.0) = ln 9.0, f

1

(x

1

= 9.5) = ln 9.5, f

2

(x

2

= 11.0) = ln 11.0

Solution:

( )

( ) ( )

( ) ( )

( 9 . 2 ) 2 . 2192

2 . 9 ln

5 . 85 5

. 3 18

1

99 75 20

. 0

1

5 . 104 5

. 20

2 2 2

2 1

2 0

=

»

+ -

=

+ -

-

=

+ -

=

p

x x

x L

x x

x L

x x

x

L

(21)

B.D. Youn 21

2010 Engineering Mathematics II Module 5

GENERAL LAGRANGE INTERPOLATION

( ) ( ) ( )

( ) ( )

( ) ( ) ( k )( k ) ( n )

k n

k n

k n

x x x

x x

x x

x x

l

x f l

x l

f x x

p x

f

- -

- -

=

=

=

»

+ -

=

=

å å

L

L 1 1

0 k

0 k k

k 0 k

k

L

(22)

NEWTON'S INTERPOLATION

Ø More appropiate for computation

Ø Level of accuracy can be easily improved by adding new terms that increase the degree of the polynomial Ø Divided difference

Ø Forward difference

Ø Backward difference

(23)

B.D. Youn 23

2010 Engineering Mathematics II Module 5

Is High-Order Polynomial a Good Idea?

f(x) = 1/(1+25x^2)

(24)

Ø Method of interpolation used to avoid numerical instability

Ø Idea: given an interval [a, b] where the high-degree polynomial can oscillate considerable, we subdivide [a, b] in several smaller intervals and use several low-degree polynomials (which cannot oscillate much)

SPLINES

(25)

B.D. Youn 25

2010 Engineering Mathematics II Module 5

SPLINES (cont)

Ø In an interval x Î [x

j

, x

j+1

], j = 0 , ¼, n – 1

where

( ) j j ( j ) j ( j ) 2 j ( j ) 3

j x a a x x a x x a x x

p =

0

+

1

- +

2

- +

3

-

( ) ( )

(

j j

) (

j j

)

j

j j

j j

j j j

j j

j j

j j

j j

k h k

f h f

a

k h k

f h f

x p a

k x

p a

f x

p a

+ +

-

=

+ -

-

¢¢ =

=

¢ =

=

=

=

+ +

+ +

2 1 3 1

3

1 2 1

2 1 0

1 2

1 2 ) 3

2 ( 1

) (

)

(

(26)

SPLINES (cont)

Ø Let (x 0 ,f 0 ), (x 1 ,f 1 ), … , (x n ,f n ).

Ø k 0 , k n are two given numbers.

Ø k 1 , k 2 , ¼, k n-1 are determined by a linear system of n-1 equations:

Ø h is the distance between nodes x n = x 0 + nh

( )

( ) , ' ( 1 ) ( j 0, 1, , n - 1 )

'

4 3

1 1 1

1 1

= K

= +

=

-

= +

+

+ - +

+ -

j j

j j

j j

j j

j j

j

k x

p k

x p

f h f

k k

k

(27)

B.D. Youn 27

2010 Engineering Mathematics II Module 5

SPLINES (cont)

Ø Clamped conditions

g'(x 0 ) = f'(x 0 ), g'(x n ) = f'(x n )

Ø Free/natural conditions

g"(x 0 ) = 0, g"(x n ) = 0

Ø Example:

Interpolate f(x) = x 4 on interval x Î [-1, 1] by cubic spline in partitions x 0 = -1, x 1 = 0, x 2 = 1, satisfying clamped conditions

g'(-1) = f'(-1), g'(1) = f'(1)

(28)

SPLINES (cont)

(29)

B.D. Youn 29

2010 Engineering Mathematics II Module 5

SPLINES (cont)

(30)

NUMERICAL INTEGRATION

Ø Numerical evaluation of integrals whose analytical evaluation is too complicated or impossible, or that are given by recorded numerical values

Ø Rectangular rule Ø Trapezoidal rule Ø Simpson's rule

ò ( )

b

a

dx

x

f

(31)

B.D. Youn 31

2010 Engineering Mathematics II Module 5

RECTANGULAR RULE

Ø Approximation by n rectangular areas

where

h x

x

n a h b

0

1 = +

= -

( ) [ ( ) ( ) ( n ) ]

b

a

x f x

f x

f h dx

x f

J = ò » * 1 + * 2 + L + *

(32)

TRAPEZOIDAL RULE

Ø Approximation by n trapezoidal areas

( ) ( ) ( ) ( ) ( ) ( ) ú

û ù ê ë

é + + + + +

»

= ò f x dx h f a f x f x f x - f b

J n

b

a 2

1 2

1

1 2

1 L

(33)

B.D. Youn 33

2010 Engineering Mathematics II Module 5

TRAPEZOIDAL RULE

(34)

SIMPSON'S RULE

Ø Approximation by parabolas using Lagrange polynomials p

2

(x)

Ø Interval of integration [a, b] divided into an even number of subintervals

( )

( ) ( )

( )

j j

m m

m b

a

x f f

f f

f f

f f

h f dx

x f

h x

h a x

m f a h b

=

+ +

+ +

+ +

+

»

+

= +

= - =

=

-

ò

0 1 2 3 2 -2 2 1 2

1 2

1 0

0

4 2

4 2

3 4

x x

f 2

L

(35)

B.D. Youn 35

2010 Engineering Mathematics II Module 5

SIMPSON'S RULE

(36)

SIMPSON'S RULE

(37)

B.D. Youn 37

2010 Engineering Mathematics II Module 5

ADAPTIVE INTEGRATION

(38)

GAUSS INTEGRATION

where

( ) ò ( ) å

ò

¥ - =

»

=

1 j

j j 1

1 b

a

f A dt

t f dx

x f

( ) ( )

[ ]

( ) j

j

n 1

t f f

ts coefficien

A , , A

1 t b 1 - t 2 a x 1

=

Þ

+ +

=

K

참조

관련 문서

(c) the same mask pattern can result in a substantial degree of undercutting using substantial degree of undercutting using an etchant with a fast convex undercut rate such

Development of Design Information Template for Nuclear Power Plants for Electromagnetic Pulse ( EMP ) Effect Analysis. Minyi Kim, Hosun Ryu, Songhae Ye, and

The Korean economy succeeded in economic development through an export-led growth policy. In addition, the Korean economy has maintained a very high degree

The degree of stress in accordance with general characteristics of the subjects showed no signifiant statistical difference, while the degree of physical

Therefore, cTnT is a recommended biomarker for use in the detection of myocardial infarction (MI) and in acute coronary syndromes.[8] Indeed, several authors

Two matrices A=[a jk ] and B=[b jk ] are equal, written A=B, if and only if they have the same size and the corresponding entries are equal, that is, a 11 =b 11 , a 12 =b 12 ,

In this thesis, we introduce a Hurwitz polynomial ring and study the irreduciblity of Hurwitz polynomials over  We also investigate the irreduciblilty of

 A crack in a thin sheet  a steeper R curve than a crack in a thick plate because of a low degree of stress triaxiality (3축) at the crack tip in the thin sheet, while