Download presentation

Presentation is loading. Please wait.

1
**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. 1 of 35 © Boardworks Ltd 2006

2
**Using graphs to solve equations**

The change-of-sign rule Solving equations by iteration Examination-style question Contents 2 of 35 © Boardworks Ltd 2006

3
**Using graphs to solve equations**

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: x3 + 5x – 3 = 0, ex = x – 2, sin x = ln x + 1 cannot be solved exactly by any obvious algebraic method. The first step in solving most equations of this type is to sketch a graph. Note that the cubic equation given in this example cannot be factorized to give an exact solution. There does exist a ‘cubic formula’, equivalent to the ‘quadratic formula’, but it is very much more complicated to apply. In most situations it is acceptable to use a numerical method. The graph will tell us how many roots there are and their approximate locations.

4
**Using graphs to solve equations**

By sketching an appropriate graph find approximate roots to the equation x3 = 3x + 1. There are two ways to approach this. The first is to consider the left-hand side and the right-hand side of the equation as two separate functions. x3 = 3x + 1 This can be compared with solving simultaneous equations. The difference is that we are only interested in the x-value of the coordinates of the points of intersection. y = x3 y = 3x + 1 The points where these two functions intersect will give us the roots to the equation x3 = 3x + 1.

5
**Using graphs to solve equations**

–1 –2 –3 –4 1 2 3 4 –6 6 8 10 The graphs of y = x3 and y = 3x + 1 intersect at three points. y = x3 y = 3x + 1 This means that the equation x3 = 3x + 1 has three solutions. The graph shows that these solutions are approximately: Ensure the students understand that, unlike with simultaneous equations where we want the values of both x and y, when solving an equation in x we are only interested in the x-values of the coordinates. x = –1.5 x = –0.3 x = 1.9

6
**Using graphs to solve equations**

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

7
**Using graphs to solve equations**

–1 –2 –3 –4 1 2 3 4 –6 6 8 10 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 = x3 – 3x – 1

8
**Using graphs to solve equations**

Zoom in on the each root to find the value of the x-coordinates to 6 decimal places.

9
**The change-of-sign rule**

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

10
**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
**The change-of-sign rule**

To see how this works in practice consider the equation x – cos x = 0 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. y –1 x 1 We can see from this graph that there is one root about half-way between x = 0 and x = y = x y = cos x That is, around ≈ 0.8.

12
**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. Sometimes it is necessary to try a number of values for x until an interval is found. We can therefore conclude that the equation x – cos x = 0 has a root between 0.7 and 0.8.

13
**The change-of-sign rule**

Show that the equation x3 + 2 = 4x has a root between x = 1 and x = 2. Start by rearranging the equation into the form f(x) = 0. x3 – 4x + 2 = 0 Now let f(x) = x3 – 4x + 2. f(1) = (1)3 – 4(1) + 2 = –1 f(2) = (2)3 – 4(2) + 2 = 2 Since f(1) < 0 and f(2) > 0, there must be a root to the equation f(x) = 0 between x = 1 and x = 2.

14
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. Each of the equations given in this activity have at least one root between 0 and 9. Start by finding two whole numbers between which the root lies. Narrow down the interval until the end-points differ by 1. you will then be able to go to the next decimal place. Continue until the root can be given to 5 decimal places. Take the opportunity to discuss a variety of methods for choosing values such as the interval bisection method and linear interpolation.

15
**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: a b y = f(x) 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.

16
**Problems with the change-of-sign rule**

There is more than one root in a given interval In some cases there may be several roots close together. a b y = f(x) In this example there are three roots between x = a and x = b. There is a discontinuity in a given interval a b y = f(x) 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.

17
**Solving equations by iteration**

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

18
**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). Discuss the fact that there is more than one way to arrange most equations in the form x = f(x). Some arrangements may converge on the root while others may not. Also, different arrangements may converge towards different roots. Note that several different formulae are usually possible. Some may produce convergent sequences and some may not.

19
**Solving equations by iteration**

For example, suppose we want to solve the equation 5x – ex = 0 One way to write this equation in the form x = f(x) is: This gives us the iterative formula: It is usually best to choose an initial value that is quite close to the root we are trying to find. This can be done by sketching a graph. Now we can substitute an initial value for x0 into this formula in the hope of generating a sequence that converges towards the root of the original equation.

20
**Solving equations by iteration**

Let’s try an initial value of x0 = 1: x0 = 1

21
**Solving equations by iteration**

Continuing this process gives: x6 = …, x7 = …, x8 = …, x8 = … The values are converging towards (to 3 d.p.). We can conclude that this is a root of our original equation. To prove that this is a root of 5x – ex = 0 we can show that if f(x) = 5x – ex there is a change of sign between f(0.2585) and f(0.2595): f(0.2585) = 5(0.2585) – e ≈ –0.002 negative f(0.2595) = 5(0.2595) – e ≈ 0.001 positive There is a change of sign and so (to 3 d.p.) is a root of 5x – ex = 0.

22
**Solving equations by iteration**

If you have a calculator with an ANS key then the iterative process can be made much quicker. In this example you would start by keying in the initial value 1, followed by the = key. You then key in the formula as: eANS ÷ 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: If the ANS key is not available the memory keys can be used instead. Plotting the graphs of y = x and will show that there are two points of intersection.

23
**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
**Looking a different arrangements**

Suppose we had arranged our original equation, 5x – ex = 0, in another form. For example: This leads to the iterative formula: If we use the same start value of x0 = 1 we get: x1 = …, x2 = …, x3 = …, x4 = …, x5 = …, x6 = …, x7 = …, x8 = …, x9 = …, x10 = …, x11 = … This time, using the same start value but a different formula, the sequence converges towards (to 3 d.p.).

25
**Solving equations by iteration**

We can illustrate this convergence graphically using different starting points.

26
Staircase diagrams Some iterative processes may result in a staircase diagram: A staircase diagram results when the gradient of the curve y = f(x) is less than 1 and is positive at the point where it meets y = x.

27
Cobweb diagrams Other iterative processes may result in a cobweb diagram: A cobweb diagram results when the gradient of the curve y = f(x) is less than 1 and is negative at the point where it meets y = x. The sequence of values generated will be alternately above and below the root.

28
**Solving equations by iteration**

In most cases you will be told what starting value and rearrangement to use. Show that the equation x3 + 5x – 2 = 0 can be rearranged in the form Use the iterative formula with x0 = 1 to find a root of the equation to 5 decimal places. a) Rearrange the equation:

29
**Solving equations by iteration**

b) The start value is x0 = 1. Therefore: x1 = 0.2 x2 = x3 = … x4 = … x5 = … x6 = … x7 = … The sequence converges towards (to 5 d.p.).

30
**Problems with iterative methods**

Not all iterations will converge towards a root. Here are some examples: In general if the gradient of y = f(x) is greater than 1 and the point where y = f(x) and y = x meet than the sequence will not converge.

31
**Examination-style question**

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

32
**Examination-style question**

Show that the equation ex + x = 8 has a root between and 1 and 2. b) Show that this equation can be arranged to give the iterative formula xn + 1 = ln(8 – xn) c) Use the iterative formula found in part b) with x0 = 2 to find the value of x1, x2, x3, x4 and x5 to 5 decimal places. d) Prove that the value found for x5 is a root of ex + x = 8 correct to 4 decimal places.

33
**Examination-style question**

a) Rearrange the equation in the form f(x) = 0: ex + x – 8 = 0 If f(x) = ex + x – 8 then f(1) = e1 + 1 – 8 ≈ –4.3 f(2) = e2 + 2 – 8 ≈ 1.4 Since f(1) < 0 and f(2) > 0 there must be a root to the equation f(x) = 0 between x = 1 and x = 2. b) Rearrange ex + x = 8 in the form x = f(x): ex = 8 – x x = ln(8 – x)

34
**Examination-style question**

Now write this as an iterative formula of the form xn + 1 = f(xn): xn + 1 = ln(8 – xn) c) The starting value is x0 = 2, therefore: x1 = x2 = x3 = x4 = x5 =

35
**Examination-style question**

d) x5 = is a root of ex + x = 8 correct to 4 decimal places if f( ) and f( ) are of different sign where f(x) = ex + x – 8. f( ) = e – 8 ≈ 0.0001 f( ) = e – 8 ≈ –0.0006 f( ) > 0 and f( ) < 0 and so x5 is a root of the equation to 4 decimal places.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google