Approximate Solution of Equations Solve the equation Graphical Method

Download Report

Transcript Approximate Solution of Equations Solve the equation Graphical Method

Approximate Solution of Equations Graphical Method

Example :

Solve the equation x

2

+ 2x - 1 = 0

Method 1 : Draw the graph y = x 2 + 2x - 1

-3 y = x 2 + 2x - 1 2 3 y -2 -1 1 -1 -2 1 2 3 x

x -3 2 y -2 -1 -1 -2 0 -1 1 2 2 7 3 14

-3

0.8

0.6

0.4

0.2

0 -0.2

-0.4

-0.6

-0.8

-2.8

-2.6

-2.4

x = -2.4

-2.2

x x -3 2.0

y -2.8 1.2

-2.6 0.6

-2.4 0.0

-2.2 -0.6

-2 -1.0

Method 1 : Draw the graph y = x 2 + 2x - 1

3 y 2 y = x 2 + 2x - 1 1 3 x -3 -2 -1 1 2 -1 -2 -3

0.8

0.6

0.4

0.2

0 -0.2

-0.4

-0.6

-0.8

0.2

0.4

0.6

x = 0.4

0.8

x x 0 y -1.0

0.2 -0.6

0.4 0.0

0.6 0.6

0.8 1.2

1 2.0

Method 2 : Use of the given graph y = x 2 •Rewrite the equation as x 2 = -2x + 1 •Add the line y = -2x + 1 on the same graph paper •Note the x -coordinates of the points of intersection

-4 -3 -2 -1 -1 -2 2 1 5 4 3 7 y 6 y = x 2 1 2 3 4 x 5 y = -2x+1

Drawing Software :

Winplot

http://math.exeter.edu/rparris

Graphmatica

http://www.pair.com/ksoft

Answer to Worksheet Exercise 1: Use the graph y = 2x 2 x 2 – x – 1 = 0 to solve Rewrite the equation as x 2 2x 2 = x + 1 = 2x + 2 Draw the line y = 2x + 2

y = 2x 2

(-0.6, 0.7)

-2 2 1 6

y y

(1.6, 5.3)

5 4 3 -1 -0.6

0 y = 2x+2 1 1.6

2

x x

Answer to Worksheet Exercise 1: Use the graph y = 2x 2 4x 2 + x – 6 = 0 to solve Rewrite the equation as 4x 2 2x 2 = -x + 6 = -x/2 + 3 Draw the line y = -x/2 + 3

y = 2x 2 -2 -1.4

-1 2 1 6

y y

5 4 3 0 y = -x/2+3 1 1.1

2

x x

Approximate Solution of Equations Method of Bisection

Example :

Solve the equation x

3

- 3x

2

+ 5 = 0

Step 1 : Locate the root

y = x 3 - 3x 2 + 5 5 y -3 -2 -1 4 3 2 1 -1 1 2 3 x 4

x -2 -1 0 1 2

-2

The root lies between -2 and -1 y -15 1 5 3 1

Step 2 : Find the mid-point of the interval that contains the root

-2 -1

Mid-point = 1 (-2 + -1) = -1.5

2

Step 3 : Choose the half-interval that contains the root

-2 -1.5

-1

f(x) = x 3 - 3x 2 + 5

x f(x)

-2 -1.5

-15 -5.13 -1 1

-1.5

-1.25

-1 x f(x)

-1.5

-5.13 -1.25

-1.64 -1 1

-1.25

-1.125

-1 x f(x)

-1.25

-1.641 -1.125

-0.221 -1 1

-1.125

-1.0625

-1 x f(x)

-1.125

-0.221 -1.0625

0.4138

-1 1 Root of x 3 - 3x 2 + 5 = 0 is

-1.1

(1 d.p.)

-1.125

-1.0938

-1.0625

x f(x)

-1.125 -1.09375 -1.063

-0.221 0.1027 0.4138

Method of Bisection

Find the interval that contains the root No Find the mid-point Answer Yes Precise enough ?

Choose the half-interval that contains the root

a -

-2

-2 -1.5

-1.25

-1.125

-1.125

+ -1

b -1 -1 -1 -1 -1.0625

f(-2) = -15

a

b

2 -1.5

-1.25

-1.125

-1.0625

f(-1) = 1

b f

2 -5.13

-1.64

-0.22

0.42

Root of x 3 - 3x 2 + 5 = 0 is –1.1

(1d.p.)

Method of Bisection Use of Excel Spreadsheet

a

-2 -1.5

-1.25

-1.125

-1.125

-1.125

-1.1094

b

-1 -1 -1 -1 -1.0625

-1.0938

-1.0938

(a+b)/2

-1.5

-1.25

-1.125

-1.0625

-1.0938

-1.1094

-1.1016

f(a)

-15 -5.125

-1.6406

f(b)

1 1

f(mid-value)

-5.125

-1.640625

1 -0.2207031

-0.2207

1 -0.2207 0.41382

0.4138184

0.1026917

-0.2207 0.10269 -0.0574608

-0.0575 0.10269

0.0230002

Answer to Worksheet Exercise 3: Find a root of 2x 4 – 3x – 5 = 0

x f(x)

0 -5 1 -6 2 21 Bracketing interval : 1 < x 0 < 2 3 148

a

1 1 1.25

1.375

1.4375

1.46875

b

2 1.5

1.5

1.5

1.5

1.5

a

b

2

1.5

1.25

1.375

1.4375

1.46875

f b

2

0.625

-3.87

-1.98

-1.98

-0.77

The root is 1.5

(2 sig. fig.)

Answer to Worksheet Exercise 4: Find a root of x 3 – 7x +2 = 0

a

-3 -3 -3 -2.875

-2.8125

-2.78125

b

-2 -2.5

-2.75

-2.75

-2.75

-2.75

-2.78125 -2.765625

-2.78125 -2.773438

-2.78125 -2.777344

(a+b)/2

-2.5

-2.75

-2.875

f(a)

-4 -4

f(b)

3.875

8

f(mid-value)

3.875

0.453125

-4 0.45313 -1.638672

-2.8125 -1.6387 0.45313 -0.559814

-2.78125 -0.5598 0.45313 -0.045197

-2.76563 -0.0452 0.45313 0.2059898

-2.77344 -0.0452 0.20599 0.0809045

-2.77734 -0.0452

0.0809 0.0179811

-2.7793 -0.0452 0.01798 -0.013576

Useful Websites for Method of Bisection http://www.rohan.sdsu.edu/faculty/ symbol/bisect.html

http://www.krellinst.org/UCES/archive/ resources/roots/node2.html