Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 4 40C b i Solution Created 2026-09-24 Updated 2026-09-25
Sample the diffusion coefficient at edge midpoints and writeCentered differences of the two fluxes give the conservative finite-difference stencilFor example, the part isTaylor expansion about shows that the odd powers cancel between the two face fluxes and that the result equals . The same calculation in gives total truncation error
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 341 3 a Solution 2026-09-28
Let . A one-dimensional Taylor expansion givesAdding the three coordinate directions shows that the exact solution has stencil defectThis is the local defect of the seven-point Dirichlet Laplacian. Its inverse has max-norm size : this follows from the discrete maximum principle, for example by comparison with the grid restriction of , whose stencil is . Therefore the grid error is .
The question writes this error as , soIn the more usual terminology, the finite difference method is second-order accurate.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 1 41C a Solution Created 2026-09-24 Updated 2026-10-03
At an interior grid point, the five-point finite difference method givesLetwhere the zero Dirichlet boundary values are already incorporated. Stack the unknowns with the index varying fastest. Using the Kronecker product, defineThen the semidiscrete equation isMoreover,Thus the directional matrices commute, as in the five-point Dirichlet Laplacian as a Kronecker sum.
Let , and define analogously. The Crank-Nicolson diffusion scheme isUse and zero values on every boundary node for every time level. This is the theta method with applied to the spatial finite difference method for the heat equation.
For nonnegative initial data, . The proved Crank-Nicolson maximum principle under a step restriction immediately gives for all indices. For nonpositive initial data, and the same bound gives . Equivalently, apply positivity to , since the finite difference method is linear and has homogeneous Dirichlet boundary conditions. Both conclusions use .
The four-point midpoint third derivative uses the four values at , centred at . The Taylor theorem about that midpoint givesThus, for , take the interior equationsImpose the two value conditions exactly, , , and approximate the remaining condition with the second-order backward finite difference:This gives equations for . The endpoint derivative formula equals , so its residual tends to zero along with those of the four-point equations. Every stencil lies within ; no unprescribed ghost value is introduced. The construction is therefore a consistent finite difference method for all three boundary conditions.
Original solutions to past examinations of the numerical solutions of partial differential equations course of the University of Oxford, using finite difference methods, energy estimates and Fourier stability analysis.
Let and , and define the scaled forward difference operator, backward difference operator and second-order central difference byThe two finite difference methods are the nonlinear systemswith the prescribed Dirichlet boundary conditions and . These equations determine the interior nodal values.
For clarity distinguish the interior and edge inner products and their norms:The bracketed norm includes the last edge . Let , so , and put for . Direct telescoping gives discrete summation by parts:Subtract the two nonlinear systems, multiply each equation by and sum. The resulting discrete energy identity isThe nonlinear summands are nonnegative by the factorization in (a). Using Young's inequality for products at every node givesThis also proves uniqueness of each discrete solution. Existence can be seen by minimizing, with the endpoints fixed, the strictly convex energy functionalIt is a coercive function of its finitely many interior values, so it attains a minimum. Its first derivatives are ; thus its minimizer solves the scheme. The same argument applies to .
Use the Backward Euler method in time and the prescribed central finite differences in space. With and , the implicit finite difference method for the advection-diffusion equation isEquivalently, for and , the new time level solvesThe spatial terms are evaluated at the new time level, making this an implicit scheme. On the whole line there are no finite-endpoint boundary conditions; in the next part its solution is chosen in the l2 sequence space.
Past exam of the physics B course of the University of Cambridge 2016 Paper 2 Section B B7 Solution 2026-10-20
An electrostatic field calculation begins by specifying the charge information, material response and boundary conditions. In vacuum, prescribed volume and surface electric charge densities can be superposed directly using Coulomb's law. For a volume distribution,Differentiating this electric potential gives the electric field. This is useful for known source distributions, but in the presence of conductors the induced surface electric charge is usually an unknown rather than an independently specified input.
Gauss's law is especially effective when symmetry fixes the direction and magnitude of the electric field on a suitable closed surface. A spherical charge distribution gives a radial field, an infinitely long uniform line gives a cylindrical field, and a uniform infinite sheet gives a planar field. In an arbitrary geometry, the flux law remains true but does not alone determine the pointwise electric field. A multipole expansion is another useful approximation: far from a localized charge distribution, successive monopole, dipole and higher terms separate the effects of total charge and its spatial structure.
For a boundary-value formulation, use the electrostatic equationsThey imply Poisson equation , or Laplace equation where . A conductor in electrostatic equilibrium is an equipotential with zero internal electric field. Its exterior normal electric field fixes the surface electric charge through . One must specify whether each conductor is grounded, maintained at a prescribed voltage, or isolated with prescribed total electric charge.
Uniqueness of Poisson equation justifies methods that construct a convenient candidate solution. With fixed boundary electric potential and suitable behaviour at infinity, a solution satisfying the field equation is the solution. With normal-derivative boundary conditions, the source and flux must be compatible, and the electric potential is determined only up to an additive constant.
For example, a point charge a distance above a grounded infinite plane has the same upper-half-space electric potential as and a mirrored image charge below it. Their potentials cancel on the plane. The image is a mathematical source in the excluded region, not a second physical charge. Separation of variables similarly constructs solutions suited to rectangular, cylindrical or spherical boundaries; matching coefficients enforces the prescribed boundary data.
In dielectrics, the distinction between total and free charge is essential. In a linear isotropic material,Only where permittivity is constant may this be reduced to . At an ordinary interface, and the tangential electric field are continuous, while the jump in normal electric displacement field is the free surface charge. Applying Gauss's law to total charge with , or its displacement-field form to free charge, gives consistent descriptions; mixing their sources and permittivities does not.
A useful interface example is the image charge at a dielectric interface. If lies in medium 1, the source-side potential is represented bywhere is distance to the real charge and to its mirrored position. The other-side potential can be written , where . Continuity of and of normal fixes both coefficients. The equal-permittivity limit gives no image; the conductor limit gives .
For a sphere of radius and relative permittivity in a uniform external electric field , matching the spherical solutions gives a uniform internal electric field and an external induced electric dipole moment:This illustrates how a material boundary modifies an otherwise simple applied electric field.
For complex boundaries or spatially varying materials, finite difference methods or the finite element method solve the same boundary value problem numerically. A sound calculation checks its boundary conditions, charge or flux balance and convergence with mesh refinement. The governing equations, source classification and uniqueness argument remain the organizing principles even when an analytic formula is unavailable.
Richardson extrapolation 2026-10-14
Richardson extrapolation improves an approximation by combining two resolutions so that their leading truncation errors cancel. The useful surprise is that the size of that leading error need not be known: its scaling under refinement is enough. This lets an existing finite difference method or quadrature rule produce a more accurate answer from two runs, without first deriving a new method from scratch.
Suppose approximates a fixed limit as the positive resolution parameter tends to zero, with an asymptotic expansionHere is known, is independent of , and denotes Big O notation. The same asymptotic expansion, with the same , must describe both and . Nested grids make it natural to reuse samples, although nesting itself does not establish this error model. Define the linear combinationThe weights sum to one, preserving , while . Thus Richardson extrapolation gives : the next available term in the asymptotic expansion determines the improved order. Justin Solomon's numerical analysis text develops this cancellation for finite differences and applies it to numerical integration.[ref]
https://people.csail.mit.edu/jsolomon/share/book/numerical_book.pdf. Justin Solomon, Numerical Algorithms, §14.3.3 and Exercise 14.9
Geometrically, regard the approximation as a function of . Its first two terms are a straight line . The two computed points lie at positive ; extending the line through them to gives . This is why the operation is extrapolation: it estimates a value outside the sampled parameter interval. The remaining curvature corresponds to the uncancelled terms of the asymptotic expansion.
Worked example: a centered derivative of sine. For the smooth function , the exact derivative at is . The centered difference quotient, a central finite difference, isThe Taylor series of sine gives the signed truncation errorThus , and . Halving divides the leading truncation error by four. Combining the two centered difference quotients with Richardson extrapolation givesIndeed, the coefficient becomes ; the coefficient vanishes. This is the even-power case of Richardson extrapolation discussed in Persson's authored lecture notes.[ref]
https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_4.html. Per-Olof Persson, Math 128A, Chapter 4, §§4.1–4.2
For and , the actual computations areThe absolute error drops from about for to for , an improvement by roughly a factor of 498. Refining again gives , whose absolute error is about . The refined truncation errors decrease by nearly four for and nearly sixteen for , reflecting their second and fourth orders.
Centered sine derivative errors: second order before Richardson extrapolation and fourth order after cancellation
. Source. Details. The logarithmic scale on each axis turns power laws into straight lines. The dashed reference curves are and , the magnitudes of the leading truncation errors. The plotted errors are computed with 70-digit decimal arithmetic, rather than clipped to a display floor; this isolates the asymptotic expansion from roundoff error.
Worked example: integrating an exponential. Approximate the definite integral of the exponential function on :For numerical integration, the composite trapezoidal rule adds the areas of trapezoids between successive samples; this is the quadrature use of the endpoint average that also occurs in the ODE trapezoidal rule. On equal intervals, with , defineSumming the geometric series gives . Expanding the exponential function near zero yieldsThe leading truncation error again has , . On the uniform nested grids with and intervals, Richardson extrapolation therefore givesThis linear combination is exactly composite Simpson's rule on the finer grid, whose spacing is . On each coarse panel, an old endpoint receives weight and the new midpoint weight ; shared old endpoints receive weight . These are the usual Simpson's rule weights multiplied by . The equivalence is explained directly in LeMesurier's university notes.[ref]
https://lemesurierb.people.charleston.edu/elementary-numerical-analysis-python/notebooks/definite-integrals-3-simpson-richardson.html. Brenton LeMesurier, MATH 375, §19.1: The Basic Simpson's Rule by Richardson Extrapolation
For two coarse panels and four fine panels,The absolute errors are about , and , respectively. Reusing the fine-grid samples makes Richardson extrapolation especially attractive here: the resulting Simpson's rule needs no samples beyond those already used by .
Exponential quadrature on nested grids: trapezoidal areas, reused sample nodes, and the fourth-order Simpson combination
. Source. Details. When the improvement is justified. Richardson extrapolation requires the stated asymptotic expansion and the correct positive . If the actual leading exponent is , its coefficient after combination is , so the leading truncation error generally remains. Merely knowing does not supply a common coefficient or a higher-order remainder. A discontinuity of a function, a singular endpoint, or unrelated changes between grids can invalidate the assumed asymptotic expansion; refinement alone does not guarantee improvement for every numerical problem.
Roundoff error and errors in the sampled values survive the cancellation of truncation error. If the coarse and fine values have absolute perturbations bounded by , the perturbation in is bounded by ; for this is . In floating-point arithmetic, a centered difference quotient can also amplify sample errors through division by , so an indefinitely smaller need not be more accurate. Persson's notes describe this balance between truncation error and roundoff error.[ref]
https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_4.html. Per-Olof Persson, Math 128A, Chapter 4, §4.1: Roundoff Error Instability
The same cancellation idea appears in step-doubling error estimation. For an order- one-step method for an ordinary differential equation, two half steps each contribute local truncation error of order , so their accumulated leading local error has ratio to one full step. This explains the denominator there; the appropriate exponent follows from that local error model, rather than automatically from a generic use of Richardson extrapolation.

