math

the identities i reach for mid-derivation so i don't drop a sign or a stray factor. no intro-course stuff.

jump to matrix calculus · index notation · vector calculus · gaussian integrals · complex analysis · asymptotics

matrix calculus

denominator layout, so $\partial(\text{scalar})/\partial\mathbf{x}$ is a column vector.

  • $\frac{\partial\operatorname{tr}(X^\top AX)}{\partial X} = (A + A^\top)X$
  • $\frac{\partial\ln\det X}{\partial X} = (X^{-1})^\top$ and $\frac{\partial\det X}{\partial X} = \det X\,(X^{-1})^\top$
  • the differential of an inverse is $d(X^{-1}) = -X^{-1}(dX)X^{-1}$

index notation

  • $\varepsilon_{ijk}\varepsilon_{ilm} = \delta_{jl}\delta_{km} - \delta_{jm}\delta_{kl}$ (the one worth memorizing)
  • $\varepsilon_{ijk}\varepsilon_{ijl} = 2\delta_{kl}$ and $\varepsilon_{ijk}\varepsilon_{ijk} = 6$

vector calculus

  • $\nabla(\mathbf{A}\cdot\mathbf{B}) = (\mathbf{A}\cdot\nabla)\mathbf{B} + (\mathbf{B}\cdot\nabla)\mathbf{A} + \mathbf{A}\times(\nabla\times\mathbf{B}) + \mathbf{B}\times(\nabla\times\mathbf{A})$
  • $\nabla\times(\mathbf{A}\times\mathbf{B}) = \mathbf{A}(\nabla\cdot\mathbf{B}) - \mathbf{B}(\nabla\cdot\mathbf{A}) + (\mathbf{B}\cdot\nabla)\mathbf{A} - (\mathbf{A}\cdot\nabla)\mathbf{B}$

gaussian integrals

  • the moments are $\int_{-\infty}^{\infty} x^{2n}e^{-ax^2}\,dx = \sqrt{\pi/a}\,\frac{(2n-1)!!}{(2a)^n}$
  • in $n$ dimensions, with $A$ symmetric positive-definite,
\int e^{-\frac12\mathbf{x}^\top A\mathbf{x} + \mathbf{b}^\top\mathbf{x}}\,d^n\mathbf{x} = \sqrt{\frac{(2\pi)^n}{\det A}}\;e^{\frac12\mathbf{b}^\top A^{-1}\mathbf{b}}

complex analysis

  • at a pole of order $m$, $\operatorname{Res}(f, z_0) = \frac{1}{(m-1)!}\lim_{z\to z_0}\frac{d^{m-1}}{dz^{m-1}}\big[(z - z_0)^m f(z)\big]$
  • for a quotient at a simple zero of $h$, $\operatorname{Res}(g/h, z_0) = g(z_0)/h'(z_0)$
  • jordan's lemma says that for $\int f(x)\,e^{iax}\,dx$ with $a > 0$, you close in the upper half-plane if $f \to 0$ there

asymptotics & special

  • stirling gives $n! \approx \sqrt{2\pi n}\,(n/e)^n$ and $\ln n! \approx n\ln n - n + \frac12\ln(2\pi n)$
  • gamma's reflection formula is $\Gamma(z)\Gamma(1-z) = \pi/\sin(\pi z)$, which gives $\Gamma(\tfrac12) = \sqrt{\pi}$
  • laplace's method (saddle point) gives $\int e^{Mf(x)}\,dx \approx e^{Mf(x_0)}\sqrt{\frac{2\pi}{M\,|f''(x_0)|}}$, with the maximum at $x_0$