Download presentation

Presentation is loading. Please wait.

Published bySheldon Harte Modified about 1 year ago

1
© Boardworks Ltd of 35 © Boardworks Ltd of 35 A-Level Maths: Core 3 for Edexcel C3.7 Numerical methods This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions, see the Getting Started presentation.

2
© Boardworks Ltd of 35 Contents © Boardworks Ltd of 35 Using graphs to solve equations The change-of-sign rule Solving equations by iteration Examination-style question Using graphs to solve equations

3
© Boardworks Ltd of 35 Most of the equations we have looked at so far have had exact solutions (or roots) that could be found using a series of algebraic manipulations. However, this is not true of all equations. For example: cannot be solved exactly by any obvious algebraic method. The first step in solving most equations of this type is to sketch a graph. The graph will tell us how many roots there are and their approximate locations. x x – 3 = 0, e x = x – 2,sin x = ln x + 1 Using graphs to solve equations

4
© Boardworks Ltd of 35 Using graphs to solve equations By sketching an appropriate graph find approximate roots to the equation x 3 = 3 x + 1. The first is to consider the left-hand side and the right-hand side of the equation as two separate functions. x 3 = 3 x + 1 y = x 3 y = 3 x + 1 The points where these two functions intersect will give us the roots to the equation x 3 = 3 x + 1. There are two ways to approach this.

5
© Boardworks Ltd of 35 Using graphs to solve equations –1–2–3– –2 –4 – The graphs of y = x 3 and y = 3 x + 1 intersect at three points. This means that the equation x 3 = 3 x + 1 has three solutions. The graph shows that these solutions are approximately: x = –1.5 x = –0.3 x = 1.9 y = x 3 y = 3 x + 1

6
© Boardworks Ltd of 35 Using graphs to solve equations The second approach is to rearrange the equation so that all the terms are on the left-hand side: The line y = 0 is the x -axis. This means that the roots to the equation x 3 – 3 x – 1 = 0 are given by the x -coordinates of the points where the function y = x 3 – 3 x – 1 crosses the x -axis. x 3 – 3 x – 1 = 0 y = x 3 – 3 x – 1 y = 0

7
© Boardworks Ltd of 35 –1–2–3– –2 –4 – Using graphs to solve equations Again, the roots are to be found approximately: x = –1.5 x = –0.3 x = 1.9 These roots can be found to a greater degree of accuracy by using a graphical calculator or graph-plotting program to ‘zoom in’ on them. y = x 3 – 3 x – 1

8
© Boardworks Ltd of 35 Using graphs to solve equations

9
© Boardworks Ltd of 35 Contents © Boardworks Ltd of 35 Using graphs to solve equations The change-of-sign rule Solving equations by iteration Examination-style question The change-of-sign rule

10
© Boardworks Ltd of 35 The change-of-sign rule Suppose a function f ( x ) is continuous. In other words it has no breaks in it. The solution (or solutions) to f ( x ) = 0 are given by the x -values of the points where y = f ( x ) crosses the x –axis. The change-of-sign rule states that: If two values of x, a and b, can be found such that f ( a ) and f ( b ) are of different sign then f ( x ) = 0 must have at least one root in the interval [ a, b ].

11
© Boardworks Ltd of 35 The change-of-sign rule To see how this works in practice consider the equation We can start by sketching a graph to see how many roots there are and their approximate locations. Rather than try to sketch the graph of y = x – cos x we can sketch the graphs of y = x and y = cos x. x – cos x = 0 y 0 –1 x 0 1 y = x y = cos x We can see from this graph that there is one root about half-way between x = 0 and x = That is, around ≈ 0.8.

12
© Boardworks Ltd of 35 The change-of-sign rule Now, let f ( x ) = x – cos x. When x = 0.8, f (0.8) = 0.8 – cos 0.8≈ 0.1 So f (0.8) is positive. Let’s try x = 0.7 next. f (0.7) = 0.7 – cos 0.7≈ –0.06 So f (0.7) is negative. The sign changes from positive to negative and so f ( x ) must equal 0 somewhere between x = 0.7 and x = 0.8. We can therefore conclude that the equation x – cos x = 0 has a root between 0.7 and 0.8.

13
© Boardworks Ltd of 35 The change-of-sign rule Show that the equation x = 4 x has a root between x = 1 and x = 2. Start by rearranging the equation into the form f ( x ) = 0. x 3 – 4 x + 2 = 0 Now let f ( x ) = x 3 – 4 x + 2. f (1) = (1) 3 – 4(1) + 2 f (2) = (2) 3 – 4(2) + 2 = –1 = 2 Since f (1) 0, there must be a root to the equation f ( x ) = 0 between x = 1 and x = 2.

14
© Boardworks Ltd of 35 Decimal search The change-of-sign-rule can be used to find the roots to any required degree of accuracy. However, a large number of calculations is required to progressively narrow down the interval. Using a decimal search is the traditional method of doing this.

15
© Boardworks Ltd of 35 Problems with the change-of-sign rule There are some potential problems with using the change-of- sign method to locate roots. These include cases where: y = f ( x ) has a repeated root In this situation the graph of y = f ( x ) touches the x -axis without crossing it: Here we can see that f ( a ) and f ( b ) have the same sign even though there is a root between x = a and x = b. We would therefore have to find this root using an alternative method. a b y = f ( x )

16
© Boardworks Ltd of 35 Problems with the change-of-sign rule If there is a discontinuity in a given interval then f ( a ) and f ( b ) may have different signs even though there isn’t a root between a and b. There is a discontinuity in a given interval In some cases there may be several roots close together. There is more than one root in a given interval In this example there are three roots between x = a and x = b. a b y = f ( x ) a b

17
© Boardworks Ltd of 35 Contents © Boardworks Ltd of 35 Using graphs to solve equations The change-of-sign rule Solving equations by iteration Examination-style question Solving equations by iteration

18
© Boardworks Ltd of 35 Solving equations by iteration This method works by using a recurrence relation to generate a sequence of approximations that get closer to the root each time. The first step is to write the equation we are trying to solve in the form x = f ( x ). We then write this as an iterative formula of the form: If the resulting sequence converges then this limiting value will be a root of x = f ( x ). Note that several different formulae are usually possible. Some may produce convergent sequences and some may not.

19
© Boardworks Ltd of 35 Solving equations by iteration For example, suppose we want to solve the equation 5 x – e x = 0 One way to write this equation in the form x = f ( x ) is: This gives us the iterative formula: Now we can substitute an initial value for x 0 into this formula in the hope of generating a sequence that converges towards the root of the original equation.

20
© Boardworks Ltd of 35 Solving equations by iteration Let’s try an initial value of x 0 = 1: x 0 = 1

21
© Boardworks Ltd of 35 Solving equations by iteration The values are converging towards (to 3 d.p.). There is a change of sign and so (to 3 d.p.) is a root of 5 x – e x = 0. We can conclude that this is a root of our original equation. Continuing this process gives: x 6 = …, x 7 = …, x 8 = …, x 8 = … To prove that this is a root of 5 x – e x = 0 we can show that if f ( x ) = 5 x – e x there is a change of sign between f (0.2585) and f (0.2595): f (0.2585) = 5(0.2585) – e ≈ –0.002 f (0.2595) = 5(0.2595) – e ≈ negative positive

22
© Boardworks Ltd of 35 Solving equations by iteration If you have a calculator with an ANS key then the iterative process can be made much quicker. You then key in the formula as: e ANS ÷ 5 Now, each time you press the equals key you will be given the next value in the sequence. To see why these values are converging towards the root, consider the equation again in the form: Plotting the graphs of y = x and will show that there are two points of intersection. In this example you would start by keying in the initial value 1, followed by the = key.

23
© Boardworks Ltd of 35 Solving equations by iteration Using the starting value of x = 1 we get progressively closer to the first intersection point. We can demonstrate this graphically:

24
© Boardworks Ltd of 35 Looking a different arrangements This leads to the iterative formula: Suppose we had arranged our original equation, 5 x – e x = 0, in another form. For example: If we use the same start value of x 0 = 1 we get: x 1 = …, x 2 = …, x 3 = …, x 4 = …, x 5 = …, This time, using the same start value but a different formula, the sequence converges towards (to 3 d.p.). x 6 = …, x 7 = …, x 8 = …, x 9 = …, x 10 = …, x 11 = …

25
© Boardworks Ltd of 35 Solving equations by iteration We can illustrate this convergence graphically using different starting points.

26
© Boardworks Ltd of 35 Staircase diagrams Some iterative processes may result in a staircase diagram:

27
© Boardworks Ltd of 35 Cobweb diagrams Other iterative processes may result in a cobweb diagram:

28
© Boardworks Ltd of 35 Solving equations by iteration In most cases you will be told what starting value and rearrangement to use. a)Show that the equation x x – 2 = 0 can be rearranged in the form b)Use the iterative formula with x 0 = 1 to find a root of the equation to 5 decimal places. a) Rearrange the equation:

29
© Boardworks Ltd of 35 Solving equations by iteration b) The start value is x 0 = 1. Therefore: x 1 = 0.2 x 2 = x 3 = … x 4 = … x 5 = … The sequence converges towards (to 5 d.p.). x 6 = … x 7 = …

30
© Boardworks Ltd of 35 Problems with iterative methods Not all iterations will converge towards a root. Here are some examples:

31
© Boardworks Ltd of 35 Contents © Boardworks Ltd of 35 Using graphs to solve equations The change-of-sign rule Solving equations by iteration Examination-style question

32
© Boardworks Ltd of 35 Examination-style question a)Show that the equation e x + x = 8 has a root between and 1 and 2. b) Show that this equation can be arranged to give the iterative formula x n + 1 = ln(8 – x n ) c) Use the iterative formula found in part b) with x 0 = 2 to find the value of x 1, x 2, x 3, x 4 and x 5 to 5 decimal places. d) Prove that the value found for x 5 is a root of e x + x = 8 correct to 4 decimal places.

33
© Boardworks Ltd of 35 Examination-style question a) Rearrange the equation in the form f ( x ) = 0: If f ( x ) = e x + x – 8 then b) Rearrange e x + x = 8 in the form x = f ( x ): e x + x – 8 = 0 f (1) = e – 8 f (2) = e – 8 ≈ –4.3 ≈ 1.4 Since f (1) 0 there must be a root to the equation f ( x ) = 0 between x = 1 and x = 2. e x = 8 – x x = ln(8 – x )

34
© Boardworks Ltd of 35 Examination-style question Now write this as an iterative formula of the form x n + 1 = f ( x n ): x n + 1 = ln(8 – x n ) c) The starting value is x 0 = 2, therefore: x 1 = x 2 = x 3 = x 4 = x 5 =

35
© Boardworks Ltd of 35 Examination-style question d) x 5 = is a root of e x + x = 8 correct to 4 decimal places if f ( ) and f ( ) are of different sign where f ( x ) = e x + x – 8. f ( ) = e – 8 ≈ f ( ) = e – 8 ≈ – f ( ) > 0 and f ( ) < 0 and so x 5 is a root of the equation to 4 decimal places.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google