Presentation is loading. Please wait.

Presentation is loading. Please wait.

C3 Chapter 4: Numerical Methods

Similar presentations


Presentation on theme: "C3 Chapter 4: Numerical Methods"β€” Presentation transcript:

1 C3 Chapter 4: Numerical Methods
Dr J Frost Last modified: 30th August 2015

2 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

3 #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.

4 #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.

5 #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

6 #3: Proving a solution to a given accuracy
Edexcel C3 Jan 2013 Thinking back to Year 8, if the root is correct to 3dp, what’s the smallest and greatest value it could be? Smallest: Greatest: Clearly if we can prove the solution lies in this range, then it would round to How can we prove the solution lies in this range? As we did before! 𝒇 𝟐.πŸ‘πŸŽπŸ”πŸ“ =βˆ’πŸŽ.πŸŽπŸŽπŸŽπŸπŸ•πŸ“ 𝒇 𝟐.πŸ‘πŸŽπŸ•πŸ“ =𝟎.πŸŽπŸŽπŸ’πŸ’πŸ Change of sign so solution is in range [𝟐.πŸ‘πŸŽπŸ”πŸ“, 𝟐.πŸ‘πŸŽπŸ•πŸ“]. ? ? ?

7 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 π‘₯ we’re looking for the point where the lines 𝑦=π‘₯ and 𝑦= 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 would give us the 𝑦 value on the blue line. π‘₯ 0

8 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

9 June 2009 Q1

10 Jan 2010 Q2

11 June 2012 Q2

12 June 2011 Q2

13 June 2008 Q7


Download ppt "C3 Chapter 4: Numerical Methods"

Similar presentations


Ads by Google