In
Surely You're Joking, Mr. Feynman!, Richard Feynman mentions a useful technique he used for evaluating integrals, namely taking the
derivative under the integral sign. I will show here how this trick works in calculating the Gaussian integral of an error function. Averages over Gaussian distributions are omnipresent in physics, and the error function is just the primitive of the Gaussian, making the calculations relatively easy (and the result quite elegant.) Nevertheless, Mathematica (version 8) cannot perform this integral, and I could not find it in
Gradshteyn & Ryzhik. I needed it to describe the interaction of a phase front with an external field, see the paper
here.
Let us define:
I(α,β,γ)=∫∞−∞dxexp(−αx2)erf(βx+γ)
with
α,βandγ real and
α positive. For
γ=0 the integrand is an odd function, so
I(α,β,0)=0. We can also estimate
I′(γ)=∂∂γI(α,β,γ)=2√π∫∞−∞dxexp(−αx2)exp[−(βx+γ)2]
which is a simple Gaussian integral:
I′(γ)=2√α+β2exp(−αγ2α+β2)
Finally,
I(α,β,γ)=∫γ0duI′(u)=√βπαerf(γ√βαα+β2)
The reader can check that all derivatives exist and all integrals converge. What happens if we replace the linear term in the error function by a quadratic one?
Is there an analytical solution if the integral is over minus infinity to zero? Can you share the steps?
ReplyDeleteGreat blog, I enjoyed reading it
ReplyDeleteThis is an interesting application of calculus to solve for Gaussian distributions.
ReplyDelete