OXFORD CAMBRIDGE AND RSA EXAMINATIONS Advanced Subsidiary General Certificate of Education Advanced General Certificate of Education MEI STRUCTURED MATHEMATICS 4777 Numerical Computation Wednesday 21 JUNE 2006 Afternoon 2 hours 30 minutes Additional materials: 8 page answer booklet Graph paper MEI Examination Formulae and Tables (MF2) TIME 2 hours 30 minutes INSTRUCTIONS TO CANDIDATES • Write your name, centre number and candidate number in the spaces provided on the answer booklet. • Answer any three questions. • Additional sheets, including computer print-outs, should be fastened securely to the answer booklet. COMPUTER RESOURCES • Candidates will require access to a computer with a spreadsheet program and suitable printing facilities during the examination.. INFORMATION FOR CANDIDATES • The number of marks is given in brackets [ ] at the end of each question or part question. • In each of the questions you are required to write spreadsheet routines to carry out various numerical analysis processes. You should note the following points. • You will not receive credit for using any numerical analysis functions which are provided within the spreadsheet. For example, many spreadsheets provide a solver routine; you will not receive credit for using this routine when asked to write your own procedure for solving an equation. You may use the following built-in mathematical functions: square root, sin, cos, tan, arcsin, arccos, arctan, ln, exp. • For each question you attempt, you should submit print-outs showing the spreadsheet routine you have written and the output it generates. It will be necessary to print out the formulae in the cells as well as the values in the cells. You are not expected to print out and submit everything your routine produces, but you are required to submit sufficient evidence to convince the examiner that a correct procedure has been used. • The total number of marks for this paper is 72. This question paper consists of 5 printed pages and 3 blank pages. HN/4 © OCR 2006 [T/102/2667] Registered Charity 1066969 [Turn over 2 1 (i) A sequence of numbers x1, x2, x3, … is such that xr1 a k ( xr a ) for some constants k and a. Show that a may be estimated as x12 x0 x2 2x1 x0 x 2 . [5] (ii) An attempt is made to solve the equation ex tan x using the iterative formula xr1 ln ( tan xr ) . Show that the equation has a root in the interval 1, 1.5 . Demonstrate that the given iteration diverges for starting values in this interval. Use the method based on the formula obtained in part (i) to obtain the root correct to 5 decimal places. [11] (iii) Show that the equation ex tan x has a root that is just slightly greater than p. Demonstrate that the iteration xr1 ln ( tan xr ) fails to converge to this root. Show that the approach used in part (ii) will give convergence to the required root, but that a very accurate starting value is required. Give the root correct to 5 decimal places. [8] 4777 June 2006 3 2 (i) Explain briefly the advantage, relative to other methods of interpolation, of using divided differences. [2] The function f ( x ) has known values as given, correct to 2 decimal places, in the table. x 1 f(x) –3.00 1.5 2 2.5 –6.50 –8.03 3 3.5 4 4.5 –6.66 –2.25 5.65 5 (ii) Draw up a divided difference table to produce a sequence of estimates, linear, quadratic, cubic and quartic, for f ( 1.5 ) . Discuss briefly the accuracy to which it is possible to estimate f ( 1.5 ) . [10] (iii) Modify your routine from part (i) to produce estimates of (A) f(3), (B) f(5). In each case discuss briefly the likely accuracy of your estimate. [6] (iv) There is a root of the equation f ( x ) 0 at x just greater than 4. Modify your routine to estimate values of f ( x ) near x 4. Hence, by trial and error, determine the root correct to 2 decimal places. [6] 4777 June 2006 [Turn over 4 3 The second order differential equation dy d 2y 4 2y 2 2ekx dx dx 2 dy 0, is to be solved, for various values of k, using finite dx difference methods. The value of y when x 1 is required. This value is denoted by b. with initial conditions x 0, y 0, (i) Consider first the case k 1. Show that, in the usual notation, yr1 1 ( 2h 2exr 2h2 yr2 2yr ( 1 2h ) yr1 ) , 1 2h and that y1 h 2. Show that, with h 0.1, the estimate of b is a little greater than 4.25. Obtain further estimates of b for h 0.05, 0.025, 0.0125. Hence demonstrate that the method has second order convergence. Determine b correct to 2 decimal places. [17] (ii) Modify the routines developed in part (i) to find estimates of b, correct to 1 decimal place, for k –5, –4, …, 4, 5. Use the spreadsheet to produce a graph of b as a function of k. [7] 4777 June 2006 5 4 (i) A set of simultaneous linear equations are to be solved using the Gauss-Seidel iterative method. Explain what diagonal dominance is, and how it relates to the convergence of the method. Show by means of the equations with augmented matrix Ê 5 3 3 1ˆ Á 4 7 4 1˜ Á ˜ Ë 5 5 9 1¯ that diagonal dominance is not a necessary condition. [7] (ii) Modify the routine developed in part (i) to solve the equations with augmented matrix 3 3 1ˆ Ê6 - a Á 4 8- a 4 1˜ Á ˜ Ë 5 5 10 - a 1¯ for user-specified values of a. Demonstrate that the Gauss-Seidel iteration converges for a 3 but diverges for a 4. Determine to 1 decimal place the largest value of a for which the Gauss-Seidel iteration converges. [11] (iii) Modify the routine in part (ii) so that it now implements the Gauss-Jacobi method. Show that the iteration now does not converge for a 0. Explain how this result relates to the condition of diagonal dominance. [6] 4777 June 2006 4777/01 ADVANCED GCE UNIT MATHEMATICS (MEI) Numerical Computation FRIDAY 22 JUNE 2007 Morning Time: 2 hours 30 minutes Additional materials: Answer booklet (8 pages) Graph paper MEI Examination Formulae and Tables (MF2) INSTRUCTIONS TO CANDIDATES • Write your name, centre number and candidate number in the spaces provided on the answer booklet. • Answer any three questions. • Additional sheets, including computer print-outs, should be fastened securely to the answer booklet. COMPUTER RESOURCES • Candidates will require access to a computer with a spreadsheet program and suitable printing facilities during the examination. INFORMATION FOR CANDIDATES • The number of marks is given in brackets [ ] at the end of each question or part question. • In each of the questions you are required to write spreadsheet routines to carry out various numerical analysis processes. You should note the following points. • You will not receive credit for using any numerical analysis functions which are provided within the spreadsheet. For example, many spreadsheets provide a solver routine; you will not receive credit for using this routine when asked to write your own procedure for solving an equation. You may use the following built-in mathematical functions: square root, sin, cos, tan, arcsin, arccos, arctan, ln, exp. • For each question you attempt, you should submit print-outs showing the spreadsheet routine you have written and the output it generates. It will be necessary to print out the formulae in the cells as well as the values in the cells. You are not expected to print out and submit everything your routine produces, but you are required to submit sufficient evidence to convince the examiner that a correct procedure has been used. • The total number of marks for this paper is 72. ADVICE TO CANDIDATES • Read each question carefully and make sure you know what you have to do before starting your answer. • You are advised that an answer may receive no marks unless you show sufficient detail of the working to indicate that a correct method is being used. This document consists of 4 printed pages. HN/3 © OCR 2007 [T/102/2667] OCR is an exempt Charity [Turn over 2 1 (i) The iterative sequence x0, x1, x2, … , where xr1 g ( xr ) , has a fixed point a , so that a g ( a ) . Given that xr1 a k ( xr a ) , show that k ( x2 x1 ) ( x1 x0 ) , and obtain an approximate equation for a in terms of x2, x1 and k. [5] (ii) Use a spreadsheet to demonstrate graphically that the equation x f ( x ) where 1 x f ( x) = e 3 + e - 31 x - 0.5 has two roots. Let these roots be a and b where a b . Show that the iteration xr1 f ( xr ) will converge only slowly to a and that it will not converge to b at all. [7] (iii) Use the acceleration technique developed in part (i) to speed up the convergence to a . Find a correct to 6 decimal places. Show that, with a carefully chosen starting point, the acceleration technique may be used to produce convergence to b . Find b correct to 6 decimal places. Determine, correct to 1 decimal place, the range of starting values for which convergence to [12] b is assured within 5 iterations of the acceleration technique. © OCR 2007 4777/01 June 07 3 2 The Gaussian 4-point integration formula has the form h Û f ( x ) dx af (a ) bf (b ) bf ( b ) af ( a ) . Ù ı- h (i) Obtain the four equations that determine a, b, a and b , showing that one of them is aa 6 bb 6 17 h7. [7] You are now given the following values, correct to 8 decimal places. a 0.347 854 85h b 0.652 145 15h a 0.861 136 31h b 0.339 981 04h (ii) Use a spreadsheet to show that, for x in radians, sin x tends to 1 as x tends to 0. x Use a spreadsheet to obtain a sketch of the function f ( x ) sin x for 0 x p . x Taking h 12 p initially, use the Gaussian 4-point rule to estimate the value of p Û sin x dx . Ù x ı0 Repeat the process, halving h as necessary, in order to establish the value of the integral correct to 6 decimal places. [13] (iii) Modify the routines used in part (ii) to determine the value of t, correct to 3 decimal places, such that t Û sin x dx = 1. Ù x ı0 © OCR 2007 4777/01 June 07 [4] [Turn over 4 3 The differential equation dy x 0.1e y, dx where y 0 when x 0, is to be solved in order to estimate y when x 1. (i) Use Euler’s method with h 0.2, 0.1, 0.05, 0.025 to obtain a sequence of estimates of y when x 1. Hence demonstrate that Euler’s method has first order convergence. [7] (ii) Show similarly that the modified Euler method has second order convergence. [6] (iii) Develop a solution to the differential equation using a predictor-corrector method. Use Euler’s method as the predictor and the modified Euler method as the corrector. Apply the corrector 3 times at each step. Compare the accuracy of this method with that of the modified Euler method. [8] (iv) Obtain a sequence of estimates of y when x 1 by averaging the estimates found in parts (ii) and (iii). Show that this sequence appears to have approximately third order convergence. [3] 4 The augmented matrix given below is denoted by M | c. Ê0 Á3 Á2 Á Ë1 1 0 3 2 2 1 0 3 3 2 1 0 1ˆ 2˜ 3˜ ˜ 4¯ (i) Set up a spreadsheet using Gaussian elimination to solve the system of equations represented by M | c. Make clear at each stage which element is used for pivoting and explain why. Show how to check the accuracy of your solution. [13] (ii) Apply the routine developed in part (i) to systems of the form M | v, for appropriate vectors v so as to find the inverse of the matrix M. [6] (iii) Use part (i) to obtain the determinant of M, making it clear how you establish its sign. [5] Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable effort has been made by the publisher (OCR) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity. OCR is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. © OCR 2007 4777/01 June 07 4777/01 ADVANCED GCE MATHEMATICS (MEI) Numerical Computation WEDNESDAY 18 JUNE 2008 Morning Time: 2 hour 30 minutes *CUP/T39242* Additional materials: Answer Booklet (8 pages) Graph paper MEI Examination Formulae and Tables (MF2) INSTRUCTIONS TO CANDIDATES • Write your name in capital letters, your Centre Number and Candidate Number in the spaces provided on the Answer Booklet. • Read each question carefully and make sure you know what you have to do before starting your answer. • • Answer any three questions. Additional sheets, including computer print-outs, should be fastened securely to the Answer Booklet. COMPUTING RESOURCES • Candidates will require access to a computer with a spreadsheet program and suitable printing facilities throughout the examination. INFORMATION FOR CANDIDATES • The number of marks for each question is given in brackets [ ] at the end of each question or part question. • In each of the questions you are required to write spreadsheet routines to carry out various numerical analysis processes. You should note the following points. • You will not receive credit for using any numerical analysis functions which are provided within the spreadsheet. For example, many spreadsheets provide a solver routine; you will not receive credit for using this routine when asked to write your own procedure for solving an equation. You may use the following built-in mathematical functions: square root, sin, cos, tan, arcsin, arccos, arctan, ln, exp. • For each question you attempt, you should submit print-outs showing the spreadsheet routine you have written and the output it generates. It will be necessary to print out the formulae in the cells as well as the values in the cells. You are not expected to print out and submit everything your routine produces, but you are required to submit sufficient evidence to convince the examiner that a correct procedure has been used. • The total number of marks for this paper is 72. • You are advised that an answer may receive no marks unless you show sufficient detail of the working to indicate that a correct method is being used. This document consists of 4 printed pages. SP (KN) T39242/4 © OCR 2008 [T/102/2667] OCR is an exempt Charity [Turn over 2 1 (i) Explain carefully what it means to say that an iteration has first order convergence. Show that, if y0, y1, y2 are three terms in a first order iteration converging to α, then α may be y12 – y0y2 . [6] estimated as –––––––––– 2y1 – y0 – y2 A curve has equation xy + yx = 2, where x > 0 and y > 0. Note that the point (1, 1) lies on the curve and that the curve is symmetrical about the line y = x. You are given that, for any value of y, there is only one value of x. 1 –– (ii) Show that, for x = 1.1, the equation may be re-arranged as y = (2 – 1.1y)1.1. Set up a spreadsheet to perform the iteration based on this rearrangement. Starting with y0 = 1, obtain y1 and y2. Use the result in part (i) to obtain a more accurate value of y when x = 1.1. Repeat this process beginning with the more accurate value of y. Comment on the likely accuracy of your new estimate. [6] (iii) Repeat the process in part (ii) to obtain estimates of y for x = 1.2, 1.3, … 2.0. Comment on the likely accuracy of your result for x = 2. Use the spreadsheet to obtain a sketch of the curve for 0 < x ⭐ 2, 0 < y ⭐ 2. 2 [12] The trapezium rule, using n strips of width h, is used to find an estimate Tn of the integral I= 冕 a b f(x) dx, where b – a = nh. You may assume that the global error in Tn is of the form A2 h2 + A4 h4 + A6 h6 + … , where the coefficients A2, A4, A6, … are independent of n and h. 4 T2n – Tn is an estimate of I with global error of order h4. (i) Show that Tn* = –––––––– 3 Write down an expression, Tn**, in terms of T2n* and Tn*, that represents an estimate of I with global error of order h6. [6] (ii) Use Rombergʼs method on a spreadsheet to find the value of x 冕 –––––– dx 1+e 2 I= 2 –x 0 correct to 6 decimal places. [9] (iii) Modify your spreadsheet to find the value of x 冕 –––––– dx 1+e k J= 0 2 –x for k = 0, 0.25, … , 2. Hence obtain a sketch of J against k. [6] (iv) Use your spreadsheet to determine, correct to 2 decimal places, the value of k for which J =1. [3] © OCR 2008 4777/01 Jun08 3 3 The differential equation dy –– = 1 – x + y, with y = 0 when x = 0, dx is to be solved numerically. (i) Use the Runge-Kutta order 4 method with h = 0.2 to obtain a sketch of the solution curve for 0 < x < 3. Give a rough estimate of the coordinates of the turning point (p, q) on the solution curve. Also give a rough estimate of α, the value of x for which the curve crosses the horizontal axis. [11] (ii) By reducing h appropriately, obtain the values of p, q and α correct to 2 decimal places. [5] (iii) The differential equation is now generalised to dy –– = s – x + y, with y = 0 when x = 0. dx Modify your spreadsheet to find, correct to 2 decimal places, the value of s for which α =1. 4 [8] A curve of the form y = a + bx + cx2 (1) is to be fitted, using least squares, to a set of data points (xi, yi), i = 1, 2, ... , n. (i) Show, using partial differentiation, that one of the normal equations is Σy = na + b Σ x + c Σx2. Write down the other two normal equations. (ii) [5] Use a spreadsheet to obtain a scatter diagram for the following data. xi 0 0.5 1 1.5 2 2.5 3 yi 1.02 2.08 2.73 3.14 2.87 2.22 1.43 What feature of the data suggests that a curve of the form (1) might be a suitable fit? (iii) [3] Use a spreadsheet to (A) formulate the normal equations, (B) solve for a, b, c, using Gaussian elimination, (C) find, and comment on, the sum of the residuals, [16] (D) find the residual sum of squares. © OCR 2008 4777/01 Jun08 4 Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable effort has been made by the publisher (OCR) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity. OCR is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. © OCR 2008 4777/01 Jun08 ADVANCED GCE 4777 MATHEMATICS (MEI) Numerical Computation Tuesday 23 June 2009 Morning *OCE/T61328* Candidates answer on the Answer Booklet OCR Supplied Materials: • 8 page Answer Booklet • MEI Examination Formulae and Tables (MF2) • Graph paper Duration: 2 hours 30 minutes Other Materials Required: None * 4 7 7 7 * INSTRUCTIONS TO CANDIDATES • • • • • • Write your name clearly in capital letters, your Centre Number and Candidate Number in the spaces provided on the Answer Booklet. Use black ink. Pencil may be used for graphs and diagrams only. Read each question carefully and make sure that you know what you have to do before starting your answer. Answer any three questions. Do not write in the bar codes. Additional sheets, including computer print-outs, should be fastened securely to the Answer Booklet. COMPUTING RESOURCES • Candidates will require access to a computer with a spreadsheet program and suitable printing facilities throughout the examination. INFORMATION FOR CANDIDATES • • • • • • • The number of marks is given in brackets [ ] at the end of each question or part question. In each of the questions you are required to write spreadsheet routines to carry out various numerical analysis processes. You will not receive credit for using any numerical analysis functions which are provided within the spreadsheet. For example, many spreadsheets provide a solver routine; you will not receive credit for using this routine when asked to write your own procedure for solving an equation. You may use the following built-in mathematical functions: square root, sin, cos, tan, arcsin, arccos, arctan, ln, exp. For each question you attempt, you should submit print-outs showing the spreadsheet routine you have written and the output it generates. It will be necessary to print out the formulae in the cells as well as the values in the cells. You are not expected to print out and submit everything your routine produces, but you are required to submit sufficient evidence to convince the examiner that a correct procedure has been used. You are advised that an answer may receive no marks unless you show sufficient detail of the working to indicate that a correct method is being used. The total number of marks for this paper is 72. This document consists of 4 pages. Any blank pages are indicated. © OCR 2009 [T/102/2667] SP (SLM) T61328/5 OCR is an exempt Charity Turn over 2 1 (i) The equation x = g(x) has a root x = α. State a condition on the derivative of g(x) that will ensure convergence of the iteration xr + 1 = g(xr) provided x0 is close enough to α. Obtain the relaxed iteration xr + 1 = l g(xr) + (1 – l) xr. Show that, for fastest convergence, l= 1 . 1 – g9(α) State how a value for l would be chosen in practice. [7] (ii) Use a spreadsheet to show graphically that the equation x = 3 sin x – 0.5 (where x is in radians) has two roots in the interval (0, 3). Use your graph to give approximate values for these roots. Show that the iteration xr + 1 = 3 sin xr – 0.5 does not converge to either root. You should try several values of x0 in each case. Use the method of relaxation to find each root correct to 6 decimal places. 2 The Gaussian 3-point integration formula has the form f(x) dx = a f(–α) + b f(0) + a f(α). h –h (i) By considering f(x) = 1, x, x2, x3, x4, obtain the three equations that determine a, b and α. Verify that these equations are satisfied by 35 h, α= a = 59 h, [17] b = 89 h. [8] (ii) Taking h = p initially, use the Gaussian 3-point rule to estimate the value of 8 p 4 0 1+ tan x dx . Repeat the process, halving h as necessary, in order to establish the value of the integral correct to 6 decimal places. [12] (iii) Determine, correct to 3 decimal places, the value of k such that © OCR 2009 0 p 4 [4] 1+ k tan x dx = 1. 4777 Jun09 3 3 The second order differential equation d2y dy + xy = 1 + x dx2 dx dy with initial conditions x = 0, y = 0, = a, is to be solved for various values of a using finite difference dx methods. (i) Consider first the case a = 1. Show that, in the usual notation, yr + 1 = and that 2(2 − h 2 xr ) yr + (h xr − 2 ) yr −1 + 2 h 2 2 + h xr , y1 = h + 12 h2. (*) [8] (ii) Obtain a solution from x = 0 to x = 5 with h = 0.1. Use your spreadsheet to produce a graph of this solution. [9] (iii) Modify (*) to allow different values of a to be used. Still using h = 0.1, find, correct to 1 decimal place, a negative value of a for which the graph of the solution curve crosses the axis very close to x = 2. [7] 4 The system of linear equations with augmented matrix a 1 b 1 1 a 1 b b 1 a 1 1 b 1 a 1 0 0 0 is to be solved, using the Gauss-Seidel method, for various values of a and b. (i) Explain the condition of diagonal dominance. State a condition on a and b that will ensure convergence. [3] (ii) Set up a spreadsheet implementing the Gauss-Seidel method and allowing the user to vary the values of a and b. Show that convergence does occur in the case a = 4, b = 2, and does not occur in the case a = 2, b = 4. [12] (iii) Investigate the case a = 2, b = 0. What do your results indicate about diagonal dominance? (iv) By modifying your spreadsheet find the inverse of the following matrix. © OCR 2009 4 1 2 1 1 4 1 2 2 1 4 1 1 2 1 4 [4] [5] 4777 Jun09 4 Copyright Information OCR is committed to seeking permission to reproduce all third-party content that it uses in its assessment materials. OCR has attempted to identify and contact all copyright holders whose work is used in this paper. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced in the OCR Copyright Acknowledgements Booklet. This is produced for each series of examinations, is given to all schools that receive assessment material and is freely available to download from our public website (www.ocr.org.uk) after the live examination series. If OCR has unwittingly failed to correctly acknowledge or clear any third-party content in this assessment material, OCR will be happy to correct its mistake at the earliest possible opportunity. For queries or further information please contact the Copyright Team, First Floor, 9 Hills Road, Cambridge CB2 1PB. OCR is part of the Cambridge Assessment Group; Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. © OCR 2009 4777 Jun09 ADVANCED GCE 4777 MATHEMATICS (MEI) Numerical Computation Monday 28 June 2010 Afternoon * O C E / 1 3 6 6 5 * CandidatesanswerontheAnswerBooklet OCR Supplied Materials: • 8pageAnswerBooklet • MEIExaminationFormulaeandTables(MF2) • Graphpaper Other Materials Required: • Scientificorgraphicalcalculator • Computerwithappropriatesoftwareandprinting facilities Duration:2hours30minutes * 4 7 7 7 * INSTRUCTIONS TO CANDIDATES • • • • • • Writeyournameclearlyincapitalletters,yourCentreNumberandCandidateNumberinthespaces providedontheAnswerBooklet. Useblackink.Pencilmaybeusedforgraphsanddiagramsonly. Readeachquestioncarefullyandmakesurethatyouknowwhatyouhavetodobeforestartingyouranswer. Answeranythreequestions. Donotwriteinthebarcodes. Additionalsheets,includingcomputerprint-outs,shouldbefastenedsecurelytotheAnswerBooklet. COMPUTING RESOURCES • Candidateswillrequireaccesstoacomputerwithaspreadsheetprogramandsuitableprintingfacilities throughouttheexamination. INFORMATION FOR CANDIDATES • • • • • • • Thenumberofmarksisgiveninbrackets[ ]attheendofeachquestionorpartquestion. Ineachofthequestionsyouarerequiredtowritespreadsheetroutinestocarryoutvariousnumerical analysisprocesses. Youwillnotreceivecreditforusinganynumericalanalysisfunctionswhichareprovidedwithinthe spreadsheet.Forexample,manyspreadsheetsprovideasolverroutine;youwillnotreceivecreditforusing thisroutinewhenaskedtowriteyourownprocedureforsolvinganequation. Youmayusethefollowingbuilt-inmathematicalfunctions:squareroot,sin,cos,tan,arcsin,arccos,arctan, ln,exp. Foreachquestionyouattempt,youshouldsubmitprint-outsshowingthespreadsheetroutineyouhave writtenandtheoutputitgenerates.Itwillbenecessarytoprintouttheformulaeinthecellsaswellasthe valuesinthecells. Youarenotexpectedtoprintoutandsubmiteverythingyourroutineproduces,butyouarerequiredto submitsufficientevidencetoconvincetheexaminerthatacorrectprocedurehasbeenused. Youareadvisedthatananswermayreceiveno marksunlessyoushowsufficientdetailoftheworkingto indicatethatacorrectmethodisbeingused. Thetotalnumberofmarksforthispaperis72. Thisdocumentconsistsof4pages.Anyblankpagesareindicated. ©OCR2010 [T/102/2667] DC(LEO)13665/4 OCRisanexemptCharity Turn over 2 1 The table shows some values of x and y that have been obtained experimentally. The values are assumed to be correct to the numbers of significant figures shown. x 0.09 0.93 1.91 4.10 4.91 6.04 y 1.076 0.897 0.498 –0.544 –0.740 –0.900 (i) Estimated values of y are required for various values of x. Explain briefly why Newton’s divided difference formula might be used here in preference to other methods of interpolation. [3] (ii) Use a spreadsheet to obtain a sketch of the data. [2] (iii) Set up a spreadsheet, using divided differences, to produce a sequence of estimates, linear, quadratic, cubic and quartic, of y when x = 3. Discuss briefly the likely accuracy of the value of y when x = 3. [14] (iv) Modify the spreadsheet so that it will estimate y for user-specified values of x near to 3. Hence determine, to 2 decimal places, the value of x for which y is zero. [5] 2 (i) The trapezium rule, using n strips of equal width h, is used to find an estimate Tn of the integral I= a b f(x)dx. You are given that the global error in Tn is of the form A2 h2 + A4 h4 + A6 h6 + ..., where the coefficients A2, A4, A6, … are independent of n and h. Show that Tn* = 13 (4 T2n – Tn) is an estimate of I with global error of order h4. Write down, without proof, an expression, Tn**, in terms of T2n* and Tn*, that represents an estimate of I with global error of order h6. [6] (ii) Use a spreadsheet to obtain a graph of y = ln (1 + sin x) for 0 x 4.5. [2] (iii) Set up a spreadsheet that uses Romberg’s method to find, correct to 5 decimal places, the integral π 0 [11] ln (1 + sin x) dx. (iv) Modify your spreadsheet so that it finds the value of 0 c ln (1 + sin x) dx for a user-specified value of c. Hence find, correct to 3 decimal places, the value of c for which the integral is zero. [5] ©OCR2010 4777Jun10 3 3 The differential equation dy = 1+ xy , with y = 1 when x = 1, dx is to be solved numerically. When x = 2, the value of y is α. (i) Use the modified Euler method with h = 0.1, 0.05, 0.025, … to obtain a sequence of estimates of α. Show that the convergence of this sequence is second order. Obtain the value of α correct to 4 decimal places. [12] (ii) Now set up a predictor-corrector routine to find a sequence of estimates of α. Use the Euler method as predictor and the modified Euler method as corrector. Apply the corrector 3 times at each step. As before take h = 0.1, 0.05, 0.025, … until α is secure to 4 decimal places. [8] (iii) Compare briefly the computational merits of the methods in parts (i) and (ii). 4 [4] The system of linear equations with augmented matrix 7+α 6 5 4 6 5+α 4 3 5 4 3+α 2 4 3 2 1+α 1+β 1 1 1 is to be investigated numerically for various values of α and β. (i) For the case α = 0.1 and β = 0, solve the equations using Gaussian elimination with partial pivoting. Find the magnitude of the determinant of the coefficient matrix. [14] (ii) For the case α = 0.01, solve the equations for (A) β = 0, (B) β = 0.01, and find the magnitude of the determinant of the coefficient matrix. [10] Comment on your results. ©OCR2010 4777Jun10 4 THERE ARE NO QUESTIONS ON THIS PAGE Copyright Information OCR is committed to seeking permission to reproduce all third-party content that it uses in its assessment materials. OCR has attempted to identify and contact all copyright holders whose work is used in this paper. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced in the OCR Copyright AcknowledgementsBooklet.Thisisproducedforeachseriesofexaminations,isgiventoallschoolsthatreceiveassessmentmaterialandisfreelyavailabletodownloadfromourpublic website(www.ocr.org.uk)aftertheliveexaminationseries. If OCR has unwittingly failed to correctly acknowledge or clear any third-party content in this assessment material, OCR will be happy to correct its mistake at the earliest possible opportunity. ForqueriesorfurtherinformationpleasecontacttheCopyrightTeam,FirstFloor,9HillsRoad,CambridgeCB21GE. OCR is part of the Cambridge Assessment Group; Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a departmentoftheUniversityofCambridge. ©OCR2010 4777Jun10 ADVANCED GCE 4777 MATHEMATICS (MEI) Numerical Computation Candidates answer on the answer booklet. * O C E / 2 7 6 3 0 * OCR supplied materials: • 8 page answer booklet (sent with general stationery) • MEIExaminationFormulaeandTables(MF2) • Graph paper Other materials required: • Scientific or graphical calculator • Computer with appropriate software and printing facilities Friday 24 June 2011 Afternoon Duration: 2 hours 30 minutes * 4 7 7 7 * INSTRUCTIONS TO CANDIDATES • Write your name, centre number and candidate number in the spaces provided on the answer booklet. Please write clearly and in capital letters. • Use black ink. Pencil may be used for graphs and diagrams only. • Read each question carefully. Make sure you know what you have to do before starting your answer. • Answer any three questions. • Additional sheets, including computer print-outs, should be fastened securely to the Answer Booklet. • Do not write in the bar codes. COMPUTING RESOURCES • Candidateswillrequireaccesstoacomputerwithaspreadsheetprogramandsuitable printing facilities throughout the examination. INFORMATION FOR CANDIDATES • The number of marks is given in brackets [ ] at the end of each question or part question. • Ineachofthequestionsyouarerequiredtowritespreadsheetroutinestocarryoutvarious numerical analysis processes. • Youwillnotreceivecreditforusinganynumericalanalysisfunctionswhichareprovided within the spreadsheet. For example, many spreadsheets provide a solver routine; you will not receive credit for using this routine when asked to write your own procedure for solving an equation. Youmayusethefollowingbuilt-inmathematicalfunctions:squareroot,sin,cos,tan,arcsin, arccos, arctan, ln, exp. • Foreachquestionyouattempt,youshouldsubmitprint-outsshowingthespreadsheet routineyouhavewrittenandtheoutputitgenerates.Itwillbenecessarytoprintoutthe formulae in the cells as well as the values in the cells. Youarenotexpectedtoprintoutandsubmiteverythingyourroutineproduces,butyouare required to submit sufficient evidence to convince the examiner that a correct procedure has been used. • Youareadvisedthatananswermayreceiveno marks unless you show sufficient detail of the working to indicate that a correct method is being used. • The total number of marks for this paper is 72. • This document consists of 4 pages. Any blank pages are indicated. © OCR 2011 [T/102/2667] DC (LEO) 27630/3 OCR is an exempt Charity Turn over 2 1 In this question, the notation exp(t) is used to denote et. (i) Show, graphically or otherwise, that the equation x = exp(–x2) has exactly one root, α. Use a spreadsheet to show that the iteration xr +1 = exp(–xr2), with a suitable starting value, converges slowly to α. Confirm your findings by considering the derivative of exp(–x2). [9] (ii) Obtain the relaxed iteration xr +1 = (1 – λ) xr + λ exp(–xr2). On a spreadsheet investigate the speed of convergence of the relaxed iteration for various values of λ. Hence find, correct to 1 decimal place, the value of λ that gives fastest convergence. [6] (iii) Show that, theoretically, the best value of λ is given by λ= 1 . 1 + 2α exp(– α2) [3] Evaluate this expression. (iv) On a spreadsheet, carry out the iteration xr +1 = (1 – λr) xr + λr exp(–xr2) where λr = 1 . 1 + 2xr exp(– xr2) Show that the convergence of this iteration is faster than first order. 2 [6] (i) Obtain from first principles the Gaussian two-point rule for numerical integration: h f(x) dx ≈ h f – h + f h . 3 3 –h Find the error when this rule is used to evaluate the local and global errors in the rule. h –h x3 dx and h x4 dx. Hence state the orders of –h [10] (ii) Use the Gaussian two-point rule to find, correct to 6 decimal places, the value of the integral I= 1 2 + sin x dx. 0 You should begin with h = 0.5 and then take h = 0.25, 0.125, ... as necessary. Show, by considering ratios of differences, that the global error is as stated in part (i). [9] (iii) Modify your routine so that it calculates values of the integral J= 0 1 (2 + sin x)k dx for any specified k. Find, correct to 2 decimal places, the value of k for which J = 3. © OCR 2011 4777/01 Jun11 [5] 3 3 The differential equation dy = f(x, y) with initial conditions x = x0, y = y0, is to be solved by using the dx Runge-Kutta methods given below. Method A k1 = h f(xr, yr) 1 (i) Method B k1 = h f(xr, yr) 1 k2 = h f(xr + 2 h, yr + 2 k1) k2 = h f(xr + h, yr + k1) yr +1 = yr + k2 yr +1 = yr + 2 (k1 + k2) xr +1 = xr + h xr +1 = xr + h 1 Set up a spreadsheet to obtain a numerical solution by each method to the differential equation dy = 1+ x + y , with y = 0 when x = 0. dx For h = 0.2, 0.1, 0.05, 0.025, find the estimates given by each method for y when x = 2. By considering ratios of differences show that each method is second order. Show that the errors in one method are substantially less than the errors in the other. [20] (ii) Obtain a graph of the solution curve. Determine, correct to 2 decimal places, the value of x on the solution curve for which y = 2x. [4] [Question 4 is printed overleaf.] © OCR 2011 4777/01 Jun11 Turn over 4 4 The variables x and y are thought to be related by an equation of the form y = ax + bx2 + cx3, (*) for some constants a, b and c. The following experimental data are available. The x values are exact but the y values contain experimental error. x –3 –2 –1 0 1 2 3 y –35.25 –8.01 2.51 –0.09 –4.07 –5.06 0.65 (i) Use a spreadsheet to obtain a sketch of the data points and use it to explain why (*) looks like a reasonable fit. [4] (ii) Show that one of the normal equations for finding the least squares estimates of a, b and c is Σ xy = a Σ x2 + b Σ x3 + c Σ x4. [5] Write down the other two normal equations. (iii) Find • the least squares estimates of a, b and c, • the fitted values of y, • the sum of the residuals, • the sum of the squares of the residuals. [12] (iv) Obtain a sketch of the fitted curve and the data points. Comment briefly on the fit of the curve to the data. [3] Copyright Information OCR is committed to seeking permission to reproduce all third-party content that it uses in its assessment materials. OCR has attempted to identify and contact all copyright holders whose work is used in this paper. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced in the OCR Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download from our public website (www.ocr.org.uk) after the live examination series. If OCR has unwittingly failed to correctly acknowledge or clear any third-party content in this assessment material, OCR will be happy to correct its mistake at the earliest possible opportunity. For queries or further information please contact the Copyright Team, First Floor, 9 Hills Road, Cambridge CB2 1GE. OCR is part of the Cambridge Assessment Group; Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. © OCR 2011 4777/01 Jun11 2 1 (i) x0, x1, x2 are three terms in a first order iteration converging to α. Given that the error in x0 is ε and the error in x1 is kε (where ε is small), what can you say about the error in x2? Show that α may be estimated as x0 − (Δx0)2 Δ2x0 . The equation x = cos(bx), where x is in radians and 0 [6] b 3, has a root α which depends upon b. (ii) Use a spreadsheet to show that the iteration xr + 1 = cos(bxr), with x0 = 1, (A) converges slowly when b = 1, (B) diverges when b = 2. Show that the formula obtained in part (i) may be used to give more rapid convergence when b = 1. What does the use of this formula achieve when b = 2? [10] (iii) Obtain a graph of α against b for 0 b 3. Find, correct to 4 decimal places, the value of b for which α is closest to 0.5. [Hint: you may find it convenient to use starting values other than x0 = 1 for some values of b.] [8] 2 The Gaussian 3-point integration formula has the form 冕 h f(x) dx = af(−α) + bf(0) + af(α). −h (i) Obtain the three equations that determine a, b and α. Verify that these equations are satisfied by α= (ii) Taking h = π 4 3 5 h, a = 59 h, b = 89 h. [8] initially, use the Gaussian 3-point rule to estimate the value of 冕 π 2 1 (sin x + 2cos x) 2 dx. 0 Repeat the process, halving h as necessary, in order to establish the value of the integral correct to 6 decimal places. [12] (iii) Determine, correct to 3 decimal places, the value of k such that 冕 π 2 (sin x + 2cos x)k dx = 2. 0 © OCR 2012 4777Jun12 [4] 3 3 The second order differential equation d2y dy = x2 2 − 2y dx dx with initial conditions x = 1, y = 1, dy = −1, is to be solved using finite difference methods. dx (i) Show that, in the usual notation, yr + 1 (1 − h yr) = h2xr2 + 2yr − yr − 1 − h yr yr − 1 and y1 = 1 – h – 12 h2. [8] (ii) Obtain a solution from x = 1 to x = 3 with h = 0.1. Use your spreadsheet to produce a graph of this solution. [8] (iii) Halving h as necessary, find the values of y at x = 2 and at x = 3, each correct to 3 significant figures. Show that this method of solution is second order. 4 [8] (i) Describe the conditions for convergence of the Gauss-Jacobi and Gauss-Seidel methods for the solution of a system of linear equations. [3] (ii) A system of linear equations is represented by the following augmented matrix. k 1 2 0 2 0 3 1 1 3 0 2 0 2 1 3 1 0 0 0 Investigate the convergence of the Gauss-Jacobi method applied to this system of equations in the cases k = 1, k = 3, k = 5. Relate your results to your answer to part (i). (iii) Modify your routine from part (ii) to find the inverse of the coefficient matrix in the case k = 5. © OCR 2012 4777Jun12 [12] [9] 4 Copyright Information OCR is committed to seeking permission to reproduce all third-party content that it uses in its assessment materials. OCR has attempted to identify and contact all copyright holders whose work is used in this paper. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced in the OCR Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download from our public website (www.ocr.org.uk) after the live examination series. If OCR has unwittingly failed to correctly acknowledge or clear any third-party content in this assessment material, OCR will be happy to correct its mistake at the earliest possible opportunity. For queries or further information please contact the Copyright Team, First Floor, 9 Hills Road, Cambridge CB2 1GE. OCR is part of the Cambridge Assessment Group; Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. © OCR 2012 4777Jun12 Monday 24 June 2013 – Afternoon A2 GCE MATHEMATICS (MEI) 4777/01 Numerical Computation Candidates answer on the Answer Booklet. * 4 7 1 5 9 6 0 6 1 3 * OCR supplied materials: • 12 page Answer Booklet (OCR12) (sent with general stationery) • MEI Examination Formulae and Tables (MF2) • Graph paper Other materials required: • Scientific or graphical calculator • Computer with appropriate software and printing facilities Duration: 2 hours 30 minutes * 4 7 7 7 0 1 * INSTRUCTIONS TO CANDIDATES • Write your name, centre number and candidate number in the spaces provided on the Answer Booklet. Please write clearly and in capital letters. • Use black ink. HB pencil may be used for graphs and diagrams only. • Read each question carefully. Make sure you know what you have to do before starting your answer. • Answer any three questions. • Additional sheets, including computer print-outs, should be fastened securely to the Answer Booklet. • Do not write in the bar codes. COMPUTING RESOURCES • Candidates will require access to a computer with a spreadsheet program and suitable printing facilities throughout the examination. INFORMATION FOR CANDIDATES • The number of marks is given in brackets [ ] at the end of each question or part question. • In each of the questions you are required to write spreadsheet routines to carry out various numerical analysis processes. • You will not receive credit for using any numerical analysis functions which are provided within the spreadsheet. For example, many spreadsheets provide a solver routine; you will not receive credit for using this routine when asked to write your own procedure for solving an equation. You may use the following built-in mathematical functions: square root, sin, cos, tan, arcsin, arccos, arctan, ln, exp. • For each question you attempt, you should submit print-outs showing the spreadsheet routine you have written and the output it generates. It will be necessary to print out the formulae in the cells as well as the values in the cells. You are not expected to print out and submit everything your routine produces, but you are required to submit sufficient evidence to convince the examiner that a correct procedure has been used. • You are advised that an answer may receive no marks unless you show sufficient detail of the working to indicate that a correct method is being used. • The total number of marks for this paper is 72. • This document consists of 4 pages. Any blank pages are indicated. © OCR 2013 [T/102/2667] DC (LEG) 66634/2 OCR is an exempt Charity Turn over 2 1 (i) The equation f (x) = 0 has a root a . The equation is rearranged to x = g (x) , and the corresponding iterative formula gives the sequence x 0 , x 1 , x 2 , ... . Given that x r+1 - a . k _ x r - a i for some constant k, where k ! 1, show that a. kx 0 - x 1 , k- 1 where k. x2 - x1 . x1 - x0 [3] (ii) The equation 1 + mx = e x , where m is a constant and m 2 1, is to be solved for x 2 0 . Show, graphically or otherwise, that the equation has exactly one positive root. (iii) For the case m = 1.5 , show that the iteration x r+1 = ln (1 + mx r) converges slowly. Show also that the iteration x r+1 = 2 (*) e xr - 1 m (**) diverges from the required root. [6] (iv) Use the method of part (i) to speed up the convergence of (*). [3] Investigate whether or not the method of part (i) makes (**) converge to the required root. [9] (v) Modify your spreadsheet to find, correct to 3 decimal places, the value of m in the interval [1, 2] for [3] which a = 0.5m . In the table, the values of x are exact and the values of y are correct to 2 decimal places. x 0.5 1.0 2.0 4.0 6.0 8.0 y 2.23 1.43 1.04 1.22 6.96 40.53 (i) Estimated values of y are required for various values of x. Explain briefly the merits of using Newton’s divided difference formula here in preference to other methods of interpolation. [3] (ii) Use a spreadsheet to obtain a sketch of the data. (iii) Use divided differences to produce a sequence of estimates, linear, quadratic, cubic and quartic, of y when x = 2.9. Discuss briefly the likely accuracy of these estimates. Give the estimate of y to the accuracy that is justified. [14] (iv) Modify the spreadsheet in part (iii) so that it will estimate y for user-specified values of x between 4 and 5. Hence determine, correct to 2 decimal places, the value of x in this range for which y = 2. [5] © OCR 2013 4777/01Jun13 [2] 3 3 (i) Apply the standard Runge-Kutta order 4 method, with h = 0.5 and 0 G x G 2 , to the differential equations dy = x 3 , with y = 1 when x = 0 , dx and dy = x 4 , with y = 1 when x = 0 . dx Compare the numerical solutions with the exact solutions and comment. [11] (ii) Use the standard Runge-Kutta order 4 method to find a numerical solution for 0 G x G 2 to the differential equation dy = e x sin y - e y sin x , with y = 1 when x = 0 . dx Draw a graph of the solution. 4 Reducing h as necessary, determine, correct to 3 decimal places, the coordinates of the local maximum on the solution curve. [13] This question concerns the system of linear equations with the following augmented matrix. f a b 2 4 3 4 6 1 5 3 2 9 1 4 5 5 1 2 3 4 p (i) For the case a = 4 and b = 2 , solve the equations using Gaussian elimination with partial pivoting. Provide a check that your solutions fit the equations. Use the numbers generated in the Gaussian elimination process to find the magnitude of the determinant of the coefficient matrix. Show your method clearly. [16] (ii) Now consider small changes in coefficients as follows. (A) a = 4.01, b = 2 , (B) a = 4 , b = 2.01. In each case, find the percentage changes in the solutions and in the determinant. Comment. © OCR 2013 4777/01Jun13 [8] 4 THEREARENOQUESTIONSPRINTEDONTHISPAGE. Copyright Information OCR is committed to seeking permission to reproduce all third-party content that it uses in its assessment materials. OCR has attempted to identify and contact all copyright holders whose work is used in this paper. To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced in the OCR Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download from our public website (www.ocr.org.uk) after the live examination series. If OCR has unwittingly failed to correctly acknowledge or clear any third-party content in this assessment material, OCR will be happy to correct its mistake at the earliest possible opportunity. For queries or further information please contact the Copyright Team, First Floor, 9 Hills Road, Cambridge CB2 1GE. OCR is part of the Cambridge Assessment Group; Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge. © OCR 2013 4777/01Jun13