Advanced Topics (Elite Level)
Level 3 — Production: from-scratch derivations, code-from-memory, explain-out-loud Time limit: 45 minutes Total marks: 60
Q1. (10 marks) — Euler–Lagrange derivation (from scratch). Consider a functional with fixed endpoints , . (a) Introduce a variation with and derive the first-order condition , obtaining the Euler–Lagrange equation. State clearly where integration by parts and the fundamental lemma of the calculus of variations are used. (7) (b) Show that if does not depend explicitly on , then is conserved (the Beltrami identity). (3)
Q2. (12 marks) — Residue theorem for a real integral. Evaluate using contour integration. (a) Explain the choice of contour and justify that the arc contribution vanishes. (4) (b) Identify the poles inside the contour and compute the relevant residues. (6) (c) State the final value of . (2)
Q3. (10 marks) — Cauchy–Riemann and analyticity (explain-out-loud). (a) State the Cauchy–Riemann equations for and explain, in words, why they (together with continuity of partials) guarantee complex differentiability. (4) (b) Determine whether is analytic anywhere. Justify using CR equations. (3) (c) For , find a harmonic conjugate so that is analytic, and identify in terms of . (3)
Q4. (10 marks) — Markov chain steady state (code-from-memory + math). A random walker moves on 3 states with transition matrix (rows = from, columns = to) (a) Write the stationary distribution condition , , and solve for . (6) (b) Write pseudocode (or Python) that computes the steady state numerically by power iteration, and explain when this converges. (4)
Q5. (10 marks) — Metric tensor / index gymnastics (from scratch). In 2D polar coordinates the line element is . (a) Write the metric tensor and its inverse . (3) (b) Using the Einstein summation convention, given a covariant vector , write the contravariant components explicitly. (3) (c) Compute the Christoffel symbol from . (4)
Q6. (8 marks) — Uniform vs pointwise (explain-out-loud) + KKT. (a) Give the precise – definitions of pointwise and uniform convergence of on a set, and state the key structural difference. Use on to illustrate non-uniformity. (4) (b) State the KKT conditions for minimizing subject to and . Name each condition. (4)
End of paper.
Answer keyMark scheme & solutions
Q1 (10)
(a) Let , . Define . (1) Necessary condition for extremum: . Differentiate under integral: (2) Integrate the second term by parts: Boundary term vanishes since . (2) Hence for all admissible . By the fundamental lemma (integrand continuous, arbitrary ), the bracket is identically zero: (1) (1)
(b) Compute . (2) The bracket is zero by E-L, so if then the derivative is const. (1)
Q2 (12)
(a) Use upper-half-plane semicircle: segment plus arc of radius . On the arc so as . (4)
(b) Poles: . In UHP: , . (2) Residue at simple pole : (since ). (2) . (2)
(c) (2)
Q3 (10)
(a) CR: , . (2) Complex differentiability requires the limit be independent of direction of . Equating limits along real and imaginary directions yields CR; with continuity of partials these become sufficient for differentiability. (2)
(b) , so , . Then , : CR needs ; , : needs . Both hold only at . So is complex-differentiable only at , nowhere analytic (analyticity needs a neighborhood). (3)
(c) . ; must equal . So (+const). . (3)
Q4 (10)
(a) Solve : with :
- From first: . From third: . (3) Normalize : , , . (3)
(b)
import numpy as np
P = np.array([[.5,.5,0],[.25,.5,.25],[0,.5,.5]])
pi = np.array([1/3,1/3,1/3])
for _ in range(1000):
pi = pi @ P
print(pi) # -> [0.25 0.5 0.25]Converges because the chain is irreducible and aperiodic (regular), so tends to a rank-1 matrix with rows ; power iteration converges at rate governed by second-largest . (4)
Q5 (10)
(a) , . (3)
(b) , . (3)
(c) . Only contributes (): (4)
Q6 (8)
(a) Pointwise: s.t. . (1) Uniform: (independent of ) s.t. . (1) Difference: works uniformly across all . (1) on : pointwise limit for , ; for all (near ), so not uniform (and limit is discontinuous). (1)
(b) KKT for min s.t. , : (4, 1 each)
- Stationarity: .
- Primal feasibility: , .
- Dual feasibility: .
- Complementary slackness: .
[
{"claim":"Integral of 1/(x^4+1) over R equals pi/sqrt2","code":"x=symbols('x'); I=integrate(1/(x**4+1),(x,-oo,oo)); result = simplify(I - pi/sqrt(2))==0"},
{"claim":"Sum of UHP residues of 1/(x^4+1) is -i*sqrt2/4","code":"z=symbols('z'); z1=exp(I*pi/4); z2=exp(I*3*pi/4); r=z1/(-4)+z2/(-4); result = simplify(r + I*sqrt(2)/4)==0"},
{"claim":"Stationary distribution is (1/4,1/2,1/4)","code":"P=Matrix([[Rational(1,2),Rational(1,2),0],[Rational(1,4),Rational(1,2),Rational(1,4)],[0,Rational(1,2),Rational(1,2)]]); pi=Matrix([[Rational(1,4),Rational(1,2),Rational(1,4)]]); result = (pi*P)==pi"},
{"claim":"Christoffel Gamma^r_theta_theta = -r for polar metric","code":"r=symbols('r'); g_theta_theta=r**2; Gamma = -Rational(1,2)*diff(g_theta_theta,r); result = simplify(Gamma + r)==0"}
]