How can one evaluate the following integral?

$$\int_{-c}^{c} e^{-ax^2}\cos^2(bx) \,\mathrm{d}x$$

Wolfram Alpha gives this. Is there not a more compact form?

If $\int_{-c}^{c} e^{-ax^2} \, \mathrm{d}x=k$, then can we express the first integral in terms of $k$? Thanks.

  • $\begingroup$ Your k is essentially erf, and erfi is defined in terms of erf, so when WolframAlpha represents the answer in terms of erf and erfi, it is essentially representing it in terms of your k. $\endgroup$ – tzs Oct 16 '11 at 14:13
  • $\begingroup$ @tzs: Thanks. I am not too familiar with erfs and erfis. What would the integral be then when written in $k$? $\endgroup$ – greg Oct 16 '11 at 14:14
  • $\begingroup$ For a start, you would have $\text{Erf}[\sqrt{a} c] =k\sqrt{\frac{a}{\pi}}$ $\endgroup$ – Henry Oct 16 '11 at 14:30
  • $\begingroup$ @Henry: Thanks. How do we deal with the erfi's? $\endgroup$ – greg Oct 16 '11 at 14:33
  • $\begingroup$ $\text{erfi}(x) = -i \text{erf}(ix)$ $\endgroup$ – Robert Israel Oct 16 '11 at 21:15

How can one integrate $\int_{-c}^{c} e^{-ax^2}\cos^2(bx) \,\mathrm{d}x$?

Write $$\cos^2(bx)=\frac12(1+\cos(2bx))=\frac12+\frac14 e^{2b i x}+\frac14 e^{-2b i x}\tag1$$ Then $$e^{-ax^2}\cos^2(bx) =\frac12e^{-ax^2}+ \frac14 e^{-ax^2+2b i x}+\frac14 e^{-ax^2-2b i x}\tag2$$ With appropriate substitutions, the matter reduces to integration of $\exp(-t^2)$, which yields the error function. Of course, this is what WA already did for you.

If $\int_{-c}^{c} e^{-ax^2} \, \mathrm{d}x=k$, then can we express the first integral in terms of $k$?

No, because the integral of a product is not the product of integrals... But it is true that $$ \lim_{b\to\infty} \int_{-c}^{c} e^{-ax^2}\cos^2(bx) \,\mathrm{d}x =\frac{k}{2}\tag3$$ because the highly oscillatory terms $e^{\pm 2b i x} $ in (1) contribute little when $b$ is large. See the Riemann-Lebesgue lemma.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.