Presentation is loading. Please wait.

Presentation is loading. Please wait.

17: Iteration using © Christine Crisp “Teach A Level Maths” Vol. 2: A2 Core Modules.

Similar presentations


Presentation on theme: "17: Iteration using © Christine Crisp “Teach A Level Maths” Vol. 2: A2 Core Modules."— Presentation transcript:

1 17: Iteration using © Christine Crisp “Teach A Level Maths” Vol. 2: A2 Core Modules

2 Iteration Module C3 "Certain images and/or photos on this presentation are the copyrighted property of JupiterImages and are being used with permission under license. These images and/or photos may not be copied or downloaded without permission from JupiterImages"

3 Iteration There are some equations that we can’t solve. However, we can find an approximate solution to some of these equations. e.g. There are several methods of finding approximate solutions and in this presentation we will study one of them. The approximation can be very accurate, say to 6 or more decimal places.

4 Iteration There are 2 stages to getting a solution: Stage 1. Find a 1 st estimate Stage 2. Find a formula to improve the estimate. Sometimes we can just spot an approximate solution to an equation. Can you spot the approximate value of the solution to If we can’t quickly spot an approximation, we can use a method involving finding bounds for the solution. Ans: It’s quite close to 0 as the l.h.s. is then 0 and the r.h.s. is 1.

5 Iteration where and This is the point... so the x coordinate gives the solution to Bounds are numbers which lie on either side of the solution. If these are integers we call them integer bounds. e.g. To find integer bounds for we can sketch and

6 Iteration The solution lies between 0 and 1.  0 and 1 are the integer bounds. We usually call the solution , so. e.g. To find integer bounds for we can sketch and Bounds are numbers which lie on either side of the solution. If these are integers we call them integer bounds.

7 Iteration The solution lies between 0 and 1. e.g. To find integer bounds for we can sketch and 0 and 1 are the integer bounds. Our first approximation to , is any number between the bounds, say We usually call the solution , so. Bounds are numbers which lie on either side of the solution. If these are integers we call them integer bounds. 

8 Iteration If we can use Autograph or a graphical calculator, sketching is a good method of finding the integer bounds. However, if we can spot likely bounds, or if we are given values and want to show they are bounds, we can use the algebraic method that follows and avoid sketching. Even without a graph plotter you may have been able to sketch these 2 graphs.

9 Iteration Rearrange the equation to get zero on one side. To show how the method works I’m going to sketch ( but you won’t usually have to do this ).  At , To the left of , e.g. at x = 0, To the right of , e.g. at x = 1, The solution, , is now where e.g. For, get

10 Iteration Rearrange the equation to get zero on one side. To show how the method works I’m going to sketch ( but you won’t usually have to do this ).  To the left of , e.g. at x = 0, To the right of , e.g. at x = 1, e.g. For, get has opposite signs on the left and right of 

11 Iteration The Algebraic Method: Rearrange the equation to the form Find : Define : Let  If we want to show that 0 and 1 are integer bounds, we show that has different signs at 0 and 1.

12 Iteration Rearrange the equation to the form Find : Change of sign Find : The change of sign Define : Let The Algebraic Method:  If we want to show that 0 and 1 are integer bounds, we show that has different signs at 0 and 1.

13 Iteration Rearrange the equation to the form Find : Change of sign The change of sign Our 1 st estimate of  is between these values, say Define : Let Find : The Algebraic Method:  If we want to show that 0 and 1 are integer bounds, we show that has different signs at 0 and 1. You must always include this line.

14 Iteration It is possible to find bounds that are closer than the nearest integers. For example, to find bounds accurate to 1 decimal place, we could use a decimal search. So if we had, a decimal search would calculate looking for a change of sign. However, integer bounds are good enough for the method of iteration we are studying.

15 Iteration e.g. 1 (a) Using a graphical calculator, or otherwise, sketch, on the same axes, the graphs of and (b) From the sketch, find integer bounds for the solution, , of the equation (b)  is the x -value at the point of intersection, so 0 and 1 are integer bounds. Solution: (a) (c) Use an algebraic method to confirm these are correct and give a 1 st approximate solution. 

16 Iteration e.g. 1 (a) Using a graphical calculator, or otherwise, sketch, on the same axes, the graphs of and Rearrange equation to : Define : The change of sign (b) From the sketch, find integer bounds for the solution, , of the equation (c) Use an algebraic method to confirm these are correct and give a 1 st approximate solution. A 1 st approximation is any number between 0 and 1. So, (c) ( Confirm bounds are 0 and 1 )

17 Iteration Look at this function: There is a change of sign... Do you notice anything that explains this? We couldn’t draw the curve without lifting the pencil off the paper. We say it is discontinuous. Not all functions that have a sign change between 2 numbers have a solution to between the numbers. Ans: The function has an asymptote between 0 and 1. but no solution between 0 and 1.

18 Iteration Look at this function: Not all functions that have a sign change between 2 numbers have a solution to between the numbers. You are unlikely to meet discontinuous functions in this work so just remember the effect on solutions. There is a change of sign... Do you notice anything that explains this? but no solution between 0 and 1.

19 Iteration Exercise 1. Using a graphical calculator or otherwise, sketch suitable graphs to find integer bounds for the solution to 2.Use the algebraic method to show that has a root between 2 and 3. An equation has a solution which may consist of one or more roots. Give a 1 st approximation to the solution. Give an approximation to this root.

20 Iteration Solution: 1. Sketch and The integer bounds for  are 1 and 2. So,  Any number between 1 and 2 could be used as the 1 st approximation.

21 Iteration Solution: Rearrange to Define 2.Use the algebraic method to show that has a root between 2 and 3. Change of sign (continuous function) Any number between 2 and 3 could be used as the 1 st approximation.

22 Iteration The 1 st approximate solution lies anywhere between the bounds. The next stage is to improve this estimate. Rearrange the equation to the form. You may spot lots of ways of doing this. e.g. e.g. For the equation :

23 Iteration You may spot lots of ways of doing this. e.g. Rearrange the equation to the form. The 1 st approximate solution lies anywhere between the bounds. The next stage is to improve this estimate. (i) Square: or (ii) Rearrange: Cube root: or (iii) Rearrange: Divide by : e.g. For the equation :

24 Iteration to iterate means to repeat Let’s take the 2 nd arrangement: Our 1 st estimate of  we will call x 0. We substitute x 0 into the r.h.s. of the formula and the result gives the new estimate x 1. We now have We will then keep repeating the process so we write the formula as This is called an iterative formula. ( Some people start with x 1 which is just as good. )

25 Iteration Starting with we get Because we are going to repeat the calculation, we use the ANS function on the calculator. So, Type and press ENTER Type the r.h.s. of the equation, replacing x with ANS, using the ANS button, giving Press ENTER and you get ( 6 d.p. ) Pressing ENTER again replaces with and gives the next estimate and so on. ( 6 d.p. )

26 Iteration If we continue to iterate we eventually get ( to 6 d.p. ) Although I’ve only written down 6 decimal places, the calculator is using the greatest possible accuracy. We get of our answer. Since the answer is correct to 6 decimal places, the exact value of must be within Error Bounds Tip: The index equals the number of d.ps. in the answer.

27 Iteration SUMMARY To find an approximation to a solution ( or root ) of an equation:  Find a 1 st approximation, often by finding integer bounds for the solution. Let this be x 0.  Rearrange the equation into the form  Write the arrangement as an iterative formula:  Key x 0 into a calculator and ENTER.  Key the r.h.s. of the formula into the calculator, replacing x with ANS.  Press ENTER as many times as required to get the solution to the specified accuracy.

28 Iteration e.g. 1(a) Show that the equation has a root  in the interval. (b) Using the arrangement write down an iterative formula and use it to find the root correct to 4 decimal places. Solution: (a) Let Change of sign Then,

29 Iteration e.g. 1(a) Show that the equation has a root  in the interval. (b) Using the arrangement write down an iterative formula and use it to find the root correct to 4 decimal places. Solution: (b) gives Let It takes about 7 iterations to reach (4 d.p.)

30 Iteration Exercise 1. (a) Show that the equation has a solution  between 2 and 3. (b) Use the iterative formula with to find the solution, giving your answer correct to 4 d.p. 2. (a) Show that the equation has a solution between 1 and 2. (b) Use the iterative formula with to find the solution, giving your answer correct to 4 d.p.

31 Iteration Solutions 1. (a) Show that the equation has a solution between 2 and 3. Solution: (a) Let Change of sign (b) Use the iterative formula with to find the solution, giving your answer correct to 4 d.p. ( 4 d.p. )

32 Iteration 2. (a) Show that the equation has a solution between 1 and 2. Solution: Let (b) Use the iterative formula with to find the solution, giving your answer correct to 4 d.p. Change of sign ( 4 d.p. ) Solution: We need Solutions

33 Iteration Some arrangements of an equation give formulae which do not give a solution. We earlier met 3 arrangements of ( to 6 d.p. ) We used (ii) with to find the solution Now try (i) with We get and after a while the sequence just oscillates between 1 and 0. This iterative sequence does not converge. (i) (ii) (iii)

34 Iteration We get Now try the formula with The iteration then fails because we are trying to square root a negative number. Some arrangements of an equation give an iterative sequence which converges to a solution; others do not converge. The next presentation investigates convergence of iterative sequences.

35 Iteration

36 The following slides contain repeats of information on earlier slides, shown without colour, so that they can be printed and photocopied. For most purposes the slides can be printed as “Handouts” with up to 6 slides per sheet.

37 Iteration There are some equations that we can’t solve. However, we can find an approximate solution to some of these equations. e.g. There are several methods of finding approximate solutions and in this presentation we will study one of them. The approximation can be very accurate, say to 6 or more decimal places.

38 Iteration There are 2 stages to getting a solution: Stage 1. Find a 1 st estimate Stage 2. Find a formula to improve the estimate. Sometimes we can just spot an approximate solution to an equation. The solution to If we can’t quickly spot an approximation, we can use a method involving finding bounds for the solution. is quite close to 0 as the l.h.s. is then 0 and the r.h.s. is 1.

39 Iteration The solution lies between 0 and 1. e.g. To find integer bounds for we can sketch and  0 and 1 are the integer bounds. We often start by finding numbers ( bounds ) that lie on either side of the solution. If these are integers we call them integer bounds. Our first approximation to , is any number between the bounds, say We usually call the solution , so.

40 Iteration Rearrange the equation to the form Find : Change of sign The change of sign Our 1 st estimate of  is between these values, say Define : Let Find : The Algebraic Method:  If we want to show that 0 and 1 are integer bounds, we show that has different signs at 0 and 1.

41 Iteration Solution: (c) ( Confirm bounds are 0 and 1 ) e.g. 1 (a) Using a graphical calculator, or otherwise, sketch, on the same axes, the graphs of and Rearrange equation to : Define : The change of sign (b) From the sketch, find integer bounds for the solution, , of the equation (c) Use an algebraic method to confirm these are correct and give a 1 st approximate solution. A 1 st approximation is any number between 0 and 1. So,

42 Iteration You may spot lots of ways of doing this. e.g. Rearrange the equation to the form. The 1 st approximate solution lies anywhere between the bounds. The next stage is to improve this estimate. (i) Square: (ii) Rearrange: Cube root: (iii) Rearrange: Divide by : e.g. For the equation :

43 Iteration to iterate means to repeat Let’s take the 2 nd arrangement: Our 1 st estimate of  we will call x 0. We substitute x 0 into the r.h.s. of the formula and the result gives the new estimate x 1. We now have We will then keep repeating the process so we write the formula as This is called an iterative formula. ( Some people start with x 1 which is just as good. )

44 Iteration SUMMARY To find an approximation to a solution ( or root ) of an equation:  Find a 1 st approximation, often by finding integer bounds for the solution. Let this be x 0.  Rearrange the equation into the form  Write the arrangement as an iterative formula:  Key x 0 into a calculator and ENTER.  Key the r.h.s. of the formula into the calculator, replacing x with ANS.  Press ENTER as many times as required to get the solution to the specified accuracy.

45 Iteration e.g. 1(a) Show that the equation has a root  in the interval. (b) Using the arrangement write down an iterative formula and use it to find the root correct to 4 decimal places. Solution: (a) Let Change of sign

46 Iteration Solution: (b) gives Let It takes about 7 iterations to reach (4 d.p.)

47 Iteration Some arrangements of an equation give formulae which do not give a solution. We earlier met 3 arrangements of ( to 6 d.p. ) We used (ii) with to find the solution Trying (i) with gives and after a while the sequence just oscillates between 1 and 0. The iterative sequence does not converge.

48 Iteration gives Trying the arrangement with The iteration then fails because we are trying to square root a negative number. Some arrangements of an equation give an iterative sequence which converges to a solution; others do not converge.


Download ppt "17: Iteration using © Christine Crisp “Teach A Level Maths” Vol. 2: A2 Core Modules."

Similar presentations


Ads by Google