Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rearranging the equation f(x)=0 into the form x=g(x)

Similar presentations


Presentation on theme: "Rearranging the equation f(x)=0 into the form x=g(x)"— Presentation transcript:

1 Rearranging the equation f(x)=0 into the form x=g(x)

2 If I want to solve the equation
x3-x2-3x+0.5=0 we can draw a graph and read off the points where it crosses the x axis. But we can also solve it by rearranging the equation and finding where the 2 graphs cross. Both ways find the root.

3 x3-x2-3x+0.5=0 3x=x3-x2+0.5 x=(x3-x2+0.5)/3
So we can now plot the graphs of the 2 functions y=x and y=(x3-x2+0.5)/3 Iterative formula used to find the root.

4 y=x3-2x2-3x+0.5 All the same roots y=x y=(x3-2x2+0.5)/3

5 Using the iterative formula
From the graph you can tell that there is root in the interval [0,1]. I will let my starting value x1=1 and then find x2 by substitution. x g(x) 1 2 3 4 5 6 7 8

6 What does this look like on the graph?
What to do Choose a value of x, x1. Find corresponding value of g(x1). Take value g(x1) as new x, x2. Find value of g(x2). What this looks like Take starting point on x axis. Move vertically to curve. Move across to line.

7 What it looks like on a graph.
STAIRCASE

8 COBWEB

9 Failure This method fails if at the root of y=g(x) and y=x the gradient is>1 or <-1. You need to show failure using excel too

10 If g ‘(x) is small then we get rapid convergence.
If g ‘(x) is close to ±1 then we get slow convergence. If g ‘(x) is > ±1 then we get failure. ie divergence. You can also get failure when you find another root from what you wanted to find.


Download ppt "Rearranging the equation f(x)=0 into the form x=g(x)"

Similar presentations


Ads by Google