week04_multiple roots&nonlinear equations

18

Upload: mxr-3

Post on 21-Jul-2016

18 views

Category:

Documents


3 download

TRANSCRIPT

WEEK 4

Roots of Equations Multiple Roots

Systems of Nonlinear Equations

2

At the end of this topic, the students will be able:

To solve roots for polynomials systems and

system of non-linear equations

LESSON OUTCOMES

4

Multiple Roots

• Corresponds to a point where a function is tangent to the x axis at that point. For example, following polynomials have:

• Double root

– f(x) = (x–3)(x–1)(x–1) ~ one value of x makes two terms in the equation equal to zero

– Axis is not cross (even roots)

• Triple root

– f(x) = (x–3)(x–1)(x–1)(x–1) ~ one value of x makes three terms in the equation equal to zero

– Axis is cross (odd roots)

375)( 23 xxxxf

310126)( 234 xxxxxf

5

Figure shows (a) through (c) show

several cases of multiple roots. Consequently, multiple roots pose several limitations for the numerical methods. There are two possible difficulties: 1. For a function with even multiple

roots, the function does not change sign over the interval. Thus, it eliminates the use of the reliable bracketing methods.

2. At the multiple roots, both f(x) and f’(x) are zero or approach zero. This poses problems for both Newton-Raphson and secant methods.

To overcome these two problems,

a modified Newton-Raphson method is used.

6

• Introducing the new function u(x) as the ratio of the function and its first derivative as

• Using quotient rule for the derivative,

• The modified Newton-Raphson method in terms of u(x) is then

)(

)()(

i

ii

xf

xfxu

This function has roots

at all the same locations

as the original function

2)(

)('')()(')(')('

i

iiii

xf

xfxfxfxfxu

)('

)(1

i

iii

xu

xuxx

7

• Then, modified Newton-Raphson Method

• The denominator will not be zero even if f’(x) is zero. Therefore, the formula is said to be more stable.

It is preferable for multiple roots, it is somewhat less efficient.

Unless necessary, this method is seldom used in practice due more computational effort involved.

)('')()(

)(')(21

iii

iiii

xfxfxf

xfxfxx

8

375)( 23 xxxxf

Example

Use both standard and modified Newton-Raphson methods to evaluate the multiple root for with an initial guess of x0 = 0.

Refer Example 6.9

9

Exercise

Use the modified Newton-Raphson method to find

the root of the following polynomial function

f(x) = x3 - 7x2 + 8x +16 = 0

until the relative error is less than 0.05%.

Use (i) x = 0 and (ii) x = 2.0 as initial guess.

10

Ite. xi f(xi) f’(xi) f’’(xi) xi+1 εa(%)

1 0.0 16.0 8.0 -14.0 -0.4444 -

2 -0.4444 0.9739 14.8147 -16.6667 -0.8485 47.619

3 -0.8485 3.5618 22.0386 -19.0909 -0.9903 14.316

4 -0.9903 0.2427 24.8053 -19.9415 -0.9999 0.970

5 -0.9999 0.00095 24.9992 -19.9998 -1.0000 0.004

i) x = 0

ii) x = 2

Ite. xi f(xi) f’(xi) f’’(xi) xi+1 εa(%)

1 2.0 12.0 -8.0 -2.0 3.0909 -

2 3.0909 3.3809 -6.6116 4.5455 3.8796 20.327

3 3.8796 0.07083 -1.1613 9.2771 3.9985 2.975

4 3.9985 0.000012 -0.01523 9.9909 3.9999 0.038

Note: f’(x) does not approach zero, so x = 1.0 is not a multiple root.

Note: f’(x) approaches zero, so x = 3.9999 (essentially 4.0) is a multiple root.

11

SYSTEMS OF NONLINEAR EQUATIONS

Linear equations

Which can be solved for

0),,,,(

0),,,,(

0),,,,(

321

3212

3211

nn

n

n

xxxxf

xxxxf

xxxxf

0...)( 2211 bxaxaxaxf nn

12

Non-linear equations

Which can be solved for using expression:

573

10

2

2

xyy

xyx

0573),(

010),(

2

2

xyyyxv

xyxyxu

13

• Solution of the nonlinear equations using open methods

Fixed point iteration

Newton Raphson

14

Example: Fixed point iteration

Determine the roots using fixed-point iteration with initial guesses of x = 1.5 and y = 3.5

0573),(

010),(

2

2

xyyyxv

xyxyxu

Refer Example 6.10

• Taylor series expansion of a function of more than one variable

• The root of the equation occurs at the value of x and y where ui+1 and vi+1 equal to zero.

y

vyy

x

vxxvv

y

uyy

x

uxxuu

iii

iiiii

iii

iiiii

)()(

)()(

111

111

Newton-Raphson method

16

y

vy

x

vxvy

y

vx

x

v

y

uy

x

uxuy

y

ux

x

u

ii

iiii

ii

i

ii

iiii

ii

i

11

11

x

v

y

u

y

v

x

ux

vu

x

uv

yy

x

v

y

u

y

v

x

u

y

uv

y

vu

xx

iiii

ii

ii

ii

iiii

ii

ii

ii

1

1

• Then, the equation can be arranged to

Determinant of

the Jacobian of

the system.

Two equation

version of

Newton-Raphson

method

17

Example: Newton Raphson

Use the multiple-equation Newton-Raphson method to determine roots with initial guesses of x = 1.5 and y = 3.5

Refer Example 6.11

0573),(

010),(

2

2

xyyyxv

xyxyxu

18

Exercise

Determine the roots of the following

simultaneous equations using

(a) fixed-point iteration

(b) Newton-Raphson method

y = -x2 + x + 0.75

y + 5xy = x2

Employ initial guesses of x=y=1.2 until the

approximate error is less than 0.05%.