The following R function performs inverse transform sampling with vectorized numerical computation. It checks finite real scalar parameters, including a nonnegative integer sample count, and gives
beta its requested default.r_sample_f <- function(n, p, beta = 1) {
scalar <- function(v) {
is.numeric(v) && !is.complex(v) && length(v) == 1L &&
is.finite(v)
}
if (!scalar(n) || n < 0 || n != floor(n))
stop("n must be a nonnegative integer")
if (!scalar(p) || p <= 0 || p >= 1)
stop("p must lie strictly between 0 and 1")
if (!scalar(beta) || beta <= 0)
stop("beta must be positive")
if (n == 0) return(numeric(0))
v <- runif(n)
(log1p(-p) - log(-expm1(v * log(p)))) / beta
}Here is again a uniform distribution draw, so the expression is the quantile function from (ii). The function
expm1(t) evaluates accurately when is small, avoiding cancellation in ; log1p(-p) evaluates . For default bounds, runif excludes both endpoints, so this implementation does not deliberately generate the infinite endpoint of the quantile function. It returns a numeric vector of length n, including an empty vector when n = 0. [ref]https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Uniform.html. Official R documentation: default runif draws exclude both endpoints
[ref]https://stat.ethz.ch/R-manual/R-devel/library/base/html/Log.html. Official R documentation: log1p and expm1 accurately evaluate small differences
Past exam of the symmetry and relativity course of the University of Oxford 2021 4 b Solution 2026-10-25
For an active clockwise rotation of column vectors in the usual oriented plane, takeDirect matrix multiplication givesThus the rotation matrix is an orthogonal matrix, preserving the Euclidean inner product, with determinant .
For a passive one-dimensional Lorentz boost, use rapidity , :This is not unless . Hence a nontrivial Lorentz boost is not an orthogonal matrix for the Euclidean inner product. Instead it preserves the Minkowski metric:by . Thus it is pseudo-orthogonal. The zero-rapidity identity is the explicit exception to the assertion that a Lorentz boost is not orthogonal.
Past exam of the theoretical mechanics course of the University of Oxford 2011 A 1 a i Solution 2026-10-31
For a material volume moving with the fluid, the Reynolds transport theorem gives, componentwise,For a scalar this is also . Apply the component formula to momentum density . Constant density and incompressibility make the integrand .
The traction is the force per unit area exerted by the material outside a surface on the material inside, with outward unit normal . Reversing the normal exchanges the two sides of the same internal surface. Thus expresses equal and opposite internal contact forces, the local form of Newton's third law.
With no body force, Newton's second law equates the rate of change of the material volume's total momentum to its surface force. Combining this balance with the transport theorem givesThis is a vector identity, since the component argument applies to each direction.
Past exam of the theoretical mechanics course of the University of Oxford 2011 B 4 a Solution 2026-10-31
Let rotate vectors from the rotating frame to the inertial frame. For any rotating-frame vector , differentiating adds to . Thus an inertial particle velocity is , and, for constant angular velocity, its acceleration isInsert this into the inertial Euler equations and express forces in the rotating coordinates. This givesThe additional terms are the Coriolis acceleration and the centripetal term associated with frame rotation. There is no angular-acceleration term because is constant.
Past exam of the theoretical mechanics course of the University of Oxford 2011 B 4 c Solution 2026-10-31
Write for the nonzero forcing frequency, to distinguish it from the vertical velocity . Put and . Then and , so it meets the rigid-wall conditions. Substituting into the scalar wave equation givesorThe radiation sign for an inertial wave must exclude any disturbance arriving from . This means an radiation condition for propagating waves, or bounded decay for an evanescent wave.
For , put . The solutions are oscillatory. The inertial-wave dispersion relation is ; its horizontal group velocity is . Positive energy transport into the channel therefore requires . The solution isFor a positive frequency, the phase travels towards negative while the group velocity travels towards positive . Choosing the outgoing sign from the phase velocity alone would give the wrong result.
For , set . Excluding the exponentially growing solution givesThis disturbance decays away from the wavemaker and does not propagate horizontally. At the cutoff the ODE degenerates to ; zero frequency is not a nonzero forced harmonic mode with this vertical shape.
There is a second printed inconsistency: the stated velocity , if taken literally with no dependence and no transverse velocity, cannot support a nontrivial rotating inertial wave. Its transverse momentum equation would give , then continuity and the rigid walls would force . The scalar solutions above are the intended inertial-wave solutions when two-dimensional means dependence on while retaining the transverse component . For a mode, explicitly supplies the generally nonzero transverse velocity. Thus the scalar equation can be solved as requested, but the full vector field needs this correction to the printed two-component description.
Past exam of the theoretical mechanics course of the University of Oxford 2011 B 6 a i Solution 2026-10-31
A weak solution is a field for which the composed densities and fluxes are locally integrable andfor every smooth compactly supported vector test function in the spacetime domain. This is the distributional form of the conservation law, obtained by moving derivatives onto the test function. If tests are allowed to meet an initial boundary , the specified initial density contributes the additional term in the usual initial-value formulation.
Put and . Applying the Euler-Lagrange equations to the quadratic Lagrangian givesA nonzero motion satisfying the specified equal-and-opposite initial displacements can have one frequency only if is a normal-mode vector. Its acceleration terms are proportional to , while the restoring terms are proportional to . HenceandThe rods swing oppositely. The hinge mass moves sideways, while the final mass has no first-order displacement: the two horizontal contributions cancel and its vertical change is quadratic in angle. In the corresponding geometric ansatz it moves vertically at twice the small-oscillation frequency to leading nonzero order, but the displayed single-frequency solution is a linearized result. The trivial case imposes no parameter condition.
For this neutral Coulomb pair in a uniform magnetic field, the reduced Lagrangian gives the canonical momentaInvert these relations and take the Legendre transform. The velocity-linear terms cancel against their momentum contributions, givingThere is no explicit time dependence, so . There is no dependence on , so . The distinction between kinetic momentum and magnetic pseudomomentum matters: the conserved vector is , not generally . The mechanical centre-of-mass momentum generally varies as the separation changes. A neutral pair can therefore have accelerated centre-of-mass motion in a magnetic field.
Differentiate and substitute the previous momentum equation:For a planar vector, , which gives the two component equations with the printed signs.
For circular relative motion of a neutral Coulomb pair of separation radius , and . ThusSince , the two signed frequencies areOne is positive and the other negative. At they give the two senses of an ordinary Coulomb circular orbit; equal masses remove the term linear in from their average. With negligible Coulomb attraction and , the branches approach and , the appropriate signed free cyclotron limits.
The actual particle paths follow by integrating the centre-of-mass velocity:Both particles move on circles about the same fixed guiding centre with a constant separation and common signed frequency, with a possible relative phase reversal encoded by a negative coefficient. Their mechanical centre of mass also generally circles. This is consistent with magnetic deflection plus a central mutual force; central interaction alone does not eliminate the external Lorentz forces.
For the isotropic zero-field classical Heisenberg model of a ferromagnet, the analytic vector Landau expansion uses the Cartesian components of the vector order parameter near . rotational symmetry makes its scalar terms functions of . Global spin inversion symmetry also requires . Through fourth order this givesA positive quartic coefficient stabilizes the unconstrained truncated free energy. The disordered phase has and its minimum at ; the aligned phase has and a minimum at nonzero . At the continuous transition . The attractive alignment interaction supplies an energetic tendency toward negative quadratic curvature; orientational entropy favors the disordered phase at high temperature, so the sign of is a free-energy question rather than a consequence of the pair energy alone.
The analyticity assumption matters: the variable printed as is a nonnegative magnitude, so reversing does not send that scalar to . Terms proportional to or would be rotationally invariant but nonanalytic at the vector origin. Standard analytic Landau theory excludes them. Without that assumption, the stated pair symmetry alone would not exclude odd powers of the magnitude.[ref]
Statistical Field Theory by David Tong. §1.2, small-order-parameter expansion; §4.2, rotationally invariant vector free energy
The independent head-tail reversal symmetry means that the squared dot product interaction energy is unchanged when any individual is replaced by . All configurations , with independently, attain the aligned ground-state pair energy. There is consequently no energetic preference for either end of a molecular axis. Averaging over these equally weighted signs gives and even in the nematically ordered phase. The surviving order is the unoriented axis, represented by a nematic director with . A second-moment tensor can detect this order while a polar vector cannot.[ref]
Lectures on Landau Theory of Phase Transitions by Peter D. Olmsted. §4.3, printed pp.10–11, head-tail equivalence and the tensor order parameter
The word “always” needs the statistical ensemble or apolar interpretation: it is not an identity for each finite configuration. For example, choosing all is also a ground-state representative and gives . In an unbiased sign statistical ensemble the typical residual polar vector has size of order , because for these independent ground-state signs. This does not make polar order an equilibrium nematic order parameter. The tensor below is unchanged by each sign flip and thus removes the arbitrary labeling of rod ends.
Contract the two Cartesian indices and use the unit length of each molecular orientation:This is exact for each configuration, with no ensemble average assumption. The nematic order parameter is also a real symmetric second-rank tensor. Under a common rotation it transforms as , so its powers give rotational invariants of a symmetric traceless tensor by the cyclic property of the trace. It is unchanged by independent sign flips of the molecular vectors, explaining why it is adapted to nematic rather than polar order.
The Pauli matrix multiplication law givesFor a unit vector , it follows that . In the exponential series the even powers therefore multiply and the odd powers multiply . Summing them separately,Equivalently, the eigenvalues of are , so its two spectral projectors acquire phases . The half-angle belongs to a spinor rotation, while the associated physical spin vector rotates through .
For the axis-angle composition of orthogonal spin rotations, set and . Multiplication, including , givesOne checks that . For , chooseThis choice retains the full spinor sign and gives . Repeated periods have the same axis:Thus the spin expectation vector rotates through , interpreted modulo as a spatial rotation. The positive component comes from the stated ordering; reversing the two rotations changes that component's sign.
For general spin , use dimensionless generators obeying . The two exponentials represent the same group elements as for spin , now in the -dimensional representation of . A representation preserves products, sowith exactly the same axis and angle found in (c); after periods the angle is . One must not substitute higher-spin matrices into the two-term Pauli exponential in (b), which used a property special to spin .
The dimension and action on spin states change, but the spin-independent axis-angle composition does not. In particular,Integer-spin states return with positive sign and half-integer-spin states with negative sign. spin expectation vectors transform as spatial vectors in either case, while a general higher-spin state also carries higher multipole information.
Choose orthonormal, flux-normalized incoming and outgoing channels and include all channels of this lossless scattering problem. Conservation of probability requires for every input vector. With ,For a square channel matrix this also gives . A submatrix obtained by omitting loss channels need not be unitary, but that is not the stated two-channel model.
The given real Hadamard matrix is symmetric, unitary and its own inverse. HenceThis same transformation preserves the canonical commutation relations for bosons and anticommutation relations for fermions. To extract probabilities one must use normalized number states, including their factorial factors, even when the supplied input expression is unnormalized.
The association between four real coordinates and Hermitian two-by-two matrices is a real-linear bijection. Congruence by preserves Hermiticity, so defines another real four-vector depending linearly on the original. Its determinant isThus the induced invertible linear map preserves the Minkowski quadratic form:The maps obtained continuously from the identity are proper and orthochronous. For example, a future timelike vector gives a positive-definite , which remains positive definite under invertible congruence; its time direction is preserved. The matrices and induce the same four-vector transformation, illustrating the Lorentz spinor double cover.
For nonzero , the outer product is rank-one Hermitian positive semidefinite, so and . It therefore represents a future-directed null vector. Conversely any nonzero future-null Hermitian has eigenvalues and zero, so its positive eigenvector multiplied by supplies . The phase leaves unchanged. A past-directed null vector needs , rather than the positive outer product alone.
For the printed normalized spinor, direct multiplication yieldsComparing with the printed convention givesIts usual spatial azimuth is , not . The source's asserted usual-angle identification has a sign inconsistency. Either conjugating the two spinor phases or replacing the upper-right matrix entry by restores the usual azimuth . Neither alteration is made silently here. A further positive scale factor sets the magnitude of an arbitrary future-null vector; the displayed normalized spinor fixes in the chosen coordinate units.