An org-mode file for you to pick up a formula or a back-of-envelope estimation once needed. Use I-search or whatever you like.
#+TITLE: Mathematical Reference #+AUTHOR: Ara #+STARTUP: overview #+TAGS: dlmf as nist * Elementary Functions ** Exponential & Logarithm *** Fundamental definitions :dlmf4_2:as4_1: e^x = lim_{n→∞} (1 + x/n)^n e = 2.71828 18284 59045 23536... ln(x) = ∫₁ˣ dt/t, x > 0 *** Exponential laws :dlmf4_2:as4_1: e^{a+b} = e^a · e^b e^{a·b} = (e^a)^b e^0 = 1 e^{ln x} = x, x > 0 ln(e^x) = x *** Logarithm laws :dlmf4_2:as4_1: ln(ab) = ln a + ln b ln(a/b) = ln a - ln b ln(a^r) = r ln a log_b(x) = ln(x) / ln(b) *** Exponential limits & asymptotics :dlmf4_2: lim_{x→0} (e^x - 1)/x = 1 lim_{x→∞} x^n / e^x = 0 for any fixed n lim_{x→∞} ln(x) / x^ε = 0 for any ε > 0 ** Trigonometric Functions *** Euler's formula :dlmf4_14: e^{iθ} = cos θ + i sin θ e^{-iθ} = cos θ - i sin θ cos θ = (e^{iθ} + e^{-iθ}) / 2 sin θ = (e^{iθ} - e^{-iθ}) / (2i) *** Pythagorean identities :dlmf4_14:as4_3_10: sin²θ + cos²θ = 1 1 + tan²θ = sec²θ 1 + cot²θ = csc²θ *** Sum/difference formulas :dlmf4_21:as4_3_16: sin(α ± β) = sin α cos β ± cos α sin β cos(α ± β) = cos α cos β ∓ sin α sin β tan(α ± β) = (tan α ± tan β) / (1 ∓ tan α tan β) *** Double-angle :dlmf4_21:as4_3_24: sin 2α = 2 sin α cos α cos 2α = cos²α - sin²α = 2cos²α - 1 = 1 - 2sin²α tan 2α = 2 tan α / (1 - tan²α) *** Half-angle :dlmf4_21:as4_3_20: sin²(α/2) = (1 - cos α)/2 cos²(α/2) = (1 + cos α)/2 tan(α/2) = sin α / (1 + cos α) = (1 - cos α) / sin α *** Product-to-sum :dlmf4_21:as4_3_31: cos α cos β = ½[cos(α-β) + cos(α+β)] sin α sin β = ½[cos(α-β) - cos(α+β)] sin α cos β = ½[sin(α+β) + sin(α-β)] Proof (first): take Re(e^{i(α-β)}) = Re(e^{iα} · e^{-iβ}), expand *** Sum-to-product :dlmf4_21:as4_3_34: sin α + sin β = 2 sin((α+β)/2) cos((α-β)/2) sin α - sin β = 2 cos((α+β)/2) sin((α-β)/2) cos α + cos β = 2 cos((α+β)/2) cos((α-β)/2) cos α - cos β = -2 sin((α+β)/2) sin((α-β)/2) *** Power-reduction :as4_3_29: sin²θ = (1 - cos 2θ)/2 cos²θ = (1 + cos 2θ)/2 sin³θ = (3 sin θ - sin 3θ)/4 cos³θ = (3 cos θ + cos 3θ)/4 *** Chebyshev expansion (cos nθ) :dlmf4_21: cos 2θ = 2cos²θ - 1 cos 3θ = 4cos³θ - 3cos θ cos nθ = T_n(cos θ) where T_n is Chebyshev polynomial *** Inverse trig principal values :dlmf4_23:as4_4: arcsin: [-π/2, π/2], domain [-1,1] arccos: [0, π], domain [-1,1] arctan: (-π/2, π/2), domain ℝ arctan(x) + arctan(1/x) = π/2 for x > 0 *** Inverse trig relations :dlmf4_23:as4_4: arcsin x + arccos x = π/2 arctan x + arccot x = π/2 arctan x + arctan y = arctan((x+y)/(1-xy)) when xy < 1 2 arctan x = arctan(2x/(1-x²)) when |x| < 1 ** Hyperbolic Functions *** Definitions :dlmf4_28:as4_5: sinh x = (e^x - e^{-x})/2 cosh x = (e^x + e^{-x})/2 tanh x = sinh x / cosh x = (e^{2x} - 1)/(e^{2x} + 1) *** Fundamental identity :dlmf4_28:as4_5_1: cosh²x - sinh²x = 1 1 - tanh²x = sech²x coth²x - 1 = csch²x *** Sum formulas :dlmf4_35:as4_5_7: sinh(α ± β) = sinh α cosh β ± cosh α sinh β cosh(α ± β) = cosh α cosh β ± sinh α sinh β tanh(α ± β) = (tanh α ± tanh β)/(1 ± tanh α tanh β) *** Connection to trig :dlmf4_28: sinh(ix) = i sin x cosh(ix) = cos x sin(ix) = i sinh x cos(ix) = cosh x *** Inverse hyperbolic :dlmf4_37:as4_6: arsinh x = ln(x + √(x²+1)), x ∈ ℝ arcosh x = ln(x + √(x²-1)), x ≥ 1 artanh x = ½ ln((1+x)/(1-x)), |x| < 1 * Series & Approximations ** Taylor / Maclaurin series :dlmf4_6:as4_1: *** Exponential and logarithm e^x = Σ_{n=0}^∞ x^n/n! for all x ln(1+x) = x - x²/2 + x³/3 - x⁴/4 + ... |x| ≤ 1, x ≠ -1 ln((1+x)/(1-x)) = 2(x + x³/3 + x⁵/5 + ...) |x| < 1 *** Trigonometric :dlmf4_19:as4_3_65: sin x = x - x³/3! + x⁵/5! - x⁷/7! + ... cos x = 1 - x²/2! + x⁴/4! - x⁶/6! + ... tan x = x + x³/3 + 2x⁵/15 + 17x⁷/315 + ... |x| < π/2 arctan x = x - x³/3 + x⁵/5 - x⁷/7 + ... |x| ≤ 1 *** Hyperbolic :dlmf4_33:as4_5_62: sinh x = x + x³/3! + x⁵/5! + x⁷/7! + ... cosh x = 1 + x²/2! + x⁴/4! + x⁶/6! + ... tanh x = x - x³/3 + 2x⁵/15 - 17x⁷/315 + ... |x| < π/2 *** Binomial series :dlmf1_2:as3_6_10: (1+x)^α = Σ_{n=0}^∞ C(α,n) x^n where C(α,n) = α(α-1)...(α-n+1)/n! Valid for |x| < 1 (any α), or |x| = 1 if α > 0 *** Geometric series :as3_6_2: 1/(1-x) = 1 + x + x² + x³ + ... |x| < 1 1/(1-x)^2 = 1 + 2x + 3x² + 4x³ + ... |x| < 1 1/(1-x)^n = Σ_{k=0}^∞ C(n+k-1,k) x^k |x| < 1 ** Asymptotic expansions *** Stirling's approximation :dlmf5_11:as6_1_37: n! ~ √(2πn) (n/e)^n [1 + 1/(12n) + 1/(288n²) - 139/(51840n³) + ...] ln(n!) = n ln n - n + ½ ln(2πn) + 1/(12n) - 1/(360n³) + ... *** Euler-Maclaurin formula :dlmf2_10:as23_1_30: Σ_{k=a}^b f(k) = ∫_a^b f(x)dx + (f(a)+f(b))/2 + Σ_{j=1}^p B_{2j}/(2j)! [f^{(2j-1)}(b) - f^{(2j-1)}(a)] + R_p where B_{2j} are Bernoulli numbers *** Laplace method (saddle point) :dlmf2_4: ∫_a^b f(x) e^{λg(x)} dx ~ f(x₀) e^{λg(x₀)} √(2π/(λ|g''(x₀)|)) as λ → ∞, where g'(x₀) = 0, g''(x₀) < 0 ** Summation formulas *** Bernoulli numbers :dlmf24_2:as23_1: B₀=1, B₁=-½, B₂=1/6, B₄=-1/30, B₆=1/42, B₈=-1/30, B₁₀=5/66 B_{2n+1} = 0 for n ≥ 1 Generating function: t/(e^t - 1) = Σ_{n=0}^∞ B_n t^n/n! *** Euler numbers :dlmf24_2:as23_1: E₀=1, E₂=-1, E₄=5, E₆=-61, E₈=1385 Generating function: sech t = Σ_{n=0}^∞ E_n t^n/n! *** Riemann zeta at integers :dlmf25_6:as23_2: ζ(2) = π²/6 ζ(4) = π⁴/90 ζ(6) = π⁶/945 ζ(2n) = (-1)^{n+1} (2π)^{2n} B_{2n} / (2(2n)!) ζ(3) = 1.20205 69031 59594... (Apéry's constant, no closed form) *** Partial fractions for trig :dlmf4_22: π cot(πz) = 1/z + Σ_{n=1}^∞ [1/(z-n) + 1/(z+n)] π csc(πz) = 1/z + Σ_{n=1}^∞ (-1)^n [1/(z-n) + 1/(z+n)] π²/sin²(πz) = Σ_{n=-∞}^∞ 1/(z-n)² * Combinatorics & Number Theory ** Binomial coefficients :dlmf26_3:as24_1_1: *** Basic identities C(n,k) = n! / (k!(n-k)!) C(n,k) = C(n, n-k) (symmetry) C(n,k) = C(n-1,k-1) + C(n-1,k) (Pascal) Σ_{k=0}^n C(n,k) = 2^n Σ_{k=0}^n (-1)^k C(n,k) = 0 *** Vandermonde convolution :dlmf26_3:as24_1_1: Σ_{k=0}^r C(m,k) C(n,r-k) = C(m+n, r) *** Chu-Vandermonde :dlmf15_4: ₂F₁(-n, b; c; 1) = (c-b)_n / (c)_n Reduces to Vandermonde when b,c are integers *** Upper negation C(-n, k) = (-1)^k C(n+k-1, k) *** Multinomial C(n; k₁,k₂,...,k_m) = n! / (k₁! k₂! ... k_m!) where k₁ + k₂ + ... + k_m = n ** Partition formulas *** Euler's pentagonal theorem :dlmf27_14: Π_{n=1}^∞ (1-x^n) = Σ_{k=-∞}^∞ (-1)^k x^{k(3k-1)/2} *** Partition generating function Σ_{n=0}^∞ p(n) x^n = Π_{k=1}^∞ 1/(1-x^k) p(0)=1, p(1)=1, p(2)=2, p(3)=3, p(4)=5, p(5)=7, p(10)=42 ** Number theory *** Möbius function μ(n) :dlmf27_2: μ(1) = 1 μ(n) = (-1)^k if n = p₁p₂...p_k (distinct primes) μ(n) = 0 if n has a squared prime factor *** Möbius inversion :dlmf27_5: If g(n) = Σ_{d|n} f(d) then f(n) = Σ_{d|n} μ(n/d) g(d) *** Euler totient φ(n) :dlmf27_2:as24_3_2: φ(n) = n Π_{p|n} (1 - 1/p) Σ_{d|n} φ(d) = n φ(mn) = φ(m)φ(n) · d/φ(d) where d = gcd(m,n) *** Quadratic reciprocity For odd primes p ≠ q: (p/q)(q/p) = (-1)^{(p-1)(q-1)/4} where (·/·) is the Legendre symbol * Linear Algebra ** Matrix identities *** Woodbury identity :as_matrix: (A + UCV)^{-1} = A^{-1} - A^{-1}U(C^{-1} + VA^{-1}U)^{-1}VA^{-1} *** Sherman-Morrison (rank-1 case) (A + uv^T)^{-1} = A^{-1} - A^{-1}u v^T A^{-1} / (1 + v^T A^{-1} u) *** Matrix determinant lemma det(A + uv^T) = (1 + v^T A^{-1} u) det(A) *** Push-through identity (I + AB)^{-1} A = A (I + BA)^{-1} Useful: maps between m×m and n×n inversions *** Block matrix inverse (2×2) [A B; C D]^{-1}, Schur complement S = D - CA^{-1}B: top-left block = A^{-1} + A^{-1}B S^{-1} C A^{-1} top-right = -A^{-1}B S^{-1} bottom-left = -S^{-1} C A^{-1} bottom-right = S^{-1} ** Determinant & trace *** Properties det(AB) = det(A) det(B) det(A^T) = det(A) det(cA) = c^n det(A) for n×n matrix det(A^{-1}) = 1/det(A) tr(AB) = tr(BA) tr(A+B) = tr(A) + tr(B) tr(A^T) = tr(A) *** Jacobi's formula d/dt det(A(t)) = det(A) tr(A^{-1} dA/dt) *** Matrix exponential e^A = Σ_{n=0}^∞ A^n/n! det(e^A) = e^{tr(A)} e^{A+B} = e^A e^B only if AB = BA ** Eigenvalue bounds *** Gershgorin circle theorem Every eigenvalue of A lies in at least one disk D_i = {z : |z - a_{ii}| ≤ Σ_{j≠i} |a_{ij}|} *** Courant-Fischer (min-max) λ_k = min_{dim(V)=k} max_{x∈V, x≠0} (x^T A x)/(x^T x) for A symmetric, eigenvalues λ₁ ≤ λ₂ ≤ ... ≤ λ_n *** Weyl's inequality For Hermitian A, B: λ_i(A) + λ_1(B) ≤ λ_i(A+B) ≤ λ_i(A) + λ_n(B) ** Decompositions *** SVD A = UΣV^T, U^TU = I, V^TV = I, Σ diagonal ≥ 0 Best rank-k approx: A_k = Σ_{i=1}^k σ_i u_i v_i^T (Eckart-Young) *** Cholesky A = LL^T for A symmetric positive definite, L lower triangular *** QR A = QR, Q orthogonal, R upper triangular *** Spectral A = QΛQ^T for A symmetric, Q orthogonal, Λ = diag(λ₁,...,λ_n) * Calculus & Analysis ** Differentiation identities *** Leibniz rule (product, nth derivative) :as3_3_8: (fg)^{(n)} = Σ_{k=0}^n C(n,k) f^{(k)} g^{(n-k)} *** Faà di Bruno (chain rule, nth derivative) (f∘g)^{(n)} = Σ f^{(k)}(g(x)) · B_{n,k}(g'(x), g''(x), ..., g^{(n-k+1)}(x)) where B_{n,k} are partial Bell polynomials *** L'Hôpital's rule lim f(x)/g(x) = lim f'(x)/g'(x) when both → 0 or both → ±∞, provided RHS exists ** Standard integrals :as_chapter5: *** Gaussian integral ∫_{-∞}^∞ e^{-x²} dx = √π ∫_{-∞}^∞ e^{-ax²+bx} dx = √(π/a) e^{b²/(4a)}, Re(a) > 0 ∫_0^∞ x^{2n} e^{-x²} dx = √π (2n)! / (n! 4^n · 2) *** Dirichlet integral ∫_0^∞ sin(x)/x dx = π/2 *** Fresnel integrals :dlmf7_2: ∫_0^∞ sin(x²) dx = ∫_0^∞ cos(x²) dx = √(π/2)/2 *** Beta integral :dlmf5_12:as6_2_1: ∫_0^1 x^{a-1}(1-x)^{b-1} dx = B(a,b) = Γ(a)Γ(b)/Γ(a+b) *** Integration by parts (tabular method) ∫ u dv = uv - ∫ v du For repeated application: alternate signs, D column, I column ** Inequalities *** AM-GM (a₁+a₂+...+a_n)/n ≥ (a₁a₂...a_n)^{1/n} for a_i ≥ 0 Equality iff all a_i equal *** Cauchy-Schwarz |⟨u,v⟩|² ≤ ⟨u,u⟩ · ⟨v,v⟩ (Σ a_i b_i)² ≤ (Σ a_i²)(Σ b_i²) *** Hölder's inequality Σ |a_i b_i| ≤ (Σ |a_i|^p)^{1/p} · (Σ |b_i|^q)^{1/q} where 1/p + 1/q = 1, p > 1 *** Minkowski's inequality (Σ |a_i+b_i|^p)^{1/p} ≤ (Σ |a_i|^p)^{1/p} + (Σ |b_i|^p)^{1/p} (triangle inequality in l^p) *** Jensen's inequality f(E[X]) ≤ E[f(X)] for f convex f(E[X]) ≥ E[f(X)] for f concave *** Young's inequality ab ≤ a^p/p + b^q/q for a,b ≥ 0, 1/p + 1/q = 1 ** Integral inequalities *** Cauchy-Schwarz (integral form) (∫ fg dx)² ≤ (∫ f² dx)(∫ g² dx) *** Hölder (integral form) ∫ |fg| dx ≤ (∫ |f|^p dx)^{1/p} · (∫ |g|^q dx)^{1/q} *** Grönwall's inequality If u'(t) ≤ β(t)u(t) then u(t) ≤ u(0) exp(∫_0^t β(s)ds) * Gamma, Beta & Related :dlmf5:as6: ** Gamma function :dlmf5_2:as6_1: *** Definition Γ(z) = ∫_0^∞ t^{z-1} e^{-t} dt, Re(z) > 0 Γ(z+1) = z Γ(z) Γ(n+1) = n! for n ∈ ℕ *** Special values :dlmf5_4:as6_1_5: Γ(1/2) = √π Γ(1) = 1 Γ(3/2) = √π/2 Γ(n+½) = (2n)! √π / (4^n n!) *** Reflection formula :dlmf5_5:as6_1_17: Γ(z)Γ(1-z) = π / sin(πz) *** Duplication formula (Legendre) :dlmf5_5:as6_1_18: Γ(z)Γ(z+½) = √π / 2^{2z-1} · Γ(2z) *** Multiplication formula (Gauss) :dlmf5_5:as6_1_20: Π_{k=0}^{n-1} Γ(z+k/n) = (2π)^{(n-1)/2} n^{1/2-nz} Γ(nz) *** Stirling (asymptotic) :dlmf5_11:as6_1_37: Γ(z) ~ √(2π/z) (z/e)^z [1 + 1/(12z) + 1/(288z²) + ...] as |z| → ∞ in |arg(z)| < π ** Beta function :dlmf5_12:as6_2: B(a,b) = Γ(a)Γ(b)/Γ(a+b) B(a,b) = ∫_0^1 t^{a-1}(1-t)^{b-1} dt B(a,b) = B(b,a) B(a,b) = 2∫_0^{π/2} sin^{2a-1}θ cos^{2b-1}θ dθ ** Digamma & polygamma :dlmf5_2:as6_3: *** Digamma ψ(z) = Γ'(z)/Γ(z) = d/dz ln Γ(z) ψ(1) = -γ (Euler-Mascheroni, γ = 0.57721 56649...) ψ(n+1) = -γ + Σ_{k=1}^n 1/k = -γ + H_n ψ(z+1) = ψ(z) + 1/z ψ(1/2) = -γ - 2 ln 2 ψ(1-z) - ψ(z) = π cot(πz) *** Polygamma ψ^{(n)}(z) = (-1)^{n+1} n! Σ_{k=0}^∞ 1/(z+k)^{n+1} ψ^{(n)}(z+1) = ψ^{(n)}(z) + (-1)^n n!/z^{n+1} ** Pochhammer symbols :dlmf5_2:as6_1_22: Rising factorial: (a)_n = a(a+1)(a+2)...(a+n-1) = Γ(a+n)/Γ(a) (a)_0 = 1 (1)_n = n! Falling factorial: a^{(n)} = a(a-1)(a-2)...(a-n+1) = n! C(a,n) ** Incomplete gamma :dlmf8_2:as6_5: γ(a,x) = ∫_0^x t^{a-1} e^{-t} dt (lower) Γ(a,x) = ∫_x^∞ t^{a-1} e^{-t} dt (upper) γ(a,x) + Γ(a,x) = Γ(a) Regularized: P(a,x) = γ(a,x)/Γ(a), Q(a,x) = Γ(a,x)/Γ(a) * Error Function & Related :dlmf7:as7: ** Error function :dlmf7_2:as7_1: *** Definition erf(z) = (2/√π) ∫_0^z e^{-t²} dt erfc(z) = 1 - erf(z) = (2/√π) ∫_z^∞ e^{-t²} dt erf(∞) = 1, erf(0) = 0, erf(-z) = -erf(z) *** Relation to Gaussian CDF Φ(x) = ½[1 + erf(x/√2)] erfc(x) = 2[1 - Φ(x√2)] Q(x) = ½ erfc(x/√2) (tail probability) *** Relation to incomplete gamma erf(z) = P(½, z²) = γ(½, z²)/√π *** Series expansion :dlmf7_6:as7_1_5: erf(z) = (2/√π) Σ_{n=0}^∞ (-1)^n z^{2n+1} / (n!(2n+1)) = (2/√π)(z - z³/3 + z⁵/10 - z⁷/42 + ...) *** Asymptotic expansion (large z) :dlmf7_12:as7_1_23: erfc(z) ~ (e^{-z²}/(z√π)) Σ_{n=0}^∞ (-1)^n (2n-1)!! / (2z²)^n = (e^{-z²}/(z√π))[1 - 1/(2z²) + 3/(4z⁴) - ...] as |z|→∞ in |arg z| < 3π/4 *** Bounds (2/√π) · x/(x²+1) · e^{-x²} < erfc(x) < (2/√π) · (1/x) · e^{-x²} for x>0 Mills ratio: R(x) = erfc(x)√π e^{x²}/2 ~ 1/x - 1/x³ + 3/x⁵ - ... ** Dawson function :dlmf7_2: F(z) = e^{-z²} ∫_0^z e^{t²} dt F(z) = (√π/2) e^{-z²} erfi(z) where erfi(z) = -i erf(iz) F(z) ~ 1/(2z) + 1/(4z³) + 3/(8z⁵) + ... as z→∞ F(0) = 0, max at z ≈ 0.9241, F(0.9241) ≈ 0.5411 ** Fresnel integrals :dlmf7_2:as7_3: S(z) = ∫_0^z sin(πt²/2) dt C(z) = ∫_0^z cos(πt²/2) dt S(∞) = C(∞) = ½ S(z) = (√π/2) Σ_{n=0}^∞ (-1)^n (πz²/2)^{2n+1} / ((2n+1)!(4n+3)) C(z) = (√π/2) Σ_{n=0}^∞ (-1)^n (πz²/2)^{2n} / ((2n)!(4n+1)) ** Voigt function (plasma/spectral line) :dlmf7_19: H(a,u) = (a/π) ∫_{-∞}^∞ e^{-t²} / (a² + (u-t)²) dt H(a,u) = Re[w(u+ia)] where w is Faddeeva function Faddeeva: w(z) = e^{-z²} erfc(-iz) = e^{-z²}(1 + (2i/√π)∫_0^z e^{t²}dt) ** Exponential integral & relatives :dlmf6:as5_1: *** Exponential integral Ei(x) = -PV ∫_{-x}^∞ e^{-t}/t dt = PV ∫_{-∞}^x e^t/t dt (x>0) E₁(z) = ∫_z^∞ e^{-t}/t dt = ∫_1^∞ e^{-zt}/t dt (Re z>0 or z≠0) E₁(z) = -γ - ln z - Σ_{n=1}^∞ (-z)^n/(n·n!) Ei(x) = γ + ln x + Σ_{n=1}^∞ x^n/(n·n!) for x>0 *** Logarithmic integral li(x) = ∫_0^x dt/ln t = Ei(ln x) li(x) ~ x/ln x (prime number theorem: π(x) ~ li(x)) *** Sine and cosine integrals :dlmf6_2:as5_2: Si(x) = ∫_0^x sin(t)/t dt, Si(∞) = π/2 Ci(x) = -∫_x^∞ cos(t)/t dt = γ + ln x + ∫_0^x (cos t - 1)/t dt si(x) = Si(x) - π/2 = -∫_x^∞ sin(t)/t dt * Orthogonal Polynomials :dlmf18:as22: ** General Rodrigues formula p_n(x) = (c_n / w(x)) · (d/dx)^n [w(x) s(x)^n] ** Legendre polynomials P_n(x) :dlmf18_3:as22_2: Weight: w=1 on [-1,1] Rodrigues: P_n(x) = 1/(2^n n!) (d/dx)^n (x²-1)^n P₀=1, P₁=x, P₂=(3x²-1)/2, P₃=(5x³-3x)/2 Recurrence: (n+1)P_{n+1} = (2n+1)x P_n - n P_{n-1} Orthogonality: ∫_{-1}^1 P_m P_n dx = 2δ_{mn}/(2n+1) Generating fn: 1/√(1-2xh+h²) = Σ P_n(x) h^n ** Chebyshev polynomials T_n(x) :dlmf18_3:as22_3: Weight: w = 1/√(1-x²) on [-1,1] T_n(cos θ) = cos(nθ) T₀=1, T₁=x, T₂=2x²-1, T₃=4x³-3x Recurrence: T_{n+1} = 2x T_n - T_{n-1} Orthogonality: ∫_{-1}^1 T_m T_n / √(1-x²) dx = (π/2)δ_{mn} (n≥1), π (n=m=0) ** Hermite polynomials H_n(x) :dlmf18_3:as22_5: Weight: w = e^{-x²} on (-∞,∞) [physicist convention] Rodrigues: H_n(x) = (-1)^n e^{x²} (d/dx)^n e^{-x²} H₀=1, H₁=2x, H₂=4x²-2, H₃=8x³-12x Recurrence: H_{n+1} = 2x H_n - 2n H_{n-1} Orthogonality: ∫_{-∞}^∞ H_m H_n e^{-x²} dx = √π 2^n n! δ_{mn} ** Laguerre polynomials L_n(x) :dlmf18_3:as22_11: Weight: w = e^{-x} on [0,∞) Rodrigues: L_n(x) = e^x/n! (d/dx)^n (x^n e^{-x}) L₀=1, L₁=1-x, L₂=(x²-4x+2)/2 Recurrence: (n+1)L_{n+1} = (2n+1-x)L_n - n L_{n-1} Generalized: L_n^{(α)}(x) with weight x^α e^{-x} ** Jacobi polynomials P_n^{(α,β)}(x) :dlmf18_3:as22_1: Weight: w = (1-x)^α (1+x)^β on [-1,1] Includes Legendre (α=β=0), Chebyshev (α=β=-½), Gegenbauer (α=β) Orthogonality: ∫_{-1}^1 P_m^{(α,β)} P_n^{(α,β)} w(x)dx = h_n δ_{mn} * Bessel Functions :dlmf10:as9: ** Bessel equation x² y'' + x y' + (x² - ν²) y = 0 Solutions: J_ν(x), Y_ν(x) (Bessel 1st/2nd kind) ** Modified Bessel equation x² y'' + x y' - (x² + ν²) y = 0 Solutions: I_ν(x), K_ν(x) ** J_ν definitions & properties :dlmf10_2:as9_1_10: J_ν(x) = Σ_{m=0}^∞ (-1)^m (x/2)^{ν+2m} / (m! Γ(ν+m+1)) J_{-n}(x) = (-1)^n J_n(x) for integer n ** Recurrence relations :dlmf10_6:as9_1_27: J_{ν-1}(z) + J_{ν+1}(z) = (2ν/z) J_ν(z) J_{ν-1}(z) - J_{ν+1}(z) = 2 J'_ν(z) Same recurrences hold for Y_ν, I_ν (with sign change for K_ν) ** Asymptotic forms (large x) :dlmf10_17:as9_2: J_ν(x) ~ √(2/(πx)) cos(x - νπ/2 - π/4) Y_ν(x) ~ √(2/(πx)) sin(x - νπ/2 - π/4) I_ν(x) ~ e^x / √(2πx) K_ν(x) ~ √(π/(2x)) e^{-x} ** Special cases :dlmf10_16:as9_1_1: J_{1/2}(x) = √(2/(πx)) sin x J_{-1/2}(x) = √(2/(πx)) cos x I_{1/2}(x) = √(2/(πx)) sinh x K_{1/2}(x) = √(π/(2x)) e^{-x} ** Integral representations :dlmf10_9:as9_1_20: J_n(x) = (1/π) ∫_0^π cos(nθ - x sin θ) dθ for integer n J_0(x) = (1/π) ∫_0^π cos(x sin θ) dθ ** Hankel functions :dlmf10_2:as9_1_3: H_ν^{(1)}(z) = J_ν(z) + i Y_ν(z) H_ν^{(2)}(z) = J_ν(z) - i Y_ν(z) ** Zeros of J_ν :dlmf10_21:as9_5: J₀ zeros: 2.4048, 5.5201, 8.6537, 11.7915, ... J₁ zeros: 3.8317, 7.0156, 10.1735, 13.3237, ... McMahon expansion: j_{ν,s} ~ β - (4ν²-1)/(8β) - ... where β = (s + ν/2 - 1/4)π * Hypergeometric Functions :dlmf15:as15: ** Gauss hypergeometric ₂F₁ :dlmf15_2:as15_1: ₂F₁(a,b;c;z) = Σ_{n=0}^∞ (a)_n(b)_n / ((c)_n n!) z^n |z|<1 ₂F₁(a,b;c;1) = Γ(c)Γ(c-a-b) / (Γ(c-a)Γ(c-b)) Re(c-a-b) > 0 ** Euler's integral :dlmf15_6:as15_3_1: ₂F₁(a,b;c;z) = Γ(c)/(Γ(b)Γ(c-b)) ∫_0^1 t^{b-1}(1-t)^{c-b-1}(1-zt)^{-a} dt ** Kummer's transformation :dlmf15_8:as15_3_3: ₂F₁(a,b;c;z) = (1-z)^{c-a-b} ₂F₁(c-a, c-b; c; z) ** Pfaff's transformation :dlmf15_8:as15_3_4: ₂F₁(a,b;c;z) = (1-z)^{-a} ₂F₁(a, c-b; c; z/(z-1)) ** Confluent hypergeometric (Kummer) ₁F₁ :dlmf13_2:as13_1: M(a,b,z) = ₁F₁(a;b;z) = Σ_{n=0}^∞ (a)_n z^n / ((b)_n n!) Kummer's 2nd: U(a,b,z) (irregular solution) Relation: ₁F₁(a;b;z) = e^z ₁F₁(b-a;b;-z) ** Generalized hypergeometric :dlmf16:as_gen: _pF_q(a₁,...,a_p; b₁,...,b_q; z) = Σ_{n=0}^∞ (a₁)_n...(a_p)_n / ((b₁)_n...(b_q)_n) z^n/n! Converges for all z when p ≤ q; for |z|<1 when p = q+1 ** Special cases expressed as ₂F₁ P_n(x) = ₂F₁(-n, n+1; 1; (1-x)/2) (Legendre) T_n(x) = ₂F₁(-n, n; 1/2; (1-x)/2) (Chebyshev) ln(1+z) = z · ₂F₁(1, 1; 2; -z) arcsin z = z · ₂F₁(1/2, 1/2; 3/2; z²) * Elliptic Integrals & Functions :dlmf19:as17: ** Incomplete elliptic integrals :dlmf19_2:as17_2: F(φ,k) = ∫_0^φ dθ/√(1 - k²sin²θ) (1st kind) E(φ,k) = ∫_0^φ √(1 - k²sin²θ) dθ (2nd kind) Π(n;φ,k) = ∫_0^φ dθ/((1-n sin²θ)√(1-k²sin²θ)) (3rd kind) ** Complete elliptic integrals :dlmf19_2:as17_3: K(k) = F(π/2, k) = ∫_0^{π/2} dθ/√(1 - k²sin²θ) E(k) = E(π/2, k) = ∫_0^{π/2} √(1 - k²sin²θ) dθ K(0)=π/2, E(0)=π/2 K(k) ~ -½ ln(1-k²) as k→1 Legendre relation: E K' + E' K - K K' = π/2 ** Series expansions :dlmf19_5:as17_3_11: K(k) = (π/2)[1 + (1/2)²k² + (1·3/(2·4))²k⁴ + ...] E(k) = (π/2)[1 - (1/2)²k²/1 - (1·3/(2·4))²k⁴/3 - ...] ** AGM relation :dlmf19_8: K(k) = π / (2 AGM(1, k')) where k' = √(1-k²) AGM(a,b): iterate a_{n+1} = (a_n+b_n)/2, b_{n+1} = √(a_n b_n) ** Jacobi elliptic functions :dlmf22_2:as16_1: sn(u,k), cn(u,k), dn(u,k) sn²u + cn²u = 1 k²sn²u + dn²u = 1 Period: 4K(k) for sn,cn; 2K(k) for dn *** Addition formulas :dlmf22_8:as16_17: sn(u+v) = (sn u cn v dn v + sn v cn u dn u) / (1 - k²sn²u sn²v) cn(u+v) = (cn u cn v - sn u dn u sn v dn v) / (1 - k²sn²u sn²v) dn(u+v) = (dn u dn v - k²sn u cn u sn v cn v) / (1 - k²sn²u sn²v) *** Derivatives :dlmf22_13:as16_16: d/du sn u = cn u dn u d/du cn u = -sn u dn u d/du dn u = -k² sn u cn u *** Limiting cases k → 0: sn → sin, cn → cos, dn → 1, K → π/2 k → 1: sn → tanh, cn → sech, dn → sech, K → ∞ ** Jacobi theta functions :dlmf20_2: *** Definitions (nome q = e^{iπτ}, |q| < 1) θ₁(z,q) = 2 Σ_{n=0}^∞ (-1)^n q^{(n+1/2)²} sin((2n+1)z) θ₂(z,q) = 2 Σ_{n=0}^∞ q^{(n+1/2)²} cos((2n+1)z) θ₃(z,q) = 1 + 2 Σ_{n=1}^∞ q^{n²} cos(2nz) θ₄(z,q) = 1 + 2 Σ_{n=1}^∞ (-1)^n q^{n²} cos(2nz) *** Quasi-periodicity θ₁(z+π) = -θ₁(z), θ₁(z+πτ) = -q⁻¹e^{-2iz} θ₁(z) θ₃(z+π) = θ₃(z), θ₃(z+πτ) = q⁻¹e^{-2iz} θ₃(z) *** Theta function at z=0 (theta constants) θ₂ = θ₂(0,q), θ₃ = θ₃(0,q), θ₄ = θ₄(0,q) θ₁'(0,q) = πθ₂θ₃θ₄ Jacobi identity: θ₃⁴ = θ₂⁴ + θ₄⁴ *** Relation to elliptic functions :dlmf22_2: k = (θ₂/θ₃)², k' = (θ₄/θ₃)² K = πθ₃²/2 sn(u) = θ₃/θ₂ · θ₁(v)/θ₄(v) where v = u/(2K/π) *** Jacobi triple product :dlmf20_5: θ₃(z,q) = Π_{n=1}^∞ (1-q^{2n})(1 + q^{2n-1}e^{2iz})(1 + q^{2n-1}e^{-2iz}) ** Modular forms (brief) :dlmf23_15: *** Dedekind eta function η(τ) = e^{iπτ/12} Π_{n=1}^∞ (1 - e^{2πinτ}) η(τ) = q^{1/24} Π_{n=1}^∞ (1-q^n) where q = e^{2πiτ} *** Modular discriminant Δ(τ) = η(τ)^{24} = q Π_{n=1}^∞ (1-q^n)^{24} *** Eisenstein series G_{2k}(τ) = Σ_{(m,n)≠(0,0)} 1/(mτ+n)^{2k} for k ≥ 2 G₄ and G₆ generate all modular forms g₂ = 60 G₄, g₃ = 140 G₆ (Weierstrass invariants) Δ = g₂³ - 27g₃² j-invariant: j(τ) = 1728 g₂³/Δ ** Weierstrass ℘-function :dlmf23_2: ℘(z) = 1/z² + Σ_{ω≠0} [1/(z-ω)² - 1/ω²] (℘')² = 4℘³ - g₂℘ - g₃ ℘(z) is doubly periodic with periods ω₁, ω₂ * Probability & Statistics ** Discrete distributions *** Binomial(n,p) P(X=k) = C(n,k) p^k (1-p)^{n-k} E[X] = np, Var(X) = np(1-p) MGF: M(t) = (pe^t + 1-p)^n *** Poisson(λ) P(X=k) = e^{-λ} λ^k / k! E[X] = λ, Var(X) = λ MGF: M(t) = exp(λ(e^t - 1)) *** Geometric(p) P(X=k) = (1-p)^{k-1} p, k=1,2,... E[X] = 1/p, Var(X) = (1-p)/p² *** Negative Binomial(r,p) P(X=k) = C(k-1,r-1) p^r (1-p)^{k-r}, k=r,r+1,... E[X] = r/p, Var(X) = r(1-p)/p² ** Continuous distributions *** Normal(μ,σ²) f(x) = (1/(σ√(2π))) exp(-(x-μ)²/(2σ²)) E[X] = μ, Var(X) = σ² MGF: M(t) = exp(μt + σ²t²/2) Φ(x) = CDF of N(0,1); Φ(-x) = 1 - Φ(x) *** Exponential(λ) f(x) = λ e^{-λx}, x ≥ 0 E[X] = 1/λ, Var(X) = 1/λ² CDF: F(x) = 1 - e^{-λx} Memoryless: P(X > s+t | X > s) = P(X > t) *** Gamma(α,β) f(x) = β^α x^{α-1} e^{-βx} / Γ(α), x > 0 E[X] = α/β, Var(X) = α/β² Includes Exponential (α=1) and χ² (α=n/2, β=1/2) *** Beta(α,β) f(x) = x^{α-1}(1-x)^{β-1} / B(α,β), x ∈ (0,1) E[X] = α/(α+β), Var(X) = αβ/((α+β)²(α+β+1)) *** Student-t(ν) f(x) = Γ((ν+1)/2)/(√(νπ)Γ(ν/2)) (1+x²/ν)^{-(ν+1)/2} E[X] = 0 (ν>1), Var(X) = ν/(ν-2) (ν>2) Approaches N(0,1) as ν→∞ *** χ²(k) f(x) = x^{k/2-1} e^{-x/2} / (2^{k/2} Γ(k/2)), x > 0 E[X] = k, Var(X) = 2k Sum of k independent N(0,1)² variables *** F(d₁,d₂) Ratio (χ²_{d₁}/d₁) / (χ²_{d₂}/d₂) E[X] = d₂/(d₂-2) for d₂ > 2 ** Concentration inequalities *** Markov P(X ≥ a) ≤ E[X]/a for X ≥ 0, a > 0 *** Chebyshev P(|X-μ| ≥ kσ) ≤ 1/k² *** Chernoff bound P(X ≥ a) ≤ inf_{t>0} e^{-ta} M_X(t) *** Hoeffding P(S_n - E[S_n] ≥ t) ≤ exp(-2t²/Σ(b_i-a_i)²) where X_i ∈ [a_i, b_i] independent, S_n = ΣX_i ** Bayesian conjugate pairs Likelihood → Prior → Posterior: Bernoulli → Beta(α,β) → Beta(α+Σx, β+n-Σx) Poisson → Gamma(α,β) → Gamma(α+Σx, β+n) Normal (known σ²) → Normal(μ₀,σ₀²) → Normal(weighted mean, ...) Normal (known μ) → Inverse-Gamma → Inverse-Gamma Multinomial → Dirichlet → Dirichlet ** Multivariate normal :stats: *** Definition X ~ N(μ, Σ) where μ ∈ ℝⁿ, Σ is n×n positive definite f(x) = (2π)^{-n/2} |Σ|^{-1/2} exp(-½(x-μ)^T Σ^{-1} (x-μ)) *** Properties Marginals are normal: X_i ~ N(μ_i, Σ_{ii}) Conditionals are normal: X₁|X₂=x₂ ~ N(μ₁ + Σ₁₂Σ₂₂⁻¹(x₂-μ₂), Σ₁₁ - Σ₁₂Σ₂₂⁻¹Σ₂₁) Affine transform: AX + b ~ N(Aμ+b, AΣA^T) Uncorrelated ⟹ independent (only for multivariate normal) *** Mahalanobis distance d²(x) = (x-μ)^T Σ^{-1} (x-μ) d²(X) ~ χ²(n) when X ~ N(μ,Σ) ** Fisher information & estimation :stats: *** Score function s(θ) = ∂/∂θ ln f(x;θ) E[s(θ)] = 0 *** Fisher information I(θ) = E[s(θ)²] = -E[∂²/∂θ² ln f(x;θ)] n observations: I_n(θ) = n I(θ) for iid data Matrix form: I_{ij}(θ) = -E[∂²/∂θ_i∂θ_j ln f(x;θ)] *** Cramér-Rao lower bound Var(T) ≥ [∂/∂θ E[T]]² / I(θ) For unbiased T: Var(T) ≥ 1/I(θ) Multivariate: Cov(T) ≥ I(θ)⁻¹ (matrix inequality) Efficiency: T is efficient if it attains the bound *** Sufficient statistics (Fisher-Neyman) T(X) sufficient for θ iff f(x;θ) = g(T(x),θ) h(x) ** Asymptotic theory :stats: *** Central limit theorem √n(X̄_n - μ)/σ →_d N(0,1) for iid X_i with E[X]=μ, Var(X)=σ² *** Multivariate CLT √n(X̄_n - μ) →_d N(0, Σ) *** Delta method If √n(T_n - θ) →_d N(0, σ²), then √n(g(T_n) - g(θ)) →_d N(0, σ²[g'(θ)]²) Multivariate: √n(g(T_n) - g(θ)) →_d N(0, ∇g^T Σ ∇g) *** Berry-Esseen bound sup_x |P(√n(X̄-μ)/σ ≤ x) - Φ(x)| ≤ Cρ/(σ³√n) where ρ = E[|X-μ|³], C ≤ 0.4748 *** MLE asymptotics θ̂_MLE →_p θ (consistent) √n(θ̂ - θ) →_d N(0, I(θ)⁻¹) (asymptotically efficient) ** Maximum entropy distributions :stats: Given constraints, max entropy dist is: Constraint E[X]=μ, X∈[a,b] → Uniform Constraint E[X]=μ, X≥0 → Exponential Constraint E[X]=μ, E[X²]=σ²+μ², X∈ℝ → Normal Constraint E[ln X]=ψ, X>0 → Gamma ** Information theory :stats: *** Entropy H(X) = -Σ p(x) ln p(x) (discrete) h(X) = -∫ f(x) ln f(x) dx (differential) H(X,Y) = H(X) + H(Y|X) (chain rule) H(X) ≤ ln|support| (max for uniform) *** KL divergence D_{KL}(P||Q) = Σ p(x) ln(p(x)/q(x)) ≥ 0 D_{KL}(P||Q) = 0 iff P = Q Not symmetric: D_{KL}(P||Q) ≠ D_{KL}(Q||P) in general *** Mutual information I(X;Y) = H(X) - H(X|Y) = H(Y) - H(Y|X) = D_{KL}(P_{XY}||P_X P_Y) I(X;Y) ≥ 0, equality iff X,Y independent * Fourier Analysis :dlmf1_14: ** Fourier series :as_fourier: f(x) = a₀/2 + Σ_{n=1}^∞ [a_n cos(nx) + b_n sin(nx)] a_n = (1/π) ∫_{-π}^π f(x) cos(nx) dx b_n = (1/π) ∫_{-π}^π f(x) sin(nx) dx Complex form: f(x) = Σ_{n=-∞}^∞ c_n e^{inx} c_n = (1/2π) ∫_{-π}^π f(x) e^{-inx} dx ** Fourier transform :dlmf1_14: F̂(ω) = ∫_{-∞}^∞ f(t) e^{-iωt} dt f(t) = (1/2π) ∫_{-∞}^∞ F̂(ω) e^{iωt} dω Note: conventions vary (2π placement, sign) ** Standard transform pairs e^{-a|t|} ↔ 2a/(a²+ω²) e^{-at²} ↔ √(π/a) e^{-ω²/(4a)} rect(t) ↔ sinc(ω/2) [sinc(x) = sin(x)/x] δ(t) ↔ 1 1 ↔ 2π δ(ω) e^{iω₀t} ↔ 2π δ(ω-ω₀) ** Convolution theorems f*g ↔ F̂·Ĝ (convolution → multiplication) f·g ↔ (1/2π) F̂*Ĝ (multiplication → convolution) ** Parseval / Plancherel :dlmf1_14: ∫ |f(t)|² dt = (1/2π) ∫ |F̂(ω)|² dω ** Sampling theorem (Shannon-Nyquist) If f is bandlimited to [-W,W]: f(t) = Σ_{n=-∞}^∞ f(n/(2W)) sinc(2W(t - n/(2W))) Minimum sample rate: 2W ** Poisson summation :dlmf1_8: Σ_{n=-∞}^∞ f(n) = Σ_{k=-∞}^∞ F̂(2πk) * Laplace & Z-Transforms ** Laplace transform :as_laplace: F(s) = ∫_0^∞ f(t) e^{-st} dt f'(t) ↔ sF(s) - f(0) f''(t) ↔ s²F(s) - sf(0) - f'(0) ∫_0^t f(τ)dτ ↔ F(s)/s e^{at}f(t) ↔ F(s-a) t^n f(t) ↔ (-1)^n F^{(n)}(s) ** Standard Laplace pairs 1 ↔ 1/s t^n ↔ n!/s^{n+1} e^{at} ↔ 1/(s-a) sin(ωt) ↔ ω/(s²+ω²) cos(ωt) ↔ s/(s²+ω²) t e^{at} ↔ 1/(s-a)² δ(t) ↔ 1 ** Z-transform X(z) = Σ_{n=0}^∞ x[n] z^{-n} Standard pairs: δ[n] ↔ 1 u[n] ↔ z/(z-1) a^n u[n] ↔ z/(z-a) n a^n u[n] ↔ az/(z-a)² ** Final/initial value theorems Laplace: lim_{t→∞} f(t) = lim_{s→0} sF(s) (if limit exists) Laplace: lim_{t→0+} f(t) = lim_{s→∞} sF(s) Z: lim_{n→∞} x[n] = lim_{z→1} (z-1)X(z) * Additional Integral Transforms ** Mellin transform M{f}(s) = ∫_0^∞ x^{s-1} f(x) dx Inverse: f(x) = (1/2πi) ∫_{c-i∞}^{c+i∞} x^{-s} M{f}(s) ds Convolution: M{f*_M g}(s) = M{f}(s) · M{g}(s) where (f *_M g)(x) = ∫_0^∞ f(x/t) g(t) dt/t *** Standard Mellin pairs e^{-x} ↔ Γ(s), Re(s) > 0 (1+x)^{-a} ↔ Γ(s)Γ(a-s)/Γ(a), 0 < Re(s) < Re(a) x^a e^{-x} ↔ Γ(s+a), Re(s+a) > 0 *** Connection to other transforms Mellin of f at s = Laplace of f(e^{-t}) at s (via x=e^{-t}) Mellin of f at s relates to Fourier of f(e^t) at Im(s) ** Hilbert transform H{f}(x) = (1/π) PV ∫_{-∞}^∞ f(t)/(x-t) dt H{H{f}} = -f (involutory up to sign) F{H{f}}(ω) = -i sgn(ω) F̂(ω) (acts as -i sgn in frequency) Parseval: ∫ f(x) H{g}(x) dx = -∫ H{f}(x) g(x) dx *** Standard Hilbert pairs H{cos ωt} = sin ωt H{sin ωt} = -cos ωt H{1/(x²+a²)} = x/(a(x²+a²)) H{χ_{[a,b]}(x)} = (1/π) ln|(x-a)/(x-b)| ** Hankel transform (Fourier-Bessel) H_ν{f}(k) = ∫_0^∞ f(r) J_ν(kr) r dr Self-reciprocal: H_ν{H_ν{f}} = f Transforms radial parts of 2D/3D Fourier transforms * Table of Definite Integrals :as_chapter5: ** Algebraic & rational ∫_0^∞ dx/(1+x²) = π/2 ∫_0^∞ x^{p-1}/(1+x) dx = π/sin(pπ), 0 < p < 1 ∫_0^∞ x^{p-1}/(1+x^n) dx = (π/n)/sin(pπ/n), 0 < p < n ∫_0^1 x^{a-1}(1-x)^{b-1} dx = B(a,b) ** Logarithmic ∫_0^1 ln x / (1-x) dx = -π²/6 = -ζ(2) ∫_0^1 ln x / (1+x) dx = -π²/12 ∫_0^∞ ln x / (1+x²) dx = 0 ∫_0^1 x^{n-1} ln^m(1/x) dx = m!/n^{m+1} ∫_0^1 ln Γ(x) dx = ½ ln(2π) ** Trigonometric definite integrals ∫_0^{π/2} sin^n x dx = ∫_0^{π/2} cos^n x dx = √π Γ((n+1)/2) / (2Γ(n/2+1)) ∫_0^π sin^n x dx = 2 ∫_0^{π/2} sin^n x dx (n even or odd) ∫_0^{2π} dθ/(a+b cos θ) = 2π/√(a²-b²), a > |b| ∫_0^∞ sin²(x)/x² dx = π/2 ∫_0^∞ sin(ax)/sinh(πx) dx = ½ tanh(a/2) ** Exponential & Gaussian ∫_0^∞ x^n e^{-ax} dx = n!/a^{n+1}, a > 0 ∫_0^∞ x^{2n} e^{-ax²} dx = (2n-1)!!/(2^{n+1} a^n) · √(π/a) ∫_0^∞ x^{2n+1} e^{-ax²} dx = n!/(2a^{n+1}) ∫_0^∞ e^{-ax²-b/x²} dx = ½√(π/a) e^{-2√(ab)}, a,b > 0 ∫_0^∞ e^{-x²} cos(2bx) dx = (√π/2) e^{-b²} ∫_{-∞}^∞ e^{-(ax²+bx+c)} dx = √(π/a) e^{(b²-4ac)/(4a)} ** Bessel-related integrals :dlmf10_22:as11_4: ∫_0^∞ J_0(ax) e^{-px} dx = 1/√(p²+a²) ∫_0^∞ J_ν(at) t^{ν+1} e^{-pt} dt = (2a)^ν Γ(ν+3/2) / (√π(p²+a²)^{ν+3/2}) ∫_0^∞ J_0(at) J_0(bt) t dt = δ(a-b)/a (orthogonality, a,b>0) Weber-Schafheitlin: ∫_0^∞ J_μ(at) J_ν(bt) t^{-λ} dt (see DLMF 10.22.63) * Differential Equations ** Standard ODE solutions *** Constant coefficients ay'' + by' + cy = 0 Characteristic eqn: ar² + br + c = 0 Distinct real roots r₁,r₂: y = C₁e^{r₁x} + C₂e^{r₂x} Repeated root r: y = (C₁ + C₂x)e^{rx} Complex r = α ± βi: y = e^{αx}(C₁cos βx + C₂sin βx) *** Euler-Cauchy equation x²y'' + bxy' + cy = 0 Try y = x^m: m(m-1) + bm + c = 0 *** Airy equation :dlmf9_2:as10_4: y'' - xy = 0 Solutions: Ai(x), Bi(x) Ai(0) = 1/(3^{2/3}Γ(2/3)), Bi(0) = 1/(3^{1/6}Γ(2/3)) ** Green's functions *** Definition Ly = f(x) where L is a linear operator G(x,ξ): LG = δ(x-ξ), then y(x) = ∫ G(x,ξ) f(ξ) dξ *** Free-space Green's functions -∇²G = δ in ℝ²: G = -ln|r|/(2π) -∇²G = δ in ℝ³: G = 1/(4π|r|) (∂_t - κ∇²)G = δ in ℝ³: G = (4πκt)^{-3/2} exp(-|r|²/(4κt)) ** Sturm-Liouville theory :dlmf1_18: d/dx[p(x)y'] + [q(x) + λw(x)]y = 0 Self-adjoint form; eigenvalues real, eigenfunctions orthogonal: ∫_a^b y_m y_n w(x) dx = 0 for m ≠ n Completeness: f(x) = Σ c_n y_n(x) with c_n = ∫ f y_n w dx / ∫ y_n² w dx ** Partial Differential Equations *** Classification (2nd order, 2 variables) Au_{xx} + 2Bu_{xy} + Cu_{yy} + ... = 0 B²-AC > 0: hyperbolic (wave-like) B²-AC = 0: parabolic (diffusion-like) B²-AC < 0: elliptic (steady-state) *** Heat equation u_t = κ ∇²u Fundamental solution (ℝⁿ): G(x,t) = (4πκt)^{-n/2} exp(-|x|²/(4κt)) Separation on [0,L]: u(x,t) = Σ B_n sin(nπx/L) exp(-κn²π²t/L²) Maximum principle: max of u on domain occurs on boundary or at t=0 *** Wave equation u_{tt} = c² ∇²u d'Alembert (1D): u(x,t) = f(x-ct) + g(x+ct) Separation on [0,L]: u = Σ [A_n cos(nπct/L) + B_n sin(nπct/L)] sin(nπx/L) Fundamental solution (3D): G = δ(|x|-ct)/(4πc²t) (sharp wavefront) Fundamental solution (2D): G = H(ct-|x|)/(2πc√(c²t²-|x|²)) (no sharp tail) *** Laplace & Poisson equations ∇²u = 0 (Laplace), ∇²u = f (Poisson) Mean value property: u(x₀) = average of u on any sphere centered at x₀ Maximum principle: harmonic functions attain extrema on boundary Separation in sphere: u(r,θ) = Σ (A_n r^n + B_n r^{-(n+1)}) P_n(cos θ) *** Helmholtz equation ∇²u + k²u = 0 Separation in cylindrical: Bessel functions J_m(kr), Y_m(kr) Separation in spherical: spherical Bessel j_n(kr), spherical harmonics Y_n^m(θ,φ) *** Schrödinger equation (time-independent) :quantum: -ℏ²/(2m) ∇²ψ + V(x)ψ = Eψ Free particle: ψ = e^{ikx}, E = ℏ²k²/(2m) Harmonic oscillator: E_n = ℏω(n+½), ψ_n ∝ H_n(ξ) e^{-ξ²/2}, ξ=x√(mω/ℏ) *** Boundary conditions Dirichlet: u = g on ∂Ω Neumann: ∂u/∂n = g on ∂Ω Robin: αu + β ∂u/∂n = g on ∂Ω Sommerfeld radiation: lim_{r→∞} r^{(n-1)/2} (∂u/∂r - iku) = 0 *** Weak formulation (variational) :fenics: Strong: -∇·(a∇u) = f in Ω, u = 0 on ∂Ω Weak: find u ∈ H¹₀(Ω) s.t. ∫ a∇u·∇v dx = ∫ fv dx ∀v ∈ H¹₀(Ω) Lax-Milgram: unique solution if bilinear form is continuous and coercive Céa's lemma: ||u-u_h|| ≤ (C/α) inf_{v_h} ||u-v_h|| * Vector Calculus & Differential Geometry ** Div, grad, curl identities *** Operator identities ∇×(∇f) = 0 (curl of gradient = 0) ∇·(∇×F) = 0 (div of curl = 0) ∇×(∇×F) = ∇(∇·F) - ∇²F ∇·(fF) = f(∇·F) + F·(∇f) ∇×(fF) = f(∇×F) + (∇f)×F ∇(F·G) = (F·∇)G + (G·∇)F + F×(∇×G) + G×(∇×F) ** Integral theorems *** Divergence (Gauss) ∫_V (∇·F) dV = ∮_S F·dA *** Stokes ∮_C F·dr = ∫_S (∇×F)·dA *** Green's theorems First: ∫_V (f∇²g + ∇f·∇g) dV = ∮_S f(∇g·n̂) dA Second: ∫_V (f∇²g - g∇²f) dV = ∮_S (f∇g - g∇f)·n̂ dA ** Coordinate systems *** Cylindrical (r,φ,z) ∇f = (∂f/∂r)r̂ + (1/r)(∂f/∂φ)φ̂ + (∂f/∂z)ẑ ∇²f = (1/r)∂/∂r(r ∂f/∂r) + (1/r²)∂²f/∂φ² + ∂²f/∂z² ∇·F = (1/r)∂(rF_r)/∂r + (1/r)∂F_φ/∂φ + ∂F_z/∂z *** Spherical (r,θ,φ) ∇f = (∂f/∂r)r̂ + (1/r)(∂f/∂θ)θ̂ + (1/(r sinθ))(∂f/∂φ)φ̂ ∇²f = (1/r²)∂/∂r(r²∂f/∂r) + (1/(r²sinθ))∂/∂θ(sinθ ∂f/∂θ) + (1/(r²sin²θ))∂²f/∂φ² ** Tensor Calculus & Index Notation *** Einstein summation convention Repeated upper/lower index implies summation: a^i b_i ≡ Σ_i a^i b_i A^i_j x^j ≡ Σ_j A^i_j x^j *** Kronecker delta & Levi-Civita δ^i_j = 1 if i=j, 0 otherwise δ^i_j δ^j_k = δ^i_k ε_{ijk} = +1 (even perm), -1 (odd perm), 0 (repeated index) ε_{ijk} ε_{ilm} = δ_{jl}δ_{km} - δ_{jm}δ_{kl} ε_{ijk} ε_{ijm} = 2δ_{km} ε_{ijk} ε_{ijk} = 6 *** Vector operations in index notation (A×B)_i = ε_{ijk} A_j B_k A·B = A_i B_i (A×B)·C = ε_{ijk} A_i B_j C_k (scalar triple product) [∇×F]_i = ε_{ijk} ∂_j F_k ∇·F = ∂_i F_i *** Metric tensor & covariant derivative ds² = g_{ij} dx^i dx^j g^{ik} g_{kj} = δ^i_j Christoffel symbols: Γ^k_{ij} = ½g^{kl}(∂_i g_{jl} + ∂_j g_{il} - ∂_l g_{ij}) Covariant derivative of vector: ∇_i V^j = ∂_i V^j + Γ^j_{ik} V^k Covariant derivative of covector: ∇_i V_j = ∂_i V_j - Γ^k_{ij} V_k Covariant derivative of tensor: ∇_k T^{ij} = ∂_k T^{ij} + Γ^i_{kl}T^{lj} + Γ^j_{kl}T^{il} *** Riemann curvature tensor R^l_{ijk} = ∂_j Γ^l_{ik} - ∂_k Γ^l_{ij} + Γ^l_{jm}Γ^m_{ik} - Γ^l_{km}Γ^m_{ij} Ricci tensor: R_{ij} = R^k_{ikj} Scalar curvature: R = g^{ij} R_{ij} Bianchi identity: ∇_l R^i_{jkm} + ∇_k R^i_{jml} + ∇_m R^i_{jlk} = 0 *** Differential forms (brief) Exterior derivative: d(dω) = 0 Stokes (general): ∫_M dω = ∫_{∂M} ω Hodge star in ℝ³: *(dx∧dy) = dz, *(dx) = dy∧dz, etc. div F = *d(*F̃), curl F = (*dF̃)^♯ where F̃ is the 1-form dual to F *** Volume elements Cartesian: dV = dx dy dz Cylindrical: dV = r dr dφ dz Spherical: dV = r² sinθ dr dθ dφ General: dV = √|g| dx¹ dx² ... dx^n where g = det(g_{ij}) * Numerical Methods ** Floating-point Arithmetic :ieee754: *** IEEE 754 basics Single (float32): 1 sign + 8 exp + 23 mantissa, ε = 2^{-23} ≈ 1.19e-7 Double (float64): 1 sign + 11 exp + 52 mantissa, ε = 2^{-52} ≈ 2.22e-16 Machine epsilon ε: smallest ε s.t. fl(1+ε) ≠ 1 *** Ranges float32: ±1.18e-38 to ±3.40e+38 float64: ±2.23e-308 to ±1.80e+308 Subnormals extend lower range at cost of precision *** Rounding model fl(a ⊕ b) = (a ⊕ b)(1+δ), |δ| ≤ ε for ⊕ ∈ {+,-,×,÷} Catastrophic cancellation: a - b when a ≈ b loses relative precision Fix: rewrite (e.g., use (a²-b²) = (a-b)(a+b), or Taylor for small args) log1p(x), expm1(x): use these instead of log(1+x), exp(x)-1 for small x *** Condition number cond(f,x) = |x f'(x)/f(x)| Relative error amplification: |Δf/f| ≈ cond(f,x) · |Δx/x| cond(A) = ||A|| · ||A⁻¹|| = σ_max/σ_min (for 2-norm) Rule of thumb: lose log₁₀(cond) decimal digits in solve ** Finite Difference Stencils *** First derivative Forward: f'(x) ≈ [f(x+h) - f(x)] / h O(h) Backward: f'(x) ≈ [f(x) - f(x-h)] / h O(h) Central: f'(x) ≈ [f(x+h) - f(x-h)] / (2h) O(h²) 4th order: f'(x) ≈ [-f(x+2h)+8f(x+h)-8f(x-h)+f(x-2h)]/(12h) O(h⁴) *** Second derivative Central: f''(x) ≈ [f(x+h) - 2f(x) + f(x-h)] / h² O(h²) 4th order: f''(x) ≈ [-f(x+2h)+16f(x+h)-30f(x)+16f(x-h)-f(x-2h)]/(12h²) O(h⁴) *** Laplacian (2D, grid spacing h) 5-point: ∇²f ≈ [f(i+1,j)+f(i-1,j)+f(i,j+1)+f(i,j-1)-4f(i,j)]/h² O(h²) 9-point: include diagonal neighbors, O(h⁴) with appropriate weights *** Optimal step size (balancing truncation vs roundoff) Forward diff: h_opt ~ ε^{1/2} ≈ 1.5e-8 (float64) Central diff: h_opt ~ ε^{1/3} ≈ 6e-6 (float64) Complex step: f'(x) ≈ Im[f(x+ih)]/h, works for any small h (no cancellation) ** Interpolation *** Lagrange interpolation p(x) = Σ_{i=0}^n y_i Π_{j≠i} (x-x_j)/(x_i-x_j) Error: f(x)-p(x) = f^{(n+1)}(ξ)/(n+1)! · Π(x-x_i) *** Newton divided differences p(x) = f[x₀] + f[x₀,x₁](x-x₀) + f[x₀,x₁,x₂](x-x₀)(x-x₁) + ... f[x_i,...,x_{i+k}] = (f[x_{i+1},...,x_{i+k}] - f[x_i,...,x_{i+k-1}]) / (x_{i+k}-x_i) *** Runge phenomenon Equispaced nodes on [-1,1]: interpolation error grows near endpoints Fix: Chebyshev nodes x_k = cos((2k+1)π/(2n+2)), k=0,...,n Chebyshev gives near-optimal |Π(x-x_i)| bound: 2^{-n} *** Cubic spline Piecewise cubic, C² continuous Natural: S''(a)=S''(b)=0 Not-a-knot: S''' continuous at x₁ and x_{n-1} Error: O(h⁴) for natural spline with smooth f ** Quadrature *** Newton-Cotes Trapezoidal: ∫_a^b f dx ≈ h[f(a)/2 + Σ f(a+kh) + f(b)/2], error O(h²) Simpson's: ∫_a^b f dx ≈ (h/3)[f₀ + 4f₁ + 2f₂ + 4f₃ + ... + f_n], error O(h⁴) Simpson's 3/8: (3h/8)[f₀ + 3f₁ + 3f₂ + 2f₃ + 3f₄ + ...], error O(h⁴) *** Gaussian quadrature ∫_{-1}^1 f(x) dx ≈ Σ_{i=1}^n w_i f(x_i) Exact for polynomials of degree ≤ 2n-1 Nodes x_i are zeros of P_n(x) (Legendre) Gauss-Laguerre: weight e^{-x} on [0,∞) Gauss-Hermite: weight e^{-x²} on (-∞,∞) *** Low-order Gauss-Legendre nodes & weights n=1: x=0, w=2 n=2: x=±1/√3, w=1 n=3: x=0,±√(3/5), w=8/9, 5/9 *** Romberg integration (Richardson extrapolation) T(h), T(h/2), ... from trapezoidal rule R_{k+1} = (4^k R_k(h/2) - R_k(h)) / (4^k - 1) Successively eliminates error terms: O(h²)→O(h⁴)→O(h⁶)→... *** Adaptive quadrature Compare Q(h) and Q(h/2); subdivide where |Q(h)-Q(h/2)| > tol Gauss-Kronrod: embed n-point Gauss in (2n+1)-point rule for error est ** Root-finding *** Newton's method x_{n+1} = x_n - f(x_n)/f'(x_n) Convergence: quadratic near simple root Modified for multiple roots: x_{n+1} = x_n - m·f(x_n)/f'(x_n) *** Secant method x_{n+1} = x_n - f(x_n)(x_n - x_{n-1})/(f(x_n) - f(x_{n-1})) Convergence order: golden ratio φ ≈ 1.618 *** Bisection Always converges, linear rate, gain 1 bit per step After k steps: interval width = (b-a)/2^k *** Brent's method Combines bisection, secant, inverse quadratic interpolation Guaranteed convergence with superlinear speed in practice ** Iterative Linear Solvers *** Conjugate gradient (CG) For A symmetric positive definite: Ax = b Convergence: ||e_k||_A ≤ 2((√κ-1)/(√κ+1))^k ||e_0||_A where κ=cond(A) With preconditioner M: solve M⁻¹Ax = M⁻¹b, effective κ = cond(M⁻¹A) Cost per iteration: one matrix-vector multiply + O(n) *** GMRES For general (nonsymmetric) systems Minimizes ||b-Ax_k|| over Krylov subspace K_k(A,r₀) No short recurrence: storage grows with iteration count Restart after m steps (GMRES(m)) to bound memory *** Preconditioning strategies Jacobi: M = diag(A), cheap, often weak ILU(0): incomplete LU, good general-purpose Algebraic multigrid (AMG): near-optimal for elliptic PDEs Rule of thumb: good preconditioner makes κ(M⁻¹A) = O(1) or O(log n) ** Numerical Linear Algebra *** Factorization costs (n×n dense) LU: (2/3)n³ flops Cholesky: (1/3)n³ flops (SPD only) QR (Householder): (4/3)n³ flops SVD: ~11n³ flops Eigenvalues (symmetric): ~(4/3)n³ flops (QR algorithm) *** Sparse direct solvers Band matrix (bandwidth b): O(nb²) 2D FEM (n unknowns): O(n^{3/2}) fill-in with nested dissection 3D FEM: O(n²) fill-in — often prefer iterative *** Stability Backward stability: computed x̂ solves (A+δA)x̂ = b+δb with ||δA||/||A|| = O(ε) Partial pivoting (PA=LU): backward stable in practice Normal equations (A^TAx = A^Tb): cond² — avoid; use QR or SVD instead ** ODE Solvers *** Euler (explicit) y_{n+1} = y_n + h f(t_n, y_n) Error: O(h), 1 function eval/step *** RK4 (classical) k₁ = f(t, y) k₂ = f(t+h/2, y+hk₁/2) k₃ = f(t+h/2, y+hk₂/2) k₄ = f(t+h, y+hk₃) y_{n+1} = y_n + (h/6)(k₁+2k₂+2k₃+k₄) Error: O(h⁴), 4 evals/step *** Dormand-Prince (RK45) Embedded 4th/5th order pair for adaptive stepping Default in most ODE libraries (e.g., ode45, DOP853) Local error est from difference of 4th and 5th order *** BDF (backward differentiation formulas) Implicit, A-stable (BDF1,BDF2), good for stiff problems BDF1 (backward Euler): y_{n+1} = y_n + h f(t_{n+1}, y_{n+1}) BDF2: y_{n+1} = (4/3)y_n - (1/3)y_{n-1} + (2h/3)f(t_{n+1}, y_{n+1}) BDF≥7 unstable; BDF3-6 A(α)-stable *** Stiffness detection (rule of thumb) Stiff if max|Re(λ)|/min|Re(λ)| >> 1 for Jacobian eigenvalues Stiff → use implicit (BDF, implicit RK, SDIRK) Non-stiff → use explicit (RK45, Adams-Bashforth) *** Symplectic integrators (Hamiltonian systems) Störmer-Verlet (leapfrog): O(h²), preserves phase-space volume q_{n+½} = q_n + (h/2)p_n/m p_{n+1} = p_n + h F(q_{n+½}) q_{n+1} = q_{n+½} + (h/2)p_{n+1}/m Energy error bounded (no drift), crucial for long-time integration ** FEM Basics :fenics: *** Standard element families Lagrange P_k: continuous, piecewise degree-k polynomials P1 (linear): 3 DOF/triangle, 4 DOF/tet P2 (quadratic): 6 DOF/triangle, 10 DOF/tet Convergence: ||u-u_h||_{L²} = O(h^{k+1}), ||u-u_h||_{H¹} = O(h^k) *** Assembly pattern K_{IJ} = Σ_e ∫_{Ω_e} a(x) ∇φ_I · ∇φ_J dx (stiffness) F_I = Σ_e ∫_{Ω_e} f(x) φ_I dx (load) Map to reference element, use quadrature * Statistical Tables ** Normal distribution (two-sided z_α) α=0.10: z=1.645 α=0.05: z=1.960 α=0.02: z=2.326 α=0.01: z=2.576 α=0.001: z=3.291 Quick: P(|Z|>1)≈0.317, P(|Z|>2)≈0.046, P(|Z|>3)≈0.0027 ** Normal tail probabilities (one-sided) P(Z>1.0) = 0.1587 P(Z>1.5) = 0.0668 P(Z>2.0) = 0.0228 P(Z>2.5) = 0.0062 P(Z>3.0) = 0.0013 P(Z>4.0) = 3.17e-5 P(Z>5.0) = 2.87e-7 Quick approximation: P(Z>x) ≈ φ(x)/x for large x, φ = density ** Student-t critical values (two-tailed) ν\α 0.10 0.05 0.01 1 6.314 12.706 63.657 2 2.920 4.303 9.925 3 2.353 3.182 5.841 5 2.015 2.571 4.032 10 1.812 2.228 3.169 20 1.725 2.086 2.845 30 1.697 2.042 2.750 60 1.671 2.000 2.660 120 1.658 1.980 2.617 ∞ 1.645 1.960 2.576 ** χ² critical values (upper tail α) ν\α 0.10 0.05 0.01 1 2.706 3.841 6.635 2 4.605 5.991 9.210 3 6.251 7.815 11.345 5 9.236 11.070 15.086 10 15.987 18.307 23.209 20 28.412 31.410 37.566 30 40.256 43.773 50.892 Quick: for large ν, χ²_α ≈ ν(1 - 2/(9ν) + z_α√(2/(9ν)))³ ** F-distribution critical values (α=0.05) F_{d1,d2}: d1\d2 5 10 20 ∞ 1 6.608 4.965 4.351 3.842 2 5.786 4.103 3.493 2.996 5 5.050 3.326 2.711 2.214 10 4.735 2.978 2.348 1.831 20 4.558 2.774 2.124 1.571 ∞ 4.365 2.538 1.843 1.000 ** Kolmogorov-Smirnov critical values D_α for n observations (two-sided): α=0.10: D = 1.224/√n α=0.05: D = 1.358/√n α=0.01: D = 1.628/√n ** Correlation significance (two-tailed, α=0.05) Test: t = r√(n-2)/√(1-r²) with ν=n-2 Quick critical |r| values: n=10: 0.632, n=20: 0.444, n=30: 0.361 n=50: 0.279, n=100: 0.197, n=200: 0.139 * Series Convergence Tests ** Ratio test L = lim |a_{n+1}/a_n| L < 1: converges absolutely L > 1: diverges L = 1: inconclusive ** Root test L = lim sup |a_n|^{1/n} Same criteria as ratio test; sometimes stronger ** Comparison test 0 ≤ a_n ≤ b_n and Σb_n converges ⟹ Σa_n converges Limit comparison: lim a_n/b_n = c > 0 ⟹ both converge or both diverge ** Integral test f(x) ≥ 0 decreasing: Σ f(n) converges iff ∫_1^∞ f(x)dx converges Remainder bound: ∫_{n+1}^∞ f(x)dx ≤ R_n ≤ ∫_n^∞ f(x)dx ** Alternating series test (Leibniz) Σ(-1)^n b_n with b_n > 0, b_n decreasing, b_n → 0: converges Error bound: |R_n| ≤ b_{n+1} ** p-series Σ 1/n^p: converges for p > 1, diverges for p ≤ 1 ** Absolute vs conditional Absolute convergence ⟹ convergence (not converse) Riemann rearrangement: conditionally convergent series can be rearranged to sum to any value (or diverge) ** Radius of convergence R = 1/lim sup |a_n|^{1/n} = lim |a_n/a_{n+1}| (when limit exists) Power series converges absolutely for |z| < R, diverges for |z| > R * Quick Reference & Back-of-Envelope ** Small-angle & common approximations sin x ≈ x - x³/6 (|x| < 0.5: error < 3e-4) cos x ≈ 1 - x²/2 (|x| < 0.5: error < 3e-3) tan x ≈ x + x³/3 (|x| < 0.5) e^x ≈ 1 + x + x²/2 (|x| < 0.5: error < 2e-2) ln(1+x) ≈ x - x²/2 (|x| < 0.5) (1+x)^n ≈ 1 + nx (|nx| << 1) √(1+x) ≈ 1 + x/2 - x²/8 (|x| < 1) 1/(1+x) ≈ 1 - x + x² (|x| < 1) ** Rule of 72 Doubling time ≈ 72 / (rate in %) At r% per period, doubles in ~72/r periods More precise: 69.3/r (continuous), 70/r (quick mental math) ** Stirling for small n (exact n! and approximation) 0!=1 1!=1 2!=2 3!=6 4!=24 5!=120 6!=720 7!=5040 8!=40320 9!=362880 10!=3628800 12!=479001600 15!=1.307e12 20!=2.432e18 Stirling error: n! = √(2πn)(n/e)^n · e^{θ/(12n)}, 0<θ<1 ** Powers of 2 2⁰=1 2¹=2 2²=4 2³=8 2⁴=16 2⁵=32 2⁶=64 2⁷=128 2⁸=256 2⁹=512 2¹⁰=1024 2¹¹=2048 2¹²=4096 2¹⁶=65536 2²⁰=1048576≈10⁶ 2³⁰≈10⁹ 2³²≈4.29×10⁹ 2⁴⁰≈10¹² 2⁵⁰≈10¹⁵ 2⁶⁴≈1.84×10¹⁹ Rule: 2¹⁰ ≈ 10³ (1024 ≈ 1000, error ~2.4%) ** Powers of 10 and logs log₁₀(2) = 0.30103 log₁₀(3) = 0.47712 log₁₀(7) = 0.84510 ln(2) = 0.6931 ln(3) = 1.0986 ln(5) = 1.6094 ln(7) = 1.9459 ln(10) = 2.3026 Number of digits of n: ⌊log₁₀(n)⌋ + 1 Number of bits of n: ⌊log₂(n)⌋ + 1 ** Small primes & prime-counting 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 π(10)=4, π(100)=25, π(1000)=168, π(10⁴)=1229, π(10⁶)=78498 PNT: π(x) ~ x/ln(x), better: π(x) ~ li(x) ** Common Jacobians (change of variables) Polar (r,θ) → (x,y): |J| = r Cylindrical (r,φ,z) → (x,y,z): |J| = r Spherical (r,θ,φ) → (x,y,z): |J| = r² sinθ u=x+y, v=x-y → (x,y): |J| = ½ u=xy, v=x/y → (x,y): |J| = 1/(2v) [or equivalently |∂(x,y)/∂(u,v)| = 1/(2v)] ** Algorithm complexity (common operations) *** Sorting Comparison-based lower bound: Ω(n log n) Merge sort: O(n log n) always, O(n) extra space Quicksort: O(n log n) average, O(n²) worst Heapsort: O(n log n) worst, in-place Radix sort: O(nk) for k-digit keys (not comparison-based) *** Searching Binary search (sorted array): O(log n) Hash table lookup: O(1) average, O(n) worst Balanced BST (AVL, red-black): O(log n) *** Matrix operations Dense multiply (n×n): O(n³), Strassen O(n^{2.81}), best known O(n^{2.37}) Dense solve (LU): O(n³) Dense SVD: O(n³) Sparse multiply (m nonzeros): O(m) FFT: O(n log n) Matrix-vector (sparse, m nonzeros): O(m) ** Dimensional analysis (Buckingham π theorem) n variables, k independent dimensions → n-k dimensionless groups Procedure: choose k repeating variables, form π groups with remaining All physical laws expressible in terms of dimensionless π groups ** Probability rules of thumb Normal 68-95-99.7 rule: P(|X-μ| < kσ) for k=1,2,3 Poisson: if λ>20, approximate by N(λ,λ) Binomial: if np>5 and n(1-p)>5, approximate by N(np, np(1-p)) Sample size for proportion: n ≈ (z/ε)² p(1-p); conservative p=0.5: n ≈ (z/(2ε))² Sample size for mean: n ≈ (zσ/ε)² * Constants & Conversions ** Mathematical constants π = 3.14159 26535 89793 23846... e = 2.71828 18284 59045 23536... γ = 0.57721 56649 01532 86060... (Euler-Mascheroni) φ = 1.61803 39887 49894 84820... (golden ratio, (1+√5)/2) √2 = 1.41421 35623 73095 04880... √3 = 1.73205 08075 68877 29353... √5 = 2.23606 79774 99789 69640... ln 2 = 0.69314 71805 59945 30941... ln 10 = 2.30258 50929 94045 68402... log₁₀(e) = 0.43429 44819 03251 82765... Catalan G = 0.91596 55941 77219 01505... Apéry ζ(3) = 1.20205 69031 59594 28540... ** Powers of π π² = 9.86960 44010 89358... π³ = 31.00627 66802 99820... π⁴ = 97.40909 10340 02437... 1/π = 0.31830 98861 83790 67154... √π = 1.77245 38509 05516 02730... 2π = 6.28318 53071 79586 47692... π/2 = 1.57079 63267 94896 61923... π/4 = 0.78539 81633 97448 30961... ** Trigonometric exact values sin(π/6) = 1/2 cos(π/6) = √3/2 tan(π/6) = 1/√3 sin(π/4) = √2/2 cos(π/4) = √2/2 tan(π/4) = 1 sin(π/3) = √3/2 cos(π/3) = 1/2 tan(π/3) = √3 sin(π/12) = (√6-√2)/4 cos(π/12) = (√6+√2)/4 sin(π/5) = √(10-2√5)/4 cos(π/5) = (1+√5)/4 sin(π/8) = √(2-√2)/2 cos(π/8) = √(2+√2)/2 ** Degrees ↔ radians 1° = π/180 ≈ 0.01745 rad 1 rad = 180/π ≈ 57.296° 30°=π/6 45°=π/4 60°=π/3 90°=π/2 180°=π 360°=2π ** Unit conversions (for dimensional analysis) 1 inch = 2.54 cm (exact) 1 mile = 1.60934 km 1 lb = 0.45359 kg 1 gallon (US) = 3.78541 L °C = (°F - 32) × 5/9 1 atm = 101325 Pa = 760 mmHg 1 eV = 1.60218e-19 J 1 cal = 4.184 J (exact, thermochemical)
Ara / アラ