C3 Chapter 4: Numerical Methods Dr J Frost (jfrost@tiffin.kingston.sch.uk) www.drfrostmaths.com Last modified: 30th August 2015
Overview ? ? ? Finding the root of a function 𝑓 𝑥 is to: solve the equation 𝒇 𝒙 =𝟎 However, for some functions, the ‘exact’ root is either complicated and difficult to calculate: ? ? 𝒙 𝟑 +𝟐 𝒙 𝟐 −𝟑𝒙+𝟒=𝟎 or there’s no ‘algebraic’ expression at all! (involving roots, logs, sin, cos, etc.) ? 𝒙− 𝐜𝐨𝐬 𝒙 =𝟎 Exact solution not expressible In an exam you are expected to: Be able to prove that a root lies within a range. Use ‘numerical methods’ to find approximations for a root. Prove a solution is correct to a certain degree of accuracy. 𝒚=𝒙− 𝐜𝐨𝐬 𝒙 Root
#1: Proving a solution lies in a range Show that 𝑓 𝑥 =𝑒 𝑥 +2𝑥−3 has a root between 𝑥=0.5 and 𝑥=0.6 ? 𝑓 0.5 =−0.351 𝑓 0.6 =0.022… There is a change in sign, so root must lie between 0.5 and 0.6 Bro Exam Tip: In the mark scheme they’re looking for: Finding the function output for the two values. Referring to a ‘change in sign’. 0.5,−0.351 0.6, 0.022 If the 𝑦 value goes from negative to positive or vice versa, then clearly the 𝑦 values must pass 0 somewhere in between.
#2: Using iteration to approximate a root 𝑒 is just a constant like 𝜋 is. We’ll learn about it in a later chapter, but for now you can find it to the right of your calculator. Edexcel C3 Jan 2013 a ? 0= 𝑒 𝑥−1 +𝑥−6 6−𝑥= 𝑒 𝑥−1 ln 6−𝑥 =𝑥−1 ln 6−𝑥 +1=𝑥 ! To solve 𝑓 𝑥 =0 by an iterative method, rearrange into a form 𝑥=𝑔 𝑥 and use the iterative formula 𝑥 𝑛+1 =𝑔 𝑥 𝑛 We’ll see why it works later.
#2: Using iteration to approximate a root Edexcel C3 Jan 2013 𝑥 0 , 𝑥 1 , 𝑥 2 represent successively better approximations of the root, where 𝑥 0 is the starting value. Bro Tip: Initially type 𝑥 0 (i.e. 2) onto your calculator. Now just type: ln 6−𝐴𝑁𝑆 +1 And then spam your = key to get successive iterations. b ? 𝑥 0 =2 𝑥 1 = ln 6−2 +1=2.386… 𝑥 2 = ln 6−2.386… +1=2.2847… 𝑥 3 =2.3125
#3: Proving a solution to a given accuracy Edexcel C3 Jan 2013 Thinking back to Year 8, if the root 2.307 is correct to 3dp, what’s the smallest and greatest value it could be? Smallest: 2.3065 Greatest: 2.3075 Clearly if we can prove the solution lies in this range, then it would round to 2.307. How can we prove the solution lies in this range? As we did before! 𝒇 𝟐.𝟑𝟎𝟔𝟓 =−𝟎.𝟎𝟎𝟎𝟐𝟕𝟓 𝒇 𝟐.𝟑𝟎𝟕𝟓 =𝟎.𝟎𝟎𝟒𝟒𝟐 Change of sign so solution is in range [𝟐.𝟑𝟎𝟔𝟓, 𝟐.𝟑𝟎𝟕𝟓]. ? ? ?
Why do it work? Why do we rearrange to the form 𝑥=𝑔(𝑥) before using 𝑥 𝑛+1 =𝑔 𝑥 𝑛 . Why does it (usually) converge to the correct root? 𝑥= 2 𝑥 2 +2 𝑥 𝑛+1 = 2 𝑥 𝑛 2 +2 𝑓 𝑥 =− 𝑥 3 +2 𝑥 2 −2 1: Since 𝑥= 2 𝑥 2 +2 we’re looking for the point where the lines 𝑦=𝑥 and 𝑦= 2 𝑥 2 +2 intersect. 4: And we repeat this two-step process of calculating 𝑦 and then making the new 𝑥 that 𝑦. We can see we’re spiralling inwards towards the root. 3: But that output gets used as the new input to the iterative formula, i.e. the 𝑦 value 𝑥 𝑛+1 gets used as the new 𝑥. This is equivalent to moving horizontally to the red 𝑦=𝑥 line. 2: Suppose we started with the approximation 𝑥 0 =1.5. Then 2 1.5 2 +2 would give us the 𝑦 value on the blue line. 𝑥 0
Complete the past paper questions provided (solutions on next slides) Exercises Complete the past paper questions provided (solutions on next slides) File Ref: C3-Chp4-NumericalMethodsExamQuestion
June 2009 Q1
Jan 2010 Q2
June 2012 Q2
June 2011 Q2
June 2008 Q7