approximate solution of equations example : solve the equation x 2 + 2x - 1 = 0 graphical method

24
Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Upload: joel-mclaughlin

Post on 11-Jan-2016

258 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Approximate Solution of Equations

Example : Solve the equationx2 + 2x - 1 = 0

Graphical Method

Page 2: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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

-3 -2 -1 1 2 3

-3

-2

-1

1

2

3

x

yy = x2 + 2x - 1 x y

-3 2-2 -1-1 -20 -11 22 73 14

Page 3: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

x-2.8 -2.6 -2.4 -2.2

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

x = -2.4

x y

-3 2.0-2.8 1.2-2.6 0.6-2.4 0.0-2.2 -0.6-2 -1.0

Page 4: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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

y = x2 + 2x - 1

-3 -2 -1 1 2 3

-3

-2

-1

1

2

3

x

y

Page 5: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

x0.2 0.4 0.6 0.8

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

x = 0.4

x y

0 -1.00.2 -0.60.4 0.00.6 0.60.8 1.21 2.0

Page 6: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Method 2 : Use of the given graph y = x2

•Rewrite the equation as x2 = -2x + 1

•Add the line y = -2x + 1 on the same

graph paper

•Note the x-coordinates of the points of

intersection

Page 7: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

-4 -3 -2 -1 1 2 3 4 5

-2

-1

1

2

3

4

5

6

7

x

y

y = -2x+1

y = x2

Page 8: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Drawing Software :

http://math.exeter.edu/rparris

Winplot

Graphmatica

http://www.pair.com/ksoft

Page 9: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Answer to Worksheet Exercise 1:Use the graph y = 2x2 to solve

x2 – x – 1 = 0

Rewrite the equation as x2 = x + 1

2x2 = 2x + 2

Draw the line y = 2x + 2

Page 10: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

x

y

-1 1-2 2

1

2

3

4

5

6

0

y = 2x2

x

y

-0.6 1.6

y = 2x+2

(-0.6, 0.7)

(1.6, 5.3)

Page 11: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Answer to Worksheet Exercise 1:Use the graph y = 2x2 to solve

4x2 + x – 6 = 0

Rewrite the equation as 4x2 = -x + 6

2x2 = -x/2 + 3

Draw the line y = -x/2 + 3

Page 12: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

x

y

-1 1-2 2

1

2

3

4

5

6

0

y = 2x2

x

y

y = -x/2+3

-1.4 1.1

Page 13: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Method of Bisection

Example :

Solve the equationx3 - 3x2 + 5 = 0

Approximate Solution of Equations

Page 14: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

-3 -2 -1 1 2 3 4

-2

-1

1

2

3

4

5

x

y

Step 1 : Locate the root

The root lies between -2 and -1

x y

-2 -15-1 10 51 32 1

y = x3 - 3x2 + 5

Page 15: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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

2

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

Mid-point =

Page 16: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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

-2 -1-1.5x -2 -1.5 -1

f(x) -15 -5.13 1

f(x) = x3 - 3x2 + 5

-1.5 -1-1.25x -1.5 -1.25 -1

f(x) -5.13 -1.64 1

Page 17: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

-1.25 -1-1.125x -1.25 -1.125 -1

f(x) -1.641 -0.221 1

-1.125 -1-1.0625x -1.125 -1.0625 -1

f(x) -0.221 0.4138 1

-1.125 -1.0625-1.0938x -1.125 -1.09375 -1.063

f(x) -0.221 0.1027 0.4138

Root of x3 - 3x2 + 5 = 0 is -1.1 (1 d.p.)

Page 18: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Method of Bisection

Find the interval that contains the root

Find the mid-point

Choose the half-intervalthat contains the root

Preciseenough

?

No

AnswerYes

Page 19: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

a b 2

ba

2

baf

-1.5 -5.13-2 -1

-2 -1- +

f(-2) = -15 f(-1) = 1

-1.5 -1 -1.25 -1.64

-1.25 -1 -1.125 -0.22

-1.125 -1 -1.0625 0.42

-1.125 -1.0625

Root of x3 - 3x2 + 5 = 0 is –1.1 (1d.p.)

Page 20: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

Use of Excel Spreadsheet

Method of Bisection

a b (a+b)/2 f(a) f(b) f(mid-value)

-2 -1 -1.5 -15 1 -5.125-1.5 -1 -1.25 -5.125 1 -1.640625

-1.25 -1 -1.125 -1.6406 1 -0.2207031-1.125 -1 -1.0625 -0.2207 1 0.4138184-1.125 -1.0625 -1.0938 -0.2207 0.41382 0.1026917-1.125 -1.0938 -1.1094 -0.2207 0.10269 -0.0574608

-1.1094 -1.0938 -1.1016 -0.0575 0.10269 0.0230002

Page 21: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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

x 0 1 2 3f(x) -5 -6 21 148

Bracketing interval : 1 < x0 < 2

Page 22: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

a b

1 2 1.5 0.625

1 1.5 1.25 -3.87

1.25 1.5 1.375 -1.98

1.375 1.5 1.4375 -1.98

1.4375 1.5 1.46875 -0.77

1.46875 1.5

2

ba

2

baf

The root is 1.5 (2 sig. fig.)

Page 23: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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

a b (a+b)/2 f(a) f(b) f(mid-value)

-3 -2 -2.5 -4 8 3.875-3 -2.5 -2.75 -4 3.875 0.453125-3 -2.75 -2.875 -4 0.45313 -1.638672

-2.875 -2.75 -2.8125 -1.6387 0.45313 -0.559814-2.8125 -2.75 -2.78125 -0.5598 0.45313 -0.045197

-2.78125 -2.75 -2.76563 -0.0452 0.45313 0.2059898-2.78125 -2.765625 -2.77344 -0.0452 0.20599 0.0809045-2.78125 -2.773438 -2.77734 -0.0452 0.0809 0.0179811-2.78125 -2.777344 -2.7793 -0.0452 0.01798 -0.013576

Page 24: Approximate Solution of Equations Example : Solve the equation x 2 + 2x - 1 = 0 Graphical Method

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