math
the identities i reach for mid-derivation to avoid a sign error or a stray factor. no intro-course material.
jump to: matrix calculus · index notation · vector calculus · gaussian integrals · complex analysis · asymptotics
matrix calculus
denominator layout; ∂(scalar)/∂x is a column vector.
- ∂(aᵀx)/∂x = a
- ∂(xᵀA x)/∂x = (A + Aᵀ)x → 2Ax when A symmetric
- ∂ tr(AX)/∂X = Aᵀ; ∂ tr(XᵀA X)/∂X = (A + Aᵀ)X
- ∂ ln det X /∂X = (X⁻¹)ᵀ; ∂ det X /∂X = det X · (X⁻¹)ᵀ
- differential of an inverse: d(X⁻¹) = −X⁻¹ (dX) X⁻¹
index notation
- εijk εilm = δjl δkm − δjm δkl (the one worth memorizing)
- εijk εijl = 2 δkl; εijk εijk = 6; δii = 3
- (A×B)ᵢ = εijk Aⱼ Bₖ; [A×(B×C)]: use the ε-δ identity to get BAC−CAB
vector calculus
- A×(B×C) = B(A·C) − C(A·B)
- ∇×(∇×A) = ∇(∇·A) − ∇²A
- ∇·(A×B) = B·(∇×A) − A·(∇×B)
- ∇(A·B) = (A·∇)B + (B·∇)A + A×(∇×B) + B×(∇×A)
- always zero: ∇×(∇f) = 0, ∇·(∇×A) = 0
gaussian integrals
- ∫ e^(−a x²) dx = √(π/a) (limits −∞…∞)
- ∫ e^(−a x² + b x) dx = √(π/a) · e^(b²/4a)
- moments: ∫ x²ⁿ e^(−a x²) dx = √(π/a) · (2n−1)!! / (2a)ⁿ
- n-dim, A symmetric positive-definite: ∫ e^(−½ xᵀA x + bᵀx) dⁿx = √( (2π)ⁿ / det A ) · e^(½ bᵀ A⁻¹ b)
complex analysis
- residue theorem: ∮_C f dz = 2πi · Σ Res(f, zₖ) over poles inside C
- simple pole: Res(f, z₀) = lim (z→z₀) (z − z₀) f(z)
- pole of order m: Res = 1/(m−1)! · lim (z→z₀) d^(m−1)/dz^(m−1) [ (z − z₀)ᵐ f(z) ]
- quotient at a simple zero of h: Res(g/h, z₀) = g(z₀) / h′(z₀)
- jordan's lemma: for ∫ f(x) e^(iax) dx (a > 0), close in the upper half-plane if f → 0 there
asymptotics & special
- stirling: n! ≈ √(2πn) (n/e)ⁿ; ln n! ≈ n ln n − n + ½ ln(2πn)
- gamma: Γ(z+1) = z Γ(z), Γ(n) = (n−1)!, Γ(½) = √π, Γ(z)Γ(1−z) = π / sin(πz)
- laplace / saddle point: ∫ e^(M f(x)) dx ≈ e^(M f(x₀)) √( 2π / (M |f″(x₀)|) ), maximum at x₀