User:EverettYou/Approximate Integrals

Conner Rounded Square Wave
Conner rounded square wave can be given by the function
 * $$S_\alpha(x)=\mathrm{Re}\;\mathrm{arctan}(\alpha e^{ix}).$$

The period of the function is 2π. Parameter α controls the shape: α→0, gives sine wave (with amplitude ~ α); α→1 (from below), gives square wave (with amplitude ~ π/4). Intermediate α provides conner rounded square wave. Note that α>1 will introduce discontinuity at x = ±π/2, and α→∞ also gives square wave (but with amplitude ~ π/2).

Error function

 * $$\mathrm{erf}(x) \equiv \frac{2}{\sqrt{\pi}}\int_0^x dz e^{-z^2} \approx\sgn(x) \sqrt{1-\exp\left(-x^2\frac{4/\pi+ax^2}{1+ax^2}\right)}$$

where
 * $$a = \frac{8(\pi-3)}{3\pi(4-\pi)} \approx 0.140012.$$

The range of approximation and the precision are not reported; the fitting may take place in vicinity of the real axis. This is designed to be very accurate in a neighborhood of 0 and a neighborhood of infinity, and the error is less than 0.00035 for all real x. Using the alternate value a ≈ 0.14784 reduces the maximum error to about 0.000104.

Cooper instability function

 * $$\int_0^x \frac{dz}{z}\mathrm{tanh}\;z \approx \mathrm{arcsinh}\;x + \ln\left(\frac{2e^\gamma}{\pi}\right)\frac{\sgn(x)x^2}{2+x^2}$$,

where γ stands for the Euler gamma constant. The maximal error is around x = 0.63, and is controlled below 1.73%. To derive the first term, note that
 * $$\frac{\mathrm{tanh}z}{z}\approx\frac{1}{\sqrt{1+z^2}}$$.

Take this approximation and carry out the integral, one obtain the first term in the approximate formula. The second term is put in by hand to converge the result to the exact integral in the large x limit.

Integral of Monomials over Sphere
Let $\boldsymbol{x}=(x_1,x_2,\cdots,x_n)$ be a $n$-component unit vector (i.e. $\boldsymbol{x}^2=1$) on the unit sphere $S^{n-1}$. The integral of monomials of $x_i$ over the sphere is given by $$\int_{S^{n-1}}\prod_{i=1}^{n}x_i^{m_i}=\frac{\prod_{i=1}^n(m_i-1)!!(n-2)!!}{(\sum_{i=1}^n m_i+n-2)!!},$$ if all exponents $m_i$ are even. The integral is 0 by symmetry if any exponent $m_i$ is odd. Here $n!!$ denotes the double factorial of $n$.

Fourier Transform of Power Functions
See Regularization and Renormalization

Series
1. Expansion of x
 * $$e^{\frac{a}{2}(x+1/x)}=\sum _{n=-\infty }^{\infty } I_n(a) x^n$$.

$$I_n$$ stands for the modified Bessel function of the first kind.