Combine the logarithms first and factor out the limiting constant:Apply the Taylor expansion with . The first three nonzero terms, including the constant, areThis is an asymptotic expansion in reciprocal powers of .
Take the base-ten logarithm of both positive sides. The exponentiation rule for logarithms gives , hence
Take the total differential of the logarithm of the relativistic energy, with the speed of light fixed:Using the chain rule,Every term is a dimensionless fractional change. The differential relation is exact; applying it to finite small changes is a first-order Taylor expansion.
Use the Maclaurin series of the logarithm and hyperbolic cosine:To retain terms through degree six, only the constant and quadratic terms of the reciprocal factor can multiply the leading cubic term. ThusThe numerator in the original PDF is ; the cubic power is missing from the local TeX transcription.
Use integration by substitution , . The denominator factorizes as , and partial fraction decomposition givesIntegrating and restoring yieldsFor real , both and are positive, so no absolute-value signs are needed in this real logarithm. The denominator never vanishes.
First express the function in the original variables:The chain rule givesTaking its partial derivative with respect to yieldsThe numerator in the second fraction reduces to , reproducingBoth logarithms are defined for every real because their arguments are at least one.
Write and . The chain rule givesThe condition ensures . Since , also and . Hence the first two nonzero terms are the constant and linear terms:The inequality , together with continuity of , makes the logarithm defined on a neighbourhood of zero. The remainder is written in Big O notation.
Put . Since , the outer Taylor series requires and . ThereforeBoth logarithms are defined on a neighbourhood of zero, so this composition of power series is valid there.
Write . Direct differentiation, using the chain rule, givesThe stated parameter restrictions ensure that the logarithm is defined near , and that and . With , the Taylor series beginsIf , the constant term is nonzero, and the first two nonzero terms areThis covers both and ; the constant term is respectively positive or negative.
If , which is possible precisely with and , the constant term vanishes. The first two nonzero terms are thenNo further case is needed, since the linear and quadratic coefficients cannot vanish under the given restrictions. All remainders use Big O notation.
A partial fraction decomposition givesFor the second term the substitution rule , gives a logarithm. ThusThe constant in the antiderivative may be chosen independently on the two intervals separated by .
Split the integral intoThe first is the standard antiderivative from the inverse hyperbolic functions. For the second, the substitution rule gives . HenceThe logarithm's argument is positive for every real .
All are positive, and . The logarithm turns consecutive ratios into differences, producing the finite telescoping sumThus, already for every finite ,If the partial sums converge to , the continuity of the exponential function givesThe shift from to preserves the limit of a sequence. Convergence of the partial sums is established in part (f), so no convergence assumption is left unsupported.
Past exam of the mathematics course of the year 2 of the natural sciences course of the University of Cambridge 2003 Paper 1 6 Solution Created 2026-10-18 Updated 2026-10-20
For the normalized second-order linear differential equation , an ordinary point has analytic near . At a regular singular point, which is not ordinary, and are analytic. Ordinary points admit two independent convergent power series solutions. Regular singular points instead call for the Frobenius method, which permits leading powers and, in some cases, logarithms.
Here zero is an ordinary point. Substitute into the Hermite differential equation and equate coefficients:The even and odd initial coefficients are independent, givingThese are the power series solutions of the Hermite differential equation, with the present parameter equal to twice the parameter in that article. The ratio of successive terms within each nonterminating parity is asymptotically , so both series have infinite radius of convergence.
For a nonzero polynomial of degree , its highest coefficient in forces . Conversely at that value the matching parity terminates. HenceThe polynomial solutions are scalar multiples of the Hermite polynomials. Two examples are ; direct substitution verifies both. The other independent solution generally remains nonpolynomial.
Let denote the analytic part of the prescribed ansatz. Its logarithmic part has derivativesAfter substitution, the full differential equation reduces toThe first terms are real analytic at zero and cannot cancel a nonzero logarithm. ThereforeThe cancellation of the apparent terms is already built into this calculation.
For nonzero , the coefficients satisfy , so the analytic power series has radius of convergence . It converges absolutely also at , by comparison with .
The real logarithm in the prescribed solution requires . ConsequentlyThe series and the function itself have finite limits at ; in fact the logarithmic companion tends to . Its derivatives are singular there, so convergence of its values at the endpoint does not make it a classical solution through that singular point of a differential equation. At the logarithmic branch diverges. The independent analytic solution is a polynomial and has no such convergence restriction.
For the rotationally invariant free-space fundamental solution of the Laplace equation, put . Away from the source, the radial Laplacian gives , hence . Integrate its Poisson equation over a disk of radius about the source. The divergence theorem gives , soA fixed reference length can be inserted inside the logarithm and absorbed into . The resulting electric field decays like .
Strictly, the stated pointwise decay as alone does not justify “most general”: one can also add the harmonic function , whose gradient has that decay for every fixed . This is the same growth issue as a zero-boundary harmonic function with pointwise vertical decay. The displayed answer is the usual isotropic free-space choice; requiring the field to vanish uniformly in every direction at spatial infinity removes these extra harmonic additions. An additive constant remains undetermined.
Let , take supported where , and assume the following expectations exist. By the definition of Kullback-Leibler divergence and Bayes' theorem,Therefore the evidence lower bound isNonnegativity of Kullback-Leibler divergence proves . The marginal likelihood is constant with respect to the variational parameter , so maximizing minimizes the stated Kullback-Leibler divergence.
The practical advantage is that evaluating logarithms of joint probabilities and requires no evaluation of the usually intractable marginal likelihood. One can estimate and its gradient with Monte Carlo method. Equality with the log marginal likelihood occurs only when almost everywhere. Merely maximizing the evidence lower bound over a restricted family neither computes the exact posterior distribution nor proves that the maximum attains this equality.
Write for the standard normal distribution function. Integrating out the twenty independent past durations gives the threshold-censored normal likelihoodThe frequencies are those in part (a). For a future day, the conditional late-arrival probability is . Conditional independence of the five future durations gives .
Exactly three primitive random coordinates suffice. Draw from the same priors and one independent . Reject if ; otherwise return whether . Conditional on acceptance and the parameters, is uniform on an interval of length ; the true-answer subinterval has length . Reusing this same uniform value is therefore intentional, not an independence mistake.
Indeed the two output contributions at each parameter value areThese are exactly the contributions obtained by integrating the original twenty-five duration noises. Multiplication by the common prior density and normalization therefore give the same joint posterior distribution of . The revised program preserves the query and parameter posterior, but does not retain individual latent durations. This is uniform-interval encoding of conditioning and a binary query.
Here is an executable version, reusing the definitions from part (a). Logarithms avoid multiplying many small probabilities.
def normal_logcdf(z):
value = 0.5 * math.erfc(-z / math.sqrt(2.0))
return math.log(value) if value > 0.0 else -math.inf
def journey_loglik(mu, sigma):
return (sum(n * normal_logcdf((mu - c) / sigma)
for c, n in LATE.items())
+ sum(n * normal_logcdf((c - mu) / sigma)
for c, n in EARLY.items()))
def collapsed_trace(rng):
mu = rng.uniform(0.0, 60.0)
sigma = rng.uniform(1.0, 20.0)
log_likelihood = journey_loglik(mu, sigma)
# This uniform lies in (0, 1], avoiding log(0).
log_u = math.log(1.0 - rng.random())
if log_u >= log_likelihood:
return None
log_h = 5.0 * normal_logcdf((mu - 30.0) / sigma)
return log_u < log_likelihood + log_haccepted_average(collapsed_trace, n, rng) consequently has the same target as the original program. The ideal three-dimensional sample space is with product uniform probability measure, conditioned on the displayed acceptance event. Finite-precision normal tails can underflow to zero in this simple implementation; the mathematical equivalence concerns exact probabilities, and the numerical check in part (d) independently integrates the likelihood in the region carrying appreciable posterior mass.I would first collapse the duration noises as in part (c), then use self-normalized importance sampling on the two shared parameters. Draw independent , give each the importance weight , and returnThis is likelihood weighting: the observations affect the weights rather than forcing repeated simulation of twenty latent inequalities. Integrating out both the constraints' auxiliary randomness and the future Boolean query is Rao-Blackwellization; at fixed parameters it removes randomness without changing the relevant conditional expectations.
The weights and weighted queries lie in , and the evidence is positive. The strong law of large numbers therefore makes the numerator and denominator averages converge to their corresponding integrals, proving almost sure convergence of their ratio to part (d). The finite- ratio is generally biased; the assertion concerns consistency rather than a finite-sample unbiased estimator. Use logarithms of importance weights to avoid numerical underflow:
def weighted_answer(n, rng):
if n <= 0:
raise ValueError("n must be positive")
samples = []
for _ in range(n):
mu = rng.uniform(0.0, 60.0)
sigma = rng.uniform(1.0, 20.0)
samples.append((journey_loglik(mu, sigma),
math.exp(5.0 * normal_logcdf((mu - 30.0) / sigma))))
offset = max(logw for logw, h in samples)
if not math.isfinite(offset):
raise ArithmeticError("all weights underflowed")
scaled = [(math.exp(logw - offset), h) for logw, h in samples]
den = math.fsum(w for w, h in scaled)
answer = math.fsum(w * h for w, h in scaled) / den
ess = den * den / math.fsum(w * w for w, h in scaled)
return answer, essThe returned effective sample size of importance sampling is a concentration diagnostic, not a proof of accuracy. Repeat runs and inspect the weights. If the prior is much broader than the posterior, improve the proposal with the corresponding importance sampling density correction, or use the Metropolis–Hastings algorithm targeting . Because this particular collapsed problem is only two-dimensional, deterministic numerical integration is also an excellent independent accuracy check; it was used for the figure and numerical illustration. Straight rejection of the original traces is correct but wastes most proposals here.