# How does one integrate for positive beta and real b ?

## Main Question or Discussion Point

How does one integrate
$$\int_0^\infty e^{-\beta x^2}\cos{(bx)} dx$$

for positive beta and real b ?

I was thinking maybe differentiation under the integral sign would do the trick, but I can't get anywhere.

Last edited:

What are you integrating with respect to?

There are several ways to solve this. Perhaps the most simple is to change the cosine function to the following:

$$cos(bx)+jsin(bx)=e^{jbx}$$

With j the imaginary unit. This gives the following integral, which you need to find the real part of, after integrating:

$$\int_{0}^{\infty} e^{-\beta x^2 +j bx}dx$$

This is fairly easy solved by making the argument of the exponential an exact square and splitting some part of afterwards. Then you can use the following to find the result:

$$\int_{0}^{\infty}e^{-t^2}dt=\frac{\sqrt{\pi}}{2}$$

As stated there are other ways, complex contour integration, and certainly other tricks. The result of this integral is real, so the taking of the real part only is obsolete, but you don't know this beforehand.

Using your method, I got to this point

$$e^{-\frac{b^2}{4\beta^2}}\int_0^\infty e^{-\beta\left(x-\frac{jb}{2\beta}\right)^2}dx$$

Now what do I do? I don't want to make the substitution

$$t=x-\frac{jb}{2\beta}$$

because then I will have an imaginary lower boundary on the integral.

Using your method, I got to this point

$$e^{-\frac{b^2}{4\beta^2}}\int_0^\infty e^{-\beta\left(x-\frac{jb}{2\beta}\right)^2}dx$$

Now what do I do? I don't want to make the substitution

$$t=x-\frac{jb}{2\beta}$$

because then I will have an imaginary lower boundary on the integral.
Very good so far, but I think you have forgotten a $\beta$ for the split of part. The square should be gone. OK, you can rewrite your result as:

$$I=\frac{e^{-\frac{b^2}{4\beta}}}{\sqrt{\beta}} \int_{0}^{\infty}e^{-\left(\sqrt{\beta}x-j\frac{b}{2\sqrt{\beta}} \right)^2}d\left(\sqrt{\beta}x- j\frac{b}{2\sqrt{\beta}} \right)$$

Can you see now the formula I gave earlier? This is actually not a decent method because we assume infinity and complex numbers can be used this way, however the result is here correct and can be applied.

Cyosis
Homework Helper

Differentiation under the integral sign is definitely a method that works.

\begin{align*} \frac{d I}{db} &= \frac{d}{db} \int_0^\infty e^{-\beta x^2} \cos (bx) dx \\ & =\int_0^\infty -x \sin (bx) e^{-\beta x^2} dx \\ &= \sin (bx) \frac{1}{2 \beta} e^{- \beta x^2} |_0^\infty - \int_0^\infty b \cos (bx) \frac{1}{2 \beta} e^{- \beta x^2} dx \\ &= -\frac{b}{2 \beta} \int_0^\infty e^{-\beta x^2} \cos (bx) dx \\ &= -\frac{b}{2 \beta} I \end{align*}

So we get the following differential equation: $$\frac{d I}{db}=-\frac{b}{2 \beta} I$$.

This differential equation is really easy to solve, just make sure you determine the constant.

Last edited:

That is a very nice method, Cyosis. Did you figure that out on our own? Is there any generality to that method of solving integrals by doing differential equations?

Cyosis
Homework Helper

Nah I didn't figure it out myself, it's a standard method I was taught to evaluate these type of integrals. It's definitely not a method that can be applied to every integral and the differential equation you end up with can be harder to solve than the integral itself. That said it's a nice method to add to your bag of integration tricks.