lec5

Page 1

SOLUTIONS TO NON-LINEAR EQUATION

1


Continuation…

d. NEWTON RAPHSON ST 1 METHOD


f ( xi ) f ' ( xi ) = xi − xi +1 xi − xi +1

f ( xi ) = f ' ( xi )

f ( xi ) xi +1 = xi − f ' ( xi )


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + with an interval of (1,2). Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) 2 f’(x) =cos x − 2 x sin(1 + x )

x2 ) −1

f ( xi ) xi +1 = xi − f ' ( xi ) i

Xi

f(Xi)

f’(Xi)

Xi+1

0

2

0.1930

3.4196

1.9436

1

1.9436

-0.0035

3.5147

1.9446

2

1.9446

0

3.5148

1.9446


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + with an interval of (1,2). Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) 2 f’(x) =cos x − 2 x sin(1 + x )

x2 ) −1

f ( xi ) xi +1 = xi − f ' ( xi ) i

Xi

f(Xi)

f’(Xi)

Xi+1

0

2

0.1930

3.4196

1.9436

1

1.9436

-0.0036

3.5147

1.9446

2

1.9446

0.0000

3.5148

1.9446


NEXT TOPIC:

e. NEWTON RAPHSON ND 2 METHOD


•Uses the 2nd derivative of the function

 f ' ' ( xi ) f ' ( xi )  xi +1 = xi +  −   2 f ' ( xi ) f ( xi ) 

−1


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + x with an interval of (1,2). Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) 2 cos x − 2 x sin( 1 + x ) f’(x) = 2 2 2 − sin x − 4 x cos( 1 + x ) − 2 sin( 1 + x ) f” (x) = −1

 f ' ' ( xi ) f ' ( xi )  xi +1 = xi +  −  2 f ' ( x ) f ( x ) i i  

2

) −1

C D E = −   2C B 

−1

+A

A

B

C

D

E

i

Xi

f(Xi)

f’(Xi)

f”(Xi)

Xi+1

0

2

0.1930

3.4196

-3.5300

1.9452

1

1.9452

0.0021

3.5148

-0.0158

1.9446

2

1.9446

0

3.5148

0.0202

1.9446


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + x with an interval of (1,2). Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) 2 cos x − 2 x sin( 1 + x ) f’(x) = 2 2 2 − sin x − 4 x cos( 1 + x ) − 2 sin( 1 + x ) f” (x) =

2

) −1

A

B

C

D

E

i

Xi

f(Xi)

f’(Xi)

f”(Xi)

Xi+1

0

2

0.1930

3.4196

-3.5300

1.9452

1

1.9452

0.0020

3.5148

-0.0139

1.9446

2

1.9446

0.0000

3.5148

0.0197

1.9446

 f ' ' ( xi ) f ' ( xi )  xi +1 = xi +  −  2 f ' ( x ) f ( x ) i i  

−1

C D E = −   2C B 

−1

+A


NEXT TOPIC:

f. SECANT METHOD


− f ( x i −1 ) f ( xi ) = xi +1 −x i −1 xi − xi +1

− xi f ( xi −1 ) + xi + 1 f ( xi −1 ) = xi + 1 f ( x i ) − xi −1 f ( xi ) xi −1 f ( xi ) − xi f ( xi −1 ) = xi +1 [ f ( xi ) − f ( xi −1 )] xi −1 f ( xi ) − xi f ( xi −1 ) xi +1 = f ( xi ) − f ( xi −1 )


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + with an interval of (1,2). Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2)

xi −1 f ( xi ) − xi f ( xi −1 ) xi +1 = f ( xi ) − f ( xi −1 )

C

x ) −1 2

E=

AD-CB D-B

D

E

A

B

i

Xi-1

f(Xi-1)

(Xi)

f(Xi)

Xi+1

0

1

-0.5747

2

0.1930

1.7486

1

2

0.1930

1.7486

-0.6248

1.9407

2

1.7486

-0.6248

1.9407

-0.0137

1.9450

3

1.9407

-0.0137

1.9450

0.0014

1.9446

4

1.9450

0.0014

1.9446

0

1.9446


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + with an interval of (1,2). Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) A

B

i

Xi-1

f(Xi-1)

(Xi)

f(Xi)

Xi+1

0

1

-0.5747

2

0.1930

1.7486

1

2

0.1930

1.7486

-0.6247

1.9407

2

1.7486

-0.6247

1.9407

-0.0138

1.9450

3

1.9407

-0.0138

1.9450

0.0014

1.9446

4

1.9450

0.0014

1.9446

0.0000

1.9446

xi −1 f ( xi ) − xi f ( xi −1 ) xi +1 = f ( xi ) − f ( xi −1 )

C

x ) −1

D

2

E=

AD-CB D-B

E


NEXT TOPIC:

g. MODIFIED SECANT METHOD


•Uses a fractional perturbation, δ 

mathematical methods that give approximate solutions to problems that cannot be solved exactly

δ xi f ( xi ) xi +1 = xi − f ( xi + δ xi ) − f ( xi )


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + x ) − 1 with an interval of (1,2) and δ=0.02 Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) δ=0.02 2

δ xi f ( xi ) xi +1 = xi − f ( xi + δ xi ) − f ( xi )

 CB  E = A − D − B  

A

B

C

i

Xi

f(Xi)

δXi

D f(Xi+δXi )

E

0

2

0.1930

0.0400

0.3262

1.9421

1

1.9421

-0.0088

0.0388

0.1272

1.9446

2

1.9446

0

Xi+1

1.9446


Example: 1. 

Solve for the roots of f(x) = sin x + cos(1 + x ) − 1 with an interval of (1,2) and δ=0.02 Solution: 2 sin x + cos( 1 + x ) −1 f(x) = x∈(1,2) δ=0.02 2

A

B

i

Xi

f(Xi)

δXi

D f(Xi+δXi )

0

2

0.1930

0.0400

0.3262

1.9421

1

1.9421

-0.0089

0.0388

0.1271

1.9446

2

1.9446

0.0000

0.0389

0.1361

1.9446

δ xi f ( xi ) xi +1 = xi − f ( xi + δ xi ) − f ( xi )

C

E

Xi+1

 CB  E = A − D − B  


End of Solutions to Non-Linear Equation

GOD BLESS TO YOUR EXAM…

18


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.