4777 Mark Scheme June 2006 MEI Numerical Computation (4777) June 2006 1 (i) (ii) (x2 - α) / (x1 - α) = (x1 - α) / (x0 - α) convincing algebra to required result. x exp(x) - tan(x) 1 1.160874 Examples of divergence: r 0 1 (iii) to eliminate k [M1A1A1] [A1A1] [subtotal 5] 1.5 -9.61973 change of sign (and no asymptote) 2 3 4 5 6 #NUM! #NUM! #NUM! #NUM! -0.21274 #NUM! #NUM! #NUM! #NUM! #NUM! #NUM! #NUM! xr 1 0.443023 xr 1.25 1.101797 -0.74554 0.67982 1 xr 1.5 2.646275 #NUM! xr 1.25 1.101797 xr 1.330227 1.405193 xr 1.312029 1.329149 xr 1.306628 1.307521 xr 1.306328 1.30633 xr 1.306327 x exp(-x) - tan(x) Mark scheme 0.67982 1 1.78895 9 [M1A1] [M1A1A1] α: 1.330227 [M1A1] α: 1.312029 [M1A1] 1.40054 1.31106 9 α: 1.306628 α: 1.306328 α: 1.306327 1.306327 1.30634 1.30632 7 α: 1.306328 1.30633 to 5 dp 3.142 0.042789 3.2 -0.01771 Examples of divergence: r 0 1 2 xr 3.142 7.805847 xr 3.2 xr [M1] [A1] [subtotal 11] change of sign [M1A1] 4 5 6 -3.03297 3 2.21594 3 #NUM! #NUM! #NUM! 2.839176 #NUM! #NUM! #NUM! #NUM! #NUM! 3.18 3.259015 2.13737 α: xr 3.1852 3.131898 #NUM! α: #NUM! xr #NUM! #NUM! #NUM! α: #NUM! xr #NUM! #NUM! #NUM! α: #NUM! xr 3.184 3.159834 α: 3.183327 xr 3.183327 3.17584 α: 3.183054 xr 3.183054 3.182409 α: 3.183029 xr 3.183029 3.183024 α: 3.183029 3.18303 to 5 dp [M1A1] Eg: 3.1852 [M1A1] but: 4.00395 6 3.37375 3 3.19812 2 3.18313 7 [M1A1] [subtotal 8] 4777 Mark Scheme June 2006 [TOTAL 24] 2 (i) (ii) Divided differences do not require data to be equally spaced (as ordinary differences do). Divided differences allow additional data to be added (unlike Lagrange). x 1 2 2.5 3.5 4 4.5 f -3 -6.5 -8.03 -6.66 -2.25 5.65 1 -3 -3.5 2 -6.5 -3.06 2.5 3.5 4 -8.03 -6.66 -2.25 1.37 8.82 1.5 -3 -4.75 linear 0.29333 3 2.95333 3 4.96666 7 -4.82333 quadratic 1.064 1.00666 7 -4.55733 cubic -0.01911 3.5 -6.66 1.37 2.5 4 2 4.5 3 -8.03 -2.25 -6.5 5.65 -6.66 3.853333 2.125 4.86 -7.345 linear 4.96666 7 3.45666 7 5.47 1.00666 7 1.00666 7 -8.58667 quadratic -8.335 cubic -4.54778 quartic 5.65 15.8 4 -2.25 8.82 3.5 2.5 2 5 -6.66 -8.03 -6.5 5.65 1.37 -3.06 13.55 linear 6.98 4.96666 7 2.95333 3 17.04 quadratic 1.00666 7 1.00666 7 17.795 cubic estimates [M1A1A1A1A1 ] [E1E1] [subtotal 10] -4.4E-16 -8.335 quartic 2nd dp unreliable (from data), 1st dp seems reliable: -8.3 4.5 table [M1A1A1] 2nd dp unreliable (from data), 1st dp uncertain: could be -4.5 or -4.6 (iii) [E1E1] [subtotal 2] rearrange data and re-run [M1A1] [E1] -6.2E-16 17.795 quartic rearrange data and re-run [M1A1] 4777 Mark Scheme June 2006 2nd dp unreliable (from data), 1st dp seems reliable: 17.8 (iv) 4 -2.25 15.8 6.98 4.5 5.65 12.31 3.5 2.5 2 4.16 -6.66 -8.03 -6.5 -2.25 1.37 -3.06 5.47 2.95333 3 0.278 4.17 -2.25 0.436 4.165 5.65 1.52615 4.175 -2.25 0.515 linear Hence root is 4.17 to 2 dp -0.10171 0.04442 2 0.30757 1 0.11801 2 quadratic 1.00666 7 1.00666 7 -0.13786 0.00658 4 -0.06582 0.07936 6 cubic [E1] [subtotal 6] -4.4E-16 -0.13786 rearrange data and re-run [M1A1] 0.006584 [M1A1] -0.06582 0.079366 quartic [A1] [A1] [subtotal 6] [TOTAL 24] 4777 3 (i) Mark Scheme Substitute central difference formulae for y' and y" to obtain given result (*) [M1A1] Central difference formula for y' at x=0 to show y1 = y-1 [M1A1] 2 Use of (*) to show y1 = (2h - (1 + 2h)y-1)/(1 - 2h) [M1A1] 2 Hence y1 = h as given h 0.1 h 0.1 0.05 [M1] x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 y 0 0.01 0.047618 0.124458 0.25785 0.473034 0.805379 1.301401 2.015508 2.996344 4.253311 β 4.253311 4.190790 diffs k 1 [M1A1] as required ratio of diffs [A1] extrapolated value -0.06252 re-runs 0.24040 0.025 4.175759 -0.01503 6 0.012 0.24760 4.17079 5 4.172037 -0.00372 4 7 ratio of differences approximately 0.25 so second order 4.17 to 2 dp is secure (ii) June 2006 k -5 -4 -3 β 18.4 13.1 9.7 [A1A1A1] [M1A1E1] [A1] [subtotal 17] mods [M1A1] 131 4777 Mark Scheme -2 -1 0 1 2 3 4 5 June 2006 7.4 6 4.9 4.2 3.6 3.2 2.9 2.6 values [A1A1A1] graph [G2] [subtotal 7] [TOTAL 24] 4 (i) Diagonal dominance: modulus of diagonal element is greater than or equal to sum of moduli of other elements on the same row. If diagonal dominance exists (with at least one inequality strict) convergence of Gauss-Seidel is assured. G-S using the given non-dominant diagonal: x 0 0.2 0.192381 0.186262 … 0.180325 0.180327 0.180328 0.180328 (ii) a=3 x 0 0.333333 0.447619 0.54449 … 1 1 1 y 0 -0.06667 -0.12 -0.16267 … -0.33333 -0.33333 -0.33333 z 0 -0.04762 -0.09116 -0.12987 … -0.33333 -0.33333 -0.33333 a=4 x 0 0.5 0.9375 1.583333 2.543403 3.976273 6.119551 9.329443 14.1401 21.35259 … 2.6E+18 3.91E+1 8 [E1] [E1] y 0 0.02857 1 0.04199 5 0.04733 5 … 0.04918 0.04918 0.04918 0.04918 z 0 y 0 -0.25 -0.64583 -1.25694 -2.18808 -3.59684 -5.72002 -8.91317 -13.7099 -20.9107 … -2.6E+18 z 0 -0.04167 -0.07639 -0.10532 -0.12944 -0.14953 -0.16628 -0.18023 -0.19186 -0.20155 … 0 -3.9E+18 0 -0.01587 [M1] [M1A1] -0.0191 -0.01866 … -0.01639 -0.01639 -0.01639 -0.01639 [M1A1] [subtotal 7] mods [M1A1] a=3 [M1A1] a=4 [M1A1] 4777 Mark Scheme June 2006 5.86E+1 8 G-S scheme converges for a=3.3 diverges for a=3.4 (diverges for a=3.35) So a=3.3 (to 1dp) is required value (iii) Gauss-Jacobi a=0 x 0 0.166667 0.054167 0.19375 0.067708 0.200521 … 0.202778 0.072222 0.202778 0.072222 0.202778 0.072222 -5.9E+18 0 [M1A1] [M1A1] [A1] [subtotal 11] y 0 0.125 -0.00833 0.12083 3 -0.01042 0.11979 2 … 0.11944 4 -0.01111 0.11944 4 -0.01111 0.11944 4 -0.01111 Diverges: diagonal dominance not strict. z 0 0.1 -0.04583 0.07708 3 -0.05729 0.07135 4 … 0.06944 4 -0.06111 0.06944 4 -0.06111 0.06944 4 -0.06111 [M1A1] [M1A1] [A1] [E1] [subtotal 6] [TOTAL 24] 4777 1(i) Mark Scheme June 2007 Convincing algebra to k = (x2 - x1)/(x1 - x0) [M1A1] Convincing algebra to α = (x2 - k x1)/(1 - k) or equivalent (ii) (iii) x 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 y=x 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 y=f(x) 1.5 1.527842 1.612144 1.755252 1.961151 2.235574 2.586161 3.022674 3.557265 4.204819 4.983366 5.914581 7.024391 converges slowly to root near 2 2 1.961151 1.942783 1.934241 1.9303 1.928489 1.927657 1.927276 diverges from root near 5 x0 2 1.92631 1.926953 x1 1.961151 1.926659 1.926953 x0 5 5.023872 5.023461 x0 4.6 5.216066 5.047555 5.02388 5.023461 [M1A1A1] [subtotal 5] [G2] 4.5 4.204819 3.807921 3.339412 2.872419 2.488967 2.228729 2.07777 5 4.983366 4.95514 4.90763 4.828739 4.70068 4.500432 4.205432 x2 1.942783 1.926818 1.926953 k 0.472807 0.458143 0.45827 new x0 1.92631 1.926953 1.926953 x1 4.983366 5.024167 5.023461 x2 4.95514 5.024673 5.023461 k 1.696813 1.71656 1.716217 new x0 5.023872 5.023461 5.023461 x1 4.349412 5.365628 5.064991 5.024181 5.023461 x2 3.996895 5.647933 5.095267 5.024697 5.023461 k 1.406756 1.887551 1.73646 1.716567 1.716217 new x0 5.216066 5.047555 5.02388 5.023461 5.023461 5.5 5.914581 6.820878 9.3175 21.8726 1466.344 1.9E+212 #NUM! set up iteration [M1A1] near 2 [A1] near 5 [A1A1] (theoretical arguments involving f 'acceptable) [subtotal 7] =alpha = beta range 4.6 to 5.7 k est of root use as x0 iterate [M1A1] [M1A1] [M1] [M1A1] alpha [A1] beta [A1] [M1A1A1] [subtotal 12] [TOTAL 24] 119 4777 2 (i) Mark Scheme June 2007 Substitute f(x) = 1, x2, x4, x6 into the integration fomula Obtain a+b=h aα2 + bβ2 = h3/3 aα4 + bβ4 = h5/5 (aα6 + bβ6 = h7/7) [M1M1M1M1] [A1] [A1] [A1] [subtotal 7] (ii) (ii) E.g. x 0 0.5 1 1.5 2 2.5 3 3.5 x sin(x) / x 0.1 0.998334 0.01 0.999983 0.001 1 [B1] sin(x) / x 1 0.958851 0.841471 0.664997 0.454649 0.239389 0.04704 -0.10022 [G2] Single application of Gaussian 4-pt rule Subdividing the interval m= α, β -0.86114 -0.33998 0.339981 0.861136 m= m= (iii) 1.570796 x 0.218127 1.036755 2.104837 2.923466 h= f(x) 0.992089 0.830241 0.408942 0.074022 0.785398 h= 2.356194 h= By trial and error m= 0.53242 α, β x -0.86114 0.073934 -0.33998 0.351407 0.339981 0.713433 0.861136 0.990906 h= f(x) 0.999089 0.979546 0.917302 0.8442 Hence t = 2m = 1.570796 a, b 0.347855 0.652145 0.652145 0.347855 sum: integral: 0.785398 gives 0.785398 gives sum 0.345103 0.541438 0.26669 0.025749 1.17898 1.851937 set up [M4] 1.370762 [M1A1] 0.481175 1.851937 [M1A1] ( = 6dp) [A1] [subtotal 13] [A1] 0.53242 a, b 0.347855 0.652145 0.652145 0.347855 1.065 0.347538 0.638806 0.598214 0.293659 1 (1.06484) trial and error [M1A1] [M1A1] [subtotal 4] [TOTAL 24] 120 4777 Mark Scheme 3 (i) Euler (ii) Modified Euler h 0.2 0.2 0.2 0.2 0.2 0.2 x 0 0.2 0.4 0.6 0.8 1 y 0 0.02 0.080404 0.182079 0.326073 0.513783 y' 0.1 0.30202 0.508372 0.719971 0.938552 h 0.2 0.1 0.05 0.025 y(1) 0.513783 0.569802 0.598337 0.612748 diffs ratio of diffs 0.056019 0.028535 0.014411 h 0.2 0.2 0.2 0.2 0.2 0.2 x 0 0.2 0.4 0.6 0.8 1 y 0 0.040202 0.121675 0.245483 0.413051 0.626446 k1 0.02 0.06082 0.102588 0.145565 0.190228 h 0.2 0.1 0.05 0.025 y(1) 0.626446 0.627065 0.627213 0.627249 diffs ratio of diffs 0.000619 0.000147 3.58E-05 0.509387 0.505038 0.238113 0.242993 June 2007 new y 0.02 0.080404 0.182079 0.326073 0.513783 setup [M2] estimates [A1A1] differences [M1A1] approx 0.5, so first order k2 0.060404 0.102126 0.145028 0.189571 0.236562 [E1] [subtotal 7] new y 0.040202 0.121675 0.245483 0.413051 0.626446 setup [M2] estimates [A1A1] differences [A1] approx 0.25, so second order [E1] [subtotal 6] (iii) (iv) predictor-corrector h x 0.2 0 0.2 0.2 0.2 0.4 0.2 0.6 0.2 0.8 0.2 1 y 0 0.040412 0.122124 0.246214 0.414137 0.628006 h 0.2 0.1 0.05 0.025 y(1) 0.628006 0.627447 0.627307 0.627272 -0.00056 -0.00014 -3.5E-05 0.250462 0.250113 mod Euler 0.626446 0.627065 0.627213 0.627249 pre-corr 0.628006 0.627447 0.627307 0.627272 average 0.627226 0.627256 0.62726 0.627261 y' 0.1 0.304124 0.512989 0.727917 0.951306 pred 0.02 0.101237 0.224722 0.391798 0.604398 corr1 0.040202 0.12189 0.245942 0.413802 0.627569 corr2 0.04041 0.122121 0.246211 0.414132 0.627998 corr3 0.040412 0.122124 0.246214 0.414137 0.628006 setup [M3] estimates [A1A1] differences [A1] Still second order. Differences very similar in magnitude to modified Euler. diffs 3.04E-05 3.78E-06 4.21E-07 ratio of diffs 0.124555 0.111332 approx 0.125 so third order [E1E1] [subtotal 8] values [A1] differences [A1] [E1] [subtotal 3] [TOTAL 24] 121 4777 4 (i) Mark Scheme 0 3 2 1 1 0 3 2 1 3 2 2 1 0 3 2 -0.66667 2.666667 2.222222 3.111111 3 2 1 0 3 -0.33333 -0.66667 3.111111 -0.44444 3.428571 1 2 3 4 1 1.666667 3.333333 0.444444 2.222222 -1.14286 June 2007 x1 = 0.666667 elimin'n [M1M1M1] [A1A1] x2 = 0.666667 x3 = x4 = 0.666667 -0.33333 back sub [M1] solutions [A1A1A1A1] pivot (shaded) is element of largest magnitude in column Demonstrate check by substituting values back into equations. (ii) Apply to v= To get M-1 = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -0.20833 0.04167 0.04167 0.29167 0.29167 -0.20833 0.04167 0.04167 0.04167 0.29167 -0.20833 0.04167 0.04167 0.04167 0.29167 -0.20833 [M1] [E1] [B1] [subtotal 13] NB: clear evidence required that own routine is used at least one v [M1] other three [M1] columns [A1A1A1A1] [subtotal 6] (iii) The product of the pivots is 96 In each of the first three cases, the pivot is in the second row of the reduced matrix. This is equivalent to three row interchanges. Hence multiply by (-1)3. i.e. determinant is -96 [M1A1] [M1E1] [A1] [subtotal 5] [TOTAL 24] 122 4777 Mark Scheme June 2008 4777 Numerical Computation 1 (i) (ii) Eg: er+1 is approximately ker [E2] Uses y0 = α + e0, y1 = α + ke0, y2 = α + k2e0 or equivalent Convincing algebra to eliminate k hence given result [M1A1] [A1A1] [subtotal 6] Convincing re-arrangment [A1] extrap (new yo) new y1 0.917409 0.916644 0.916648 y0 y1 1 0.908662 y2 x y0 y1 y2 extrap (new yo) 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 1 0.916647 0.856948 0.811835 0.776292 0.747335 0.723087 0.70231 0.684155 0.668023 0.908662 0.845937 0.799744 0.763904 0.734953 0.7108 0.690112 0.671996 0.655831 0.641175 0.917409 0.858962 0.815042 0.780556 0.752555 0.729213 0.70934 0.692131 0.677026 0.663627 0.916644 0.856936 0.811814 0.776263 0.747298 0.723043 0.702258 0.684095 0.667954 0.653402 (iii) x 0.653483 0.668023 0.684155 0.70231 0.723087 0.747335 0.776292 0.811835 0.856948 0.916647 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 y 2 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1 0.916647 0.856948 0.811835 0.776292 0.747335 0.723087 0.70231 0.684155 0.668023 0.653483 new y2 extrap 0.916647 0.916647 4 or 5 sf looks secure new y1 new y2 0.916648 0.916647 0.85695 0.856947 0.81184 0.811833 0.776302 0.776288 0.747351 0.747329 0.72311 0.723076 0.70234 0.702292 0.684194 0.684128 0.668075 0.667985 0.65355 0.653427 3 or 4 sf looks secure once [M1A1] twice [M1A1] [A1] [subtotal 6] extrap 0.916647 0.856948 0.811835 0.776292 0.747335 0.723087 0.70231 0.684155 0.668023 0.653483 set up SS [M2A2] values [A3] [A1] 2 1.8 1.6 1.4 organise 1.2 1 data 0.8 [M1A1] 0.6 graph 0.4 G2 0.2 0 0 0.5 1 1.5 2 Sub Total 12 TOTAL 24 101 4777 2 (i) Mark Scheme June 2008 Tn - I = A2h2 + A4h4 + A6h6 + … T2n - I = A2(h/2)2 + A4(h/2)4 + A6(h/2)6 + … [M1A1] 4(T2n - I) - (Tn - I) = b4h4 + b6h6 + … [M1] 4T2n - Tn - 3 I = b4h4 + b6h6 + … [A1] 4 6 (4T2n - Tn)/3 - I = B4h + B6h + … (Tn* = (4T2n - Tn)/3 [A1] has error of order h4 as given) Tn** = (16T2n* - Tn*)/15 has error of order h6 [B1] [subtotal 6] (ii) x 0 2 1 0.5 1.5 0.25 0.75 1.25 1.75 0.125 0.375 0.625 0.875 1.125 1.375 1.625 1.875 f(x) 0 3.523188 0.731059 0.155615 1.839543 0.035136 0.382038 1.214531 2.609105 0.0083 0.083344 0.254435 0.540367 0.955439 1.509072 2.206199 3.048173 T T* 3.523188 2.492653 2.149141 2.243905 2.160989 2.182155 2.166744 2.161572 2.161606 T** (T***) f: [A1] T: [M1A2] T*: [M1A1] T**: [M1A1] answer: [A1] 2.161779 2.161611 2.161609 2.161608 2.161609 [subtotal 9] (iii) k 0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 I 0 0.002847 0.024686 0.089495 0.225935 0.466242 0.845007 1.398068 2.161609 2.5 modify SS [M2] 2 1.5 values of I [A2] 1 graph [G2] 0.5 0 [subtotal 6] 0 (iv) k 1.57 1.58 1.579 I 0.980739 1.001291 0.999223 0.5 accept 1.57 or 1.58 (or in between) 1 1.5 2 evidence of t&e: result: [M2] [A1] [subtotal 3] [TOTAL 24] 102 4777 3 (i) Mark Scheme June 2008 h x y k1 k2 k3 k4 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 0 0.125024 0.189763 0.221666 0.229182 0.217146 0.188783 0.146433 0.091887 0.026567 -0.04836 -0.13194 -0.22334 -0.32186 -0.42689 -0.53789 0.2 0.085978 0.046408 0.018708 -0.0029 -0.02065 -0.03569 -0.04871 -0.06015 -0.0703 -0.0794 -0.08761 -0.09507 -0.10187 -0.1081 -0.11382 0.110557 0.063177 0.031125 0.007021 -0.01239 -0.02863 -0.04256 -0.05472 -0.06547 -0.07506 -0.08369 -0.0915 -0.0986 -0.1051 -0.11107 -0.11656 0.121189 0.064854 0.032033 0.007628 -0.01194 -0.02828 -0.04228 -0.05449 -0.06527 -0.07488 -0.08353 -0.09136 -0.09849 -0.105 -0.11097 -0.11647 0.086653 0.046393 0.018694 -0.00291 -0.02066 -0.0357 -0.04872 -0.06015 -0.07031 -0.07941 -0.08762 -0.09507 -0.10187 -0.1081 -0.11382 -0.1191 setup [M3] values [A3] 0.3 0.2 0.1 0 -0.1 0 0.5 1 1.5 2 2.5 3 [G2] 3.5 -0.2 -0.3 -0.4 -0.5 -0.6 Maximum about (0.8, 0.23) root about 1.8 [A1A1A1] [subtotal11] (ii) Eg: h = 0.01 gives (p, q) as (0.77, 0.22743) hence (0.77, 0.23) h = 0.01 gives root as between 1.87 and 1.88 accept either (iii) Eg: s 1 1 1 1 1 h 0.01 0.01 0.01 0.01 0.01 x 0 0.01 0.02 0.03 0.04 y 0 0.009112 0.017437 0.025286 0.032757 k1 0.01 0.008618 0.008065 0.007649 0.007303 s = 0.715, h = 0.01 gives root closest to x = 1 k2 0.009 0.008314 0.007844 0.007468 0.007147 [M2] [A1A1] [A1] [subtotal5] k3 0.009025 0.008319 0.007847 0.00747 0.007148 accept 0.71 to 0.72 k4 0.008621 0.008065 0.007649 0.007303 0.007002 Mods [M3] t&e [M3] [A2] [subtotal8] [TOTAL 24] 103 4777 4 (i) Mark Scheme Q = Σ (y - a - bx - cx2)2 Σy= dQ/da = 0 gives other equations: (ii) June 2008 X 0 0.5 1 1.5 2 2.5 3 [M1] na + b Σ x + c Σ x2 as given Σ xy = a Σ x + b Σ x2 + c Σ x3 Σ x2y = a Σ x2 + b Σ x3 + c Σ x4 Y 1.02 2.08 2.73 3.14 2.87 2.22 1.43 [M1A1] [B1] [B1] [subtotal 5] 3.50 3.00 2.50 2.00 [G2] 1.50 1.00 0.50 0.00 0 1 2 3 roughly parabolic (quadratic) in shape (iii) [E1] x y xy x2y x2 x3 x4 0 0.5 1 1.5 2 2.5 3 10.5 1.02 2.08 2.73 3.14 2.87 2.22 1.43 15.49 0 1.04 2.73 4.71 5.74 5.55 4.29 24.06 0 0.52 2.73 7.065 11.48 13.875 12.87 48.54 0 0.25 1 2.25 4 6.25 9 22.75 0 0.125 1 3.375 8 15.625 27 55.125 0 0.0625 1 5.0625 16 39.0625 81 142.1875 7 10.5 10.5 22.75 22.75 55.125 15.49 24.06 22.75 55.125 -6.46154 142.1875 -21 48.54 0.554615 -2.69231 -10.5 1.656923 -1.75 1.425833 [subtotal 3] [M2] [A2] normal equations: x y y fitted residual 0 0.5 1 1.5 2 2.5 3 1.02 2.08 2.73 3.14 2.87 2.22 1.43 1.017619 2.095 2.765 3.027619 2.882857 2.330714 1.37119 0.002381 -0.015 -0.035 0.112381 -0.01286 -0.11071 0.05881 -3.6E-15 res form equations [M1A1] a= 1.017619 b= 2.562143 c= solution [M2A2] -0.81476 2 5.67E-06 0.000225 0.001225 0.012629 0.000165 0.012258 0.003459 0.029967 residual sum is zero (except for rounding errors) as it should be residual sum of squares is 0.029967 104 y fitted [M1A1] residuals [M1A1] [E1] [A1] [subtotal 16] [TOTAL 24] 4777 Mark Scheme June 2009 4777 MEI Numerical Computation 1(i) -1 < g'(α) < 1 [B1] E.g. Multiply both sides of x = g(x) by λ and add (1 − λ)x to both sides. Derivative of rhs set to zero at root: λg'(α) + 1 − λ = 0 algebra to obtain given result In practice use an initial estimate x0 in place of α [M1A1] [M1A1] [A1] [A1] [subtotal 7] x 0 0.5 1 1.5 2 2.5 3 (iii) x 3sinx - 0.5 0 -0.5 0.5 0.938277 1 2.024413 1.5 2.492485 2 2.227892 2.5 1.295416 3 -0.07664 [G3 ] [B1B1] Roots approximately 0.25, 2.1 Eg: r 0 1 2 3 4 5 6 7 8 9 10 xr 0 -0.5 -1.93828 -3.29971 -0.02763 -0.58289 -2.15131 -3.00855 -0.89795 -2.84615 -1.37349 xr 0.2 0.096008 -0.21242 -1.13247 -3.21639 -0.2758 -1.31696 -3.40387 0.277847 0.322857 0.451832 xr 0.4 0.668255 1.358852 2.432871 1.452591 2.479066 1.345334 2.424072 1.472555 2.485535 1.329994 xr 2 2.227892 1.875308 2.36198 1.609012 2.49781 1.300676 2.391217 1.545741 2.499058 1.297679 xr 2.2 1.925489 2.31326 1.710416 2.470807 1.364805 2.436576 1.444139 2.475969 1.352649 2.4289 xr 2.4 1.52639 2.497043 1.302517 2.392685 1.542517 2.498801 1.298298 2.389305 1.549934 2.499347 No convergence in each case [M1A1A1] Let g(x) = 3 sinx − 0.5 Then g'(x) = 3 cosx So λ = 1 / (1 − 3 cosα) Smaller root: λ= [M1A1] -0.52446 (approx -0.5) r 0 1 2 Larger root: xr 0.25 0.253894 0.254078 NB: must be using relaxatio 95 λ= 0.397687 (approx 0.4) r 0 1 2 xr 2.1 2.095851 2.095866 [M1A1A1] 4777 Mark Scheme June 2009 n 3 4 5 0.254087 0.254088 0.254088 3 4 5 2.095866 2.095866 2.095866 [M1A1] [M1A1] [subtotal 17] [TOTAL 24] 2(i) f(x) = 1 2h = 2a + b f(x) = x, x3 give 0 = 0 f(x) = x2 2h3/3 = 2aα2 4 f(x) = x 2h5/5 = 2aα4 Convincing algebra to verify given results L 0 (ii) R 0.785398 function values weights integral L 0 function values weights integral 0.392699 function values R 0.392699 0.785398 weights integral [M1A1] [M1A1] [A1] [A1] [A1A1] [subtotal 8] m 0.392699 1.189207 0.349066 0.415112 h 0.392699 m 0.19635 1.094949 0.174533 0.191105 0.589049 1.29158 h 0.19635 0.19635 0.174533 0.225423 ×1 0.088516 1.043431 0.218166 0.227641 ×2 0.696882 1.35535 0.218166 0.295691 ×1 0.044258 1.021903 0.109083 0.111472 0.436957 1.211226 ×2 0.348441 1.167589 0.109083 0.127364 0.74114 1.383901 0.109083 0.132124 0.109083 0.15096 setup: [M3A3] 0.938444 [A1] 0.429941 repeat: [M2 ] 0.508508 0.938449 [A1] Either repeat with h halved to verify that 0.938449 is correct to 6 dp Or observe that the method is converging so rapidly that 0.938449 will be correct to 6dp (iii) [M1A1] or [E1A1] [subtotal 12] Use routine known to deliver 6dp and vary k: L 0 R 0.392699 function values weights integral 0.392699 function values weights integral 0.785398 k integral m 0.19635 1.136464 0.174533 0.19835 0.589049 1.406898 0.174533 0.24555 h 0.19635 1.465 1.466 0.999908 1.000036 hence k = 1.466 1.467 1.000163 0.19635 ×1 0.044258 1.031946 0.109083 0.112568 0.436957 1.297918 0.109083 0.141581 k = 1.46572 ×2 0.348441 1.237918 0.109083 0.135036 0.445954 0.74114 modify 1.530164 [M1A1] 0.109083 0.166915 0.554046 1.000000 find k [M1A1] [subtotal 4] [TOTAL 24] 96 4777 Mark Scheme Use central difference formulae for 2nd and 1st derivatives to obtain first given result Hence obtain y1 = h2 − y−1 Use central difference to obtain y1 − y−1 = 2h Hence given result for y1 3(i) (ii) h x y 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3 4.4 4.5 4.6 0 0.105 0.216472 0.332426 0.450961 0.570174 0.68815 0.802981 0.912793 1.015786 1.11027 1.194705 1.26774 1.328248 1.375354 1.40846 1.42726 1.431751 1.42223 1.399287 1.363785 1.316838 1.259773 1.194096 1.121445 1.04354 0.962141 0.878993 0.79578 0.714082 0.635337 0.560807 0.491549 0.428404 0.371982 0.322662 0.280597 0.245729 0.217808 0.196416 0.180999 0.170894 0.165365 0.163635 0.164915 0.168435 0.173469 97 June 2009 [M1A1A1] [M1A1] [M1A1] [M1] [subtotal 8] 4777 Mark Scheme 4.7 4.8 4.9 5 June 2009 0.179352 0.185502 0.191424 0.196725 setup [M3] (ii) Obtain formula y1 = ah + 0.5h2 Modify routine Trial on a to obtain a = -1.4 or -1.5 h x y 0.1 a -1.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 numbers [A3] graph [A3] [subtotal 9] [M1A1] [M1A1] [M1A1G1] 0 -0.135 -0.25582 -0.36107 -0.44993 -0.5219 -0.57677 -0.6146 -0.63565 -0.64047 -0.6298 -0.60462 -0.56614 -0.51572 -0.45494 -0.3855 -0.3092 -0.22792 -0.14356 -0.05802 0.026884 0.109408 0.187962 0.26113 0.327696 0.386672 0.437316 0.479135 0.51189 0.535589 0.550471 0.556986 0.555768 0.547604 0.533401 0.514147 0.490876 0.464631 0.43643 0.40724 0.377942 0.349319 0.322033 98 4777 Mark Scheme 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 June 2009 0.296623 0.27349 0.252909 0.235026 0.219875 0.207386 0.197404 0.189706 [subtotal 7] [TOTAL24] 4(i) Diagonal dominance: the magnitude of the diagonal element in any row is greater than or equal to the sum of the magnitudes of the other element. | a | > | b | + 2 will ensure convergence. ( > required as dominance has to be strict) (ii) 4 1 2 1 1 4 1 2 2 1 4 1 1 2 1 4 0 0.25 0.321289 0.340733 0.344469 0.344515 0.344124 0.343886 0.343789 0.343758 0.34375 0.343749 0.34375 0.34375 0 -0.0625 -0.05103 -0.03941 -0.03388 -0.0319 -0.03134 -0.03123 -0.03123 -0.03124 -0.03125 -0.03125 -0.03125 -0.03125 0 -0.10938 -0.14691 -0.15599 -0.15715 -0.15681 -0.15648 -0.15633 -0.15627 -0.15625 -0.15625 -0.15625 -0.15625 -0.15625 0 -0.00391 -0.01808 -0.02648 -0.02989 -0.03098 -0.03124 -0.03127 -0.03127 -0.03126 -0.03125 -0.03125 -0.03125 -0.03125 2 1 4 1 1 2 1 4 4 1 2 1 1 4 1 2 0 0.5 2.03125 6.033203 12.69934 3.347054 -156.613 -1153.81 -5937.67 0 -0.25 -1.95313 -10.5127 -46.9236 -183.278 -632.515 -1881.51 -4365.6 0 -0.875 -3.42969 -9.11279 -13.2195 37.89147 456.5137 2690.835 12560.88 0 0.6875 4.605469 22.56519 94.10735 345.9377 1115.079 2994.509 5419.593 1 0 0 0 a 4 [E1] [E1E1] [subtotal 3] b 2 setup [M3A3] values [A3] 1 0 0 0 a 2 b 4 values [A3] [subtotal 12] (iii) No convergence when a = 2, b = 0 Indicates that non-strict diagonal dominance is not sufficient 99 [M1A1] [E1E1] 4777 Mark Scheme June 2009 [subtotal 4] (iv) Use RHSs 1,0,0,0 0,1,0,0 to obtain inverse as 0.34375 -0.03125 -0.15625 -0.03125 -0.03125 0.34375 -0.03125 -0.15625 0,0,1,0 0,0,0,1 -0.15625 -0.03125 0.34375 -0.03125 -0.03125 -0.15625 -0.03125 0.34375 100 [M1] [A1] [A1] [A1] [A1] [subtotal 5] [TOTAL 24] GCE Mathematics (MEI) Advanced GCE 4777 Numerical Computation Mark Scheme for June 2010 Oxford Cambridge and RSA Examinations 4777 1 (i) (ii) Mark Scheme June 2010 The data are not evenly spaced so (ordinary) differences will not work Lagrange's method is not well suited to increasing the degree of the approximating polynomial because it requires complete recalculation x 0.09 0.93 1.91 4.10 4.91 6.04 [E1] [E1] [E1] [subtotal 3] f 1.076 0.897 0.498 -0.544 -0.740 -0.900 [G2] extrap (iii) x 1.91 4.10 4.91 0.93 0.09 6.04 f 0.498 -0.544 -0.740 0.897 1.076 -0.900 1DD 2DD -0.4758 -0.24198 -0.41131 -0.2131 -0.3321 0.077941 0.053417 -0.04112 -0.02329 f(3) = + + + + 0.498 -0.51862 -0.09345 0.057309 0.003774 -0.021 -0.114 -0.057 -0.053 3DD [subtotal 2] 4DD 5DD re-order: table: 0.025025 0.023576 0.015782 0.000796 -0.00402 -0.00117 linear quadratic cubic quartic [M1A1] [M1A1] [M1A1] [M1A1] f(3) approximately zero, but difficult to say whether -0.05 or -0.06, -0.1 or 0.0. (iv) x 1.91 4.10 4.91 0.93 0.09 6.04 [E1E1] [subtotal 14] f 0.498 -0.544 -0.740 0.897 1.076 -0.900 1DD 2DD 3DD 4DD 5DD -0.4758 -0.24198 -0.41131 -0.2131 -0.3321 0.077941 0.053417 -0.04112 -0.02329 0.025025 0.023576 0.015782 0.000796 -0.00402 -0.00117 user-specified x: 2.89 0.498 -0.46628 -0.09242 0.056679 0.003738 0.032 -0.061 -0.004 0.000 1 [M1A1] [M1A1] adjust SS to allow user-specified x: trial and error: answer: [M1A1] [M1A1] [A1] [subtotal 5] [TOTAL 24] 4777 2 (i) Mark Scheme June 2010 Tn - I = A2h2 + A4h4 + A6h6 + … T2n - I = A2(h/2)2 + A4(h/2)4 + A6(h/2)6 + … 4 [M1A1] 6 4(T2n - I) - (Tn - I) = b4h + b6h + … 4 [M1] 6 4T2n - Tn - 3 I = b4h + b6h + … 4 [A1] 6 (4T2n - Tn)/3 - I = B4h + B6h + … (Tn* = (4T2n - Tn)/3 [A1] 4 has error of order h as given) Tn** = (16T2n* - Tn*)/15 has error of order h6 (ii) (iii) 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 0 0.391654 0.610565 0.691894 0.646735 0.469048 0.13201 -0.43199 -1.41388 -3.79558 x 0 3.141593 1.570796 0.785398 2.356194 0.392699 1.178097 1.963495 2.748894 0.19635 0.589049 0.981748 1.374447 1.767146 2.159845 2.552544 2.945243 f(x) 0 2.22E-16 0.693147 0.5348 0.5348 0.324026 0.654344 0.654344 0.324026 0.178222 0.441842 0.605119 0.683493 0.683493 0.605119 0.441842 0.178222 [B1] [subtotal 6] [G2] [subtotal 2] T T* 3.49E-16 1.088793 1.451724 1.384458 1.483014 1.460639 1.479855 1.486033 1.48626 T** T*** (T****) f: [A1] T: [M1A2] T*: T**: T*** [M1A1] [M1A1] [M1A1] answer: [A1] 1.485099 1.486234 1.486275 1.486252 1.486276 1.486276 [subtotal 11] (iv) Spreadsheet as above, but seen to work for user-specified c in place of 3.141593 Sequence of values representing trial and error towards solution: c 4 4.5 4.4 4.45 4.44 I 0.977343 -0.20713 0.133659 -0.02687 0.006681 Answer 4.442 to 3 decimal places 4.442 0.00003 [M2] [M1A1] [A1] [subtotal 5] [TOTAL 24] 2 4777 3 (i) Mark Scheme Modified Euler method h x y 0.1 1 1 1.1 1.145803 1.2 1.300904 1.3 1.466056 1.4 1.641997 1.5 1.829446 1.6 2.029112 1.7 2.24169 1.8 2.467869 1.9 2.708328 2 2.963739 h 0.1 0.05 0.025 0.0125 0.00625 α 2.963739 2.964219 2.964341 2.964372 2.964380 diffs 0.000480 0.000122 0.000031 0.000008 k1 0.141421 0.150346 0.160034 0.170466 0.181626 0.193499 0.206072 0.219337 0.233284 0.247908 k2 0.150185 0.159856 0.170271 0.181415 0.193273 0.205833 0.219085 0.23302 0.247633 0.262916 June 2010 new y 1.145803 1.300904 1.466056 1.641997 1.829446 2.029112 2.24169 2.467869 2.708328 2.963739 setup: [M2] first run: [A2] ratio of diffs further runs: 0.254789 0.252418 0.251215 differences: ratios: Correct to 4 dp, α = 2.9644 Ratio of differences indicates 2nd order convergence (ii) Predictor corrector method h x y 0.1 1 1 1.1 1.145885 1.2 1.30108 1.3 1.466338 1.4 1.642397 1.5 1.829978 1.6 2.029786 1.7 2.24252 1.8 2.468866 1.9 2.709504 2 2.965107 h 0.1 0.05 0.025 0.0125 0.00625 (iii) α 2.965107 2.964564 2.964428 2.964394 2.964385 diffs -0.000543 -0.000136 -0.000034 -0.000008 y pred 1.141421 1.296234 1.46112 1.636815 1.824039 2.023497 2.235885 2.461889 2.702189 2.957457 y corr1 1.145803 1.300989 1.466239 1.64229 1.829862 2.029664 2.242392 2.468732 2.709364 2.964961 [A1A1A1] [M1] [M1A1] [A1] [E1] [subtotal 12] y corr2 1.145884 1.301078 1.466336 1.642395 1.829975 2.029784 2.242518 2.468864 2.709501 2.965104 y corr3 1.145885 1.30108 1.466338 1.642397 1.829978 2.029786 2.24252 2.468866 2.709504 2.965107 setup: [M2] first run: [A2] ratio of diffs further runs: 0.250154 0.250039 0.25001 these --> may appear in (iii) The rate of convergence (see ratio of differences) is the same for both methods. Magnitude of errors about the same for a given h More programming required for predictor-corrector Modified Euler (at least in this case) is preferable 3 differences and ratios: [A1A1A1] [M1] [subtotal 8] [E1] [E1] [E1] [E1] [subtotal 4] [TOTAL 24] 4777 4 (i) Mark Scheme 7.1 6 5 4 6 5.1 4 3 0.029577 -0.22535 -0.38028 product of pivots: (ii) α= 7.01 6 5 4 -0.18390 0.01 6 5.01 4 3 -0.12552 -0.2796 -0.42368 product of pivots: α= 0.01 x1 x2 x3 x4 5 4 3.1 2 -0.22535 -0.42113 -0.8169 -0.28889 0.062963 (A) β = 0 0.302 0.100 -0.101 -0.303 4 3 2 1.1 -0.38028 -0.8169 -1.15352 -0.47 -0.13333 -0.23577 -0.00198 x1 = 0.320827 x2 = x3 = 0.103317 -0.11419 x4 = -0.3317 magnitude of determinant: β= 5 4 3.01 2 -0.2796 -0.55633 -0.85307 -0.02687 0.006633 1 1 1 1 0.15493 0.295775 0.43662 0.188889 0.037037 0.078205 June 2010 4 3 2 1.01 -0.42368 -0.85307 -1.27245 -0.0467 -0.01333 -0.02486 0.18390 Gauss elim: [M2A2] pivoting: [M1A2] back subn: [M1A2] solutions: [A2] [M1A1] [subtotal 14] 0.01 1.01 1 1 1 0.135521 0.279601 0.42368 0.01 0 0.002469 magnitude of determinant: x1 = 0.599796 x2 = x3 = -0.2999 -0.1996 x4 = -0.09929 0.001984 (B)β = 0.1 0.600 -0.300 -0.200 -0.099 [M1A1] solutions: [M1A1] [M1A1] Very large changes in the solution for small change in one coefficient. The determinant is very small in relation to the magnitude of the coefficients. 4 [E1E1] [E1E1] [subtotal 10] [TOTAL 24] 4777 Mark Scheme June 2011 1(i) -2 -1 0 1 2 -2 -1 0 1 2 0.018316 0.367879 1 0.367879 0.018316 r xr 0 0.7 1 0.612626 2 0.687075 3 0.623708 4 0.677726 5 0.631718 6 0.670946 7 0.637521 8 0.666022 - slow convergence [G2] [M1A1] Derivative of exp(-x2) is -2x exp(-x2). Value at 0.6 (0.7) about -0.83 (-0.86). Less than 1 in magnitude so converges, but not close to zero so slow. (ii) Multiply both sides by λ, then add (1 - λ) x to both sides. x0 x1 λ 0.4 0.7 0.6651 0.5 0.7 0.6563 0.6 0.7 0.6476 λ = 0.5 (to 1 dp) seems fastest (iii) x2 0.6561 0.6532 0.6535 x3 0.6537 0.6529 0.6529 [M1A1] x4 0.6531 0.6529 0.6529 x5 0.6530 0.6529 0.6529 Differentiate RHS, set to zero at x = α and solve for λ Best λ evaluates to about (iv) [M1A1A1] [E1E1] [subtotal 9] [M1A1A1] [A1] [subtotal 6] [M1A1] 0.53978 [B1] [subtotal 3] r 0 1 2 3 4 xr 0.7 0.652966 0.652919 0.652919 0.652919 λr 0.538307 0.539778 0.53978 0.53978 0.53978 -0.04703 -4.8E-05 -1.2E-10 0 Δx r x6 0.6529 0.6529 0.6529 Δx r+1 /Δx r 0.001011 2.47E-06 0 Ratio of differences tending (rapidly) to zero so (much) faster than first order 1 [M1A1A1] [M1A1] [E1] [subtotal 6] [TOTAL 24] 4777 2(i) (ii) Mark Scheme June 2011 set up RHS as f(x) = 1: f(x) = x: f(x) = x2 a(f(-) + f()) 2h = 2a 0=0 2h3/3 = 2a2 f(x) = x3 f(x) = x4 0=0 2h5/5 = 2a4 = 2h5/9 error is 8h5/45 so no error so local error of order h5, global error h4 m-h/sqrt3 0.211325 0.105662 0.605662 0.052831 0.302831 0.552831 0.802831 0.026416 0.151416 0.276416 0.401416 0.526416 0.651416 0.776416 0.901416 f(m-h/sqrt3) 1.486525 1.451022 1.602906 1.432762 1.515989 1.589056 1.649038 1.423521 1.466573 1.507617 1.546196 1.581909 1.614408 1.643389 1.668594 h 0.5 0.25 0.25 0.125 0.125 0.125 0.125 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 m 0.5 0.25 0.75 0.125 0.375 0.625 0.875 0.0625 0.1875 0.3125 0.4375 0.5625 0.6875 0.8125 0.9375 (by symmetry) hence a = h (award same marks for solution without symmetry assumed) hence = h/sqrt(3) m+h/sqrt3 0.788675 0.394338 0.894338 0.197169 0.447169 0.697169 0.947169 0.098584 0.223584 0.348584 0.473584 0.598584 0.723584 0.848584 0.973584 f(m+h/sqrt3) 1.646032 1.544084 1.667272 1.481855 1.55962 1.625438 1.676832 1.448594 1.490546 1.530218 1.567188 1.601085 1.631587 1.658417 1.681341 [A1] [A1E1E1] [subtotal 10] integral 1.566278 diffs ratios [M1A1] 1.566321 4.29E-05 [M1A1] 1.566324 2.73E-06 0.06371 [A1] 1.566324 1.71E-07 0.06275 [A1] Ratio of differences very close to the theoretical 0.0625 for fourth order (iii) [M1A1] [M1A1] [A1] [A1] [M1A1E1] [subtotal 9] e.g.: k 1.22 k I h 0.5 0.25 0.25 0.125 0.125 0.125 0.125 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 0.0625 m 0.5 0.25 0.75 0.125 0.375 0.625 0.875 0.0625 0.1875 0.3125 0.4375 0.5625 0.6875 0.8125 0.9375 m-h/sqrt3 0.211325 0.105662 0.605662 0.052831 0.302831 0.552831 0.802831 0.026416 0.151416 0.276416 0.401416 0.526416 0.651416 0.776416 0.901416 m+h/sqrt3 0.788675 0.394338 0.894338 0.197169 0.447169 0.697169 0.947169 0.098584 0.223584 0.348584 0.473584 0.598584 0.723584 0.848584 0.973584 f(m-h/sqrt3) 2.630873 2.480189 3.162099 2.404721 2.759934 3.095848 3.388775 2.367053 2.545548 2.72289 2.896046 3.061986 3.21775 3.360519 3.487672 1.2 2.948 1.3 3.229 1.21 2.975 1.23 3.030 1.22 3.002 2 f(m+h/sqrt3) 3.373721 2.886405 3.480932 2.610753 2.95778 3.271659 3.529836 2.470074 2.648271 2.823568 2.992924 3.153343 3.301937 3.435994 3.553039 integral 3.002297 3.002406 3.002413 3.002413 [M3A2] [subtotal 5] [TOTAL 24] 4777 3(i) Method A h 0.2 0.1 0.05 0.025 Method B h 0.2 0.1 0.05 0.025 Mark Scheme h 0.2 y(2) 3.669763 3.671640 3.672112 3.672231 h 0.2 y(2) 3.664805 3.670336 3.671778 3.672146 x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 y 0 0.219089 0.475075 0.76573 1.089429 1.444924 1.831216 2.247484 2.693043 3.167305 3.669763 diffs ratio of diffs 0.001877 0.000473 0.000119 0.251926 0.250918 x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 y 0 0.218322 0.473669 0.763764 1.086957 1.441983 1.827835 2.243686 2.688844 3.162721 3.664805 diffs ratio of diffs 0.005531 0.001442 0.000368 0.260722 0.255408 k1 0.2 0.238251 0.273867 0.307619 0.339966 0.37121 0.401558 0.431161 0.460132 0.488561 k2 0.219089 0.255986 0.290655 0.3237 0.355495 0.386292 0.416269 0.445559 0.474262 0.502457 June 2011 new y 0.219089 0.475075 0.76573 1.089429 1.444924 1.831216 2.247484 2.693043 3.167305 3.669763 ≈ 0.25 so 2nd order k1 0.2 0.238187 0.273764 0.307491 0.339821 0.371052 0.401389 0.430984 0.45995 0.488374 k2 0.236643 0.272507 0.306427 0.338896 0.370231 0.400651 0.430313 0.459333 0.487803 0.515794 new y 0.218322 0.473669 0.763764 1.086957 1.441983 1.827835 2.243686 2.688844 3.162721 3.664805 ≈ 0.25 so 2nd order Differences (and hence errors) in Method B about 3 times those in method A setup: [M2] first run: [A2] further runs: [A1A1A1] diffs + ratios: [M1A1] [subtotal 9] setup: [M2] first run: [A2] further runs: [A1A1A1] diffs + ratios: [M1A1] [M1E1] [subtotal 11] (ii) h 0.3 y k1 0.3 0.384428 0.461322 0.533436 0.602187 0.668416 0.732668 0.795322 0.856652 0.916864 Trial and error: y = 2x at x = 2.45 (accept 2.44 or 2.46) k2 0.342053 0.422592 0.497069 0.567502 0.635002 0.700256 0.763723 0.825728 0.886511 0.946255 [G2] [M1A1] [subtotal 4] [TOTAL 24] 3 4777 4(i) Mark Scheme -3 -2 -1 0 1 2 3 June 2011 -35.25 -8.01 2.51 -0.09 -4.07 -5.06 0.65 [G2] Two tps: could be cubic [E1] Almost passes through origin [E1] [subtotal 4] (ii) (iii) 2 3 2 Q = Σ (y - ax - bx - cx ) ∂Q/∂a = 0 gives Σ xy = other equations: Σ x2y = Σ x3y = Σ x3 = 0 x -3 -2 -1 0 1 2 3 Σ x5 = 0 y -35.25 -8.01 2.51 -0.09 -4.07 -5.06 0.65 Normal equations: x2 9 4 1 0 1 4 9 28 107.02 = -365.24 = 986.32 = a Σ x2 + b Σ x3 + c Σ x4 a Σ x3 + b Σ x4 + c Σ x5 a Σ x4 + b Σ x5 + c Σ x6 x4 81 16 1 0 1 16 81 196 x6 729 64 1 0 1 64 729 1588 xy 105.75 16.02 -2.51 0 -4.07 -10.12 1.95 107.02 28 a + 196 c 196 a 196 b + 1588 c hence: a= -3.86425 b= -1.86347 x -3 -2 -1 0 1 2 3 y -35.25 -8.01 2.51 -0.09 -4.07 -5.06 0.65 y-fitted -34.826 -8.50983 0.902721 0 -4.62966 -6.39793 1.283537 res 0.424014 -0.49983 -1.60728 0.09 -0.55966 -1.33793 0.633537 -2.85714 res2 0.179788 0.24983 2.583345 0.0081 0.313219 1.790044 0.40137 5.525696 [M1] [M1A1] [B1] [B1] [subtotal 5] as given c= x2 y -317.25 -32.04 2.51 0 -4.07 -20.24 5.85 -365.24 x3 y 951.75 64.08 -2.51 0 -4.07 -40.48 17.55 986.32 1.098056 totals [M1A3] set up & solve [M1A3] [M1A1A1A1] [subtotal 12] (iv) [G2] Comment on goodness of fit [E1] [subtotal 3] [TOTAL 24] 4 4777 Question 1 (i) 1 (ii) Mark Scheme Answer 2 Error in x2 is approximately k ε x0 = a + ε, x1 = a + kε, x2 ≈ a + k2ε Δx0 = (k 1) ε Δx1 = k(k 1) ε hence ∆2x0 = (k 1)2ε Convincing algebra to given result b 1 r xr 1 0 1 0.540302 2 0.857553 3 0.65429 4 0.79348 ----- -------30 0.739087 31 0.739084 32 0.739086 converging 33 0.739085 slowly b 2 r 0 1 2 3 4 ----30 31 32 33 xr 1 0.41615 0.673181 0.222554 0.902564 -------0.803826 0.03685 0.997286 0.4112 diverging 7 June 2012 Marks E1 M1A1 A1 A1 A1 [6] Guidance Condone ‘=’ here M1A1 setup A1A1 results 4777 Question 1 (ii) cont 1 (iii) Mark Scheme Answer b= 1 b= 2 2 ∆xr ∆xr ∆ xr est α ∆2xr est α r xr r xr 0 1 0 1 1 0.540302 0.4597 1 0.41615 1.41615 2 0.857553 0.317251 0.776949 0.72801 2 0.673181 1.089328 2.505475 0.199564 0 0.72801 0 0.199564 1 0.7465 0.018489 1 0.9214 0.721836 2 0.73407 0.01243 0.03092 0.739067 2 0.26866 1.19006 1.9119 0.472093 0 0.739067 0 0.472093 1 0.739097 3.04E-05 1 0.586403 0.11431 2 0.739077 2E-05 5.1E-05 0.739085 2 0.387567 0.19884 0.31315 0.51382 0 0.739085 0 0.51382 1 0.739085 8.21E-11 1 0.51684 0.00302 2 0.739085 5.5E-11 1.4E-10 0.739085 2 0.51166 0.00518 0.0082 0.514932 makes divergent iteration convergent eg b 0 0.3 0.6 0.9 1.2 1.5 1.8 2.1 2.4 2.7 3 α 1 0.958907 0.867554 0.769576 0.682741 0.609904 0.549477 0.499139 0.456823 0.420881 0.39004 1.2 June 2012 Marks Guidance E1 M2A1 A1A1 [10] Set up Results A1A1 G2 values graph M2 A2 trial result 1 0.8 0.6 0.4 0.2 0 0 0.5 1 1.5 2 2.5 3 3.5 b α 2.1 0.499139 2.0 0.514933 2.095 0.499907 2.094 0.500061 2.0944 0.499999 2.0943 0.500015 best is b = 2.0944 [8] 8 4777 Question 2 (i) Mark Scheme June 2012 Answer Marks M1A1 f(x) = 1 2h = 2a + b (f(x) = x, x3 give 0 = 0, not reqd.) f(x) = x2 2h3/3 = 2aa2 4 f(x) = x 2h5/5 = 2aa4 Convincing algebra to verify given results Guidance M1A1 M1A1 A1A1 [8] 2 (ii) L 0 function values weights integral R 1.570796 L 0 function values weights integral L 0.785398 function values weights integral R 0.785398 h = π/16 gives 2.160149 h = π/32 gives 2.160149 R 1.570796 m 0.785398 1.456475 0.698132 1.016812 h 0.785398 m 0.392699 1.493467 0.349066 0.521318 m 1.178097 1.29971 0.349066 0.453684 h 0.392699 h 0.392699 x1 0.177031 1.464531 0.436332 0.639022 x2 1.393765 1.156109 0.436332 0.504448 x1 0.088516 1.442418 0.218166 0.314687 x1 0.873914 1.431959 0.218166 0.312405 x2 0.696882 1.474966 0.218166 0.321788 x2 1.482281 1.082998 0.218166 0.236274 hence, given rate of convergence, correct to 6 sf 9 2.160281 M1A1 A1 A1 A1A1 1.157793 M1A1 1.002363 2.160156 A1 A1 A1A1 [12] subdividing 4777 Question 2 (iii) Mark Scheme June 2012 Answer Marks Guidance eg k 0.381 L 0 function values weights integral L 0.785398 function values weights integral k integral 0.380 1.999235 R 0.785398 R 1.570796 m 0.392699 1.357491 0.349066 0.473854 m 1.178097 1.221099 0.349066 0.426244 h 0.392699 h 0.392699 x1 0.088516 1.321988 0.218166 x2 0.696882 1.344658 0.218166 0.288413 x1 0.873914 1.314677 0.218166 0.286818 0.293359 x2 1.482281 1.062641 0.218166 0.231832 1.055626 0.944894 2.00052 0.381 (NB: these changes in the integral are greater than those 2.00052 arising from halving h again.) 10 M2 M1A1 [4] Modification to include k 4777 Question 3 (i) 3 (ii) Mark Scheme June 2012 Answer Use central difference formulae for 2nd and 1st derivatives to obtain first given result Hence obtain y1 (1 h) = h2 + 2 (1 + h) y–1 State or show that y1 y–1 = 2h or equivalent Eliminate y–1; convincing algebra to given result for y1 h 0.1 x 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3 y 1 0.895 0.782647 0.666837 0.552585 0.445715 0.352423 0.27885 0.230785 0.213615 0.232584 0.293408 0.403342 0.572952 0.819293 1.172342 1.689964 2.499465 3.945671 7.406389 30.95641 Marks M1A1A1 M1A1 B1 M1A1 [8] Guidance 35 M3 setup A3 values 30 25 20 15 G2 10 5 0 1 1.5 2 2.5 3 [8] 11 4777 Mark Scheme Question 3 (iii) Answer h 0.1 0.05 0.025 0.0125 0.00625 0.003125 June 2012 Marks y(2) diffs ratios y(3) diffs ratios 0.232584 30.95641 0.234604 0.00202 37.62817 6.671755 0.235106 0.000502 0.248632 39.83126 2.203093 0.330212 0.235232 0.000125 0.249662 40.42700 0.595738 0.27041 40.57898 0.151988 0.255125 0.235 to 3 sf 40.61718 0.038192 0.251283 40.6 to 3 sf ratios about 0.25 (in each case), so second order method M1A1A1 y(2) M1A1A1 y(3) M1E1 [8] 12 Guidance 4777 Question 4 (i) 4 (ii) Mark Scheme June 2012 Answer A sufficient, but not necessary, condition for G-J and G-S to converge is strict diagonal dominance: the diagonal elements in each row are, in magnitude, greater than or equal to the sum of the magnitudes of the other elements, and at least one inequality is strict. k=1 x1 x2 x3 0 0 0 1 0 0 1 0.33333 0.66667 2.666667 0.33333 0.66667 2.666667 1.18519 1.92593 6.037037 1.18519 1.92593 6.037037 2.96708 4.50206 12.97119 2.96708 4.50206 12.97119 6.64289 9.80704 differences increasing so diverging x4 0 0 0 0.444444 0.444444 1.432099 1.432099 3.478738 3.478738 k=3 x1 x2 x3 0 0 0 0.333333 0 0 0.333333 0.11111 0.22222 0.518519 0.11111 0.22222 0.518519 0.2716 0.39506 0.687243 0.2716 0.39506 0.687243 0.43759 0.56241 0.854138 0.43759 0.56241 0.854138 0.60418 0.72916 differences just increasing so diverging Marks E1 Guidance E1 E1 [3] x4 0 0 0 0.148148 0.148148 0.312757 0.312757 0.479195 0.479195 M3 Setup A1E1 k=1 A1E1 k=3 k=5 x1 x2 0 0 0.2 0 0.2 0.06667 0.266667 0.06667 0.266667 0.14815 0.312593 0.14815 0.312593 0.21613 0.348971 0.21613 converges eventually: 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 x3 0 0 0.13333 0.13333 0.20741 0.20741 0.26436 0.26436 x4 0 0 0 0.088889 0.088889 0.167901 0.167901 0.232209 0.5 0.5 0.5 0.5 0.499999 0.499999 0.5 0.5 k=1 no diagonal dominance and no convergence k=3 no strict diagonal dominance and no convergence k=5 strict diagonal dominance and convergence E1 E1 E1 A1 A1 [12] 13 k=5 4777 Question 4 (iii) Mark Scheme Answer June 2012 Marks B1 T First column of inverse matrix is (0.5, -0.5, -0.5, 0.5) Modify routine to solve for the other three unit vectors Obtain solutions Write inverse matrix: 0.5 0.5 0.5 0.5 0.5 1.166667 0.666667 1 0.5 0.666667 0.916667 0.75 0.5 1 0.75 1.25 M1,1,1 A1,1,1 M1A1 [9] 14 Guidance 4777 Mark Scheme Question 1 (i) Answer June 2013 Marks x1 k ( x0 ) x2 k ( x1 ) x2 x1 x1 x0 kx x1 Solve first equation for 0 k 1 Subtract and rearrange to k Guidance M1 Setup M1 Convincing algebra M1 To given result [3] 1 (ii) Eg m = 1.5 3 2.5 2 1.5 1 0.5 0 0 0.2 0.4 0.6 0.8 1 And/or Gradient of line > 1 Gradient of curve = 1 at x = 0 Exponential grows faster than linear So root B3 [3] 5 For convincing argument 4777 1 Question (iii) Mark Scheme Answer June 2013 Marks (*) 0.5 0.559616 0.609452 0.649289 0.680028 0.703118 0.720119 0.732454 Differences getting smaller so converging, but slowly (**) 0.5 0.432481 0.360717 0.289572 0.223904 0.1673 0.121406 0.086056 Converging to root at zero M1 A1 E1 M1 A1 E1 [6] 6 Guidance 4777 Question 1 (iv) Mark Scheme Answer Marks (v) Guidance (*) 0.5 k α 0.559616 0.059616 0.609452 0.049837 0.835962 0.863426 0.863426 0.830793 -0.03263 0.809236 -0.02156 0.660625 0.767271 0.767271 0.765889 -0.00138 0.764925 -0.00096 0.697717 0.7627 0.7627 0.762697 -3.6E-06 0.762694 -2.5E-06 0.699611 0.762689 (*) converges more quickly (**) 0.7 k α 0.675835 -0.02416 0.643783 -0.03205 1.326411 0.774032 0.774032 0.778995 0.004963 0.786187 0.007192 1.449254 0.762986 0.762986 0.763113 0.000128 0.763296 0.000182 1.429871 0.762689 0.762689 0.762689 9E-08 0.762689 1.29E-07 1.429356 0.762689 (**) converges provided a good enough starting point is used 1 June 2013 M2 A2 E1 M1 A1 E1,E1 [9] M1 A1 A1 [3] Value is 1.482 to 3dp 7 T&e Answer 4777 2 Question (i) Mark Scheme June 2013 Answer The data are not evenly spaced so (ordinary) differences will not work Divided differences, however, can accommodate variable spacing Lagrange's method is not well suited to increasing the degree of the approximating polynomial because it requires complete recalculation Marks E1 E1 E1 Guidance [3] 2 (ii) 45.00 35.00 25.00 G2 15.00 5.00 -5.00 0.0 2.0 4.0 6.0 8.0 10.0 [2] 2 (iii) x 2.0 4.0 1.0 0.5 6.0 8.0 y(2.9) = 1DD y 1.04 1.22 0.09000 1.43 -0.07000 2.23 -1.60000 6.96 0.86000 40.53 16.78500 1.040 2DD 3DD 0.16000 0.43714 0.49200 2.12333 + 0.081 + -0.1584 + 0.347537 + -0.23948 4DD -0.18476 0.02743 0.05305 0.23305 0.05140 = = = = 1.121 0.963 1.310 1.071 5DD Re-order values M1 A1 DD table -0.00027 linear quadratic cubic quartic No convergence of estimates, but 4DDs are nearly equal, so quartic a good fit Answer 1.07 (only 2dp in data) 8 M1 M1A1 M1A1 M1A1 M1A1 E1 E1 A1 [14] 4777 Mark Scheme Question 2 (iv) Answer 1DD x y 4.0 1.22 6.0 6.96 2.87000 2.0 1.04 1.48000 1.0 1.43 -0.39000 0.5 2.23 -1.60000 8.0 40.53 5.10667 x= 4.79 gives 1.220 + + + + 2DD 0.69500 0.37400 0.80667 0.95810 2.2673 -0.66435 -0.28536 -0.53619 June 2013 Marks 3DD 4DD 5DD M1 A1 0.10700 -0.07867 0.02524 = = = = 0.05305 0.05195 3.487 2.823 2.538 2.001 Guidance rearrange -0.00027 linear quadratic cubic quartic M1 A1 A1 [5] 9 T&e answer 4777 Mark Scheme Question 3 (i) June 2013 Answer h 0.5 0.5 0.5 0.5 0.5 x 0 0.5 1 1.5 2 Cf y 1 0.25 x 4 h 0.5 0.5 0.5 0.5 0.5 Cf y 1 0.2 x 5 y 1 1.015625 1.25 2.265625 5 y (2) 5 k1 0 0.0625 0.5 1.6875 k2 0.007813 0.210938 0.976563 2.679688 k3 0.007813 0.210938 0.976563 2.679688 k4 0.0625 0.5 1.6875 4 new y 1.015625 1.25 2.265625 5 solution to y x 3 is exact k1 x y 0 0 1 0.5 1.00651 0.03125 0.5 1 1.200521 1.5 2.519531 2.53125 2 7.401042 y (2) 7.4 Marks k2 0.001953 0.158203 1.220703 4.689453 Guidance M2 setup A2 M1 A1 Result Exact E1 k3 k4 new y 0.001953 0.03125 1.00651 0.158203 0.5 1.200521 1.220703 2.53125 2.519531 4.689453 8 7.401042 error in solution to y x 4 M1 Rerun A1 Result B1 Exact E1 [11] 10 4777 Question 3 (ii) Mark Scheme June 2013 Answer h 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 k1 0.168294 0.09783 0.020509 -0.03163 -0.04498 -0.02279 0.029779 0.11 0.204615 0.268871 y 1 1.134994 1.193243 1.18463 1.143096 1.10653 1.107613 1.175408 1.332919 1.575176 1.848193 k2 0.136333 0.056918 -0.01171 -0.044 -0.03754 0.001266 0.069232 0.1621 0.251627 0.278311 Marks k3 0.135593 0.058692 -0.00856 -0.04242 -0.03854 -0.00191 0.063581 0.151587 0.23499 0.272474 k4 0.097818 0.020444 -0.03164 -0.04474 -0.02226 0.030575 0.111362 0.207694 0.275691 0.267657 new y 1.134994 1.193243 1.18463 1.143096 1.10653 1.107613 1.175408 1.332919 1.575176 1.848193 Guidance M3 Setup A3 result G2 graph B1 M1 A1 First Further B1 B1 [13] answer 2 1.5 1 0.5 0 0 0.5 1 1.5 2 Local maximum, eg h 0.1 0.01 0.001 0.0001 x y 0.5 1.19552 0.46 1.196441 0.464 1.196451 0.4638 1.196451 (0.464, 1.196) 11 4777 Mark Scheme Question 4 (i) June 2013 Answer pivots in boxes: 4 2 2 4 3 4 6 1 2.5 4.5 -2 5 3 2 9 0.5 -0.5 4 0.777778 3.777778 1 4 5 5 3.5 4.5 4 1 6 -0.23529 Marks solutions 1 6.5625 = x1 2 3 4 1.5 2.5 -3 = x2 3 0.111111 4.111111 -3.875 = x3 -0.73529 3.125 = x4 magnitude of determinant (product of moduli of pivots): check: 1 2 3 4 M3 Setup A2 1st elimination A2 2nd elimination A1 3rd elimination M2 Back substitution A2,A2 M1 A1 [16] 16 12 Guidance Solution and check determinant 4777 Mark Scheme Question 4 (ii) June 2013 Answer 4.01 2 2 4 3 4 6 1 2.503741 4.503741 -1.99252 5 3 2 9 0.506234 -0.49377 4.012469 0.780731 3.79402 1 4 5 5 3.501247 4.501247 4.002494 0.998893 5.993909 -0.23453 1 2 3 4 1.501247 2.501247 3.002494 0.110742 4.109081 -0.73482 magnitude of determinant (product of moduli of pivots): 4 2.01 2 4 3 4 6 1 2.4925 4.5 -2 5 3 2 9 0.4875 -0.5 4 0.764444 3.777778 1 4 5 5 3.4975 4.5 4 1.005 6 -0.20912 Marks check: solutions % change 6.533914 -0.43559 1 2 3 4 -3 2.44E-13 -3.86683 3.133167 -0.21077 0.261357 16.07 M1 A1 Re-run M1 A1 % change M1 Re-run A1 % change 0.4375 solutions % change 1 7.383966 12.51758 2 3 4 1.4975 2.5 -3.3692 12.30661 3 0.112778 4.111111 -4.37342 12.86239 -0.71912 3.438819 10.04219 magnitude of determinant (product of moduli of pivots): 14.22 Guidance check: 1 2 3 4 -11.125 A small change in a produces small changes in the solutions and the determinant A small change in b produces large changes in the solutions and the determinant 13 E1 E1 [8]