## Evaluate the Integral $$\int_{0}^{1} \mathrm{e}^{-x^{4}} (1-x^{4}) dx$$

How to evaluate

\int\limits_{0}^{1} \mathrm{e}^{-x^{4}} (1-x^{4}) dx

was a question posed at Mathematics Stack Exchange. Here is my solution.

Let $$y=x^{4}$$

\int\limits_{0}^{1} \mathrm{e}^{-x^{4}} dx = \frac{1}{4} \int\limits_{0}^{1} \mathrm{e}^{-y} y^{-3/4} dy
= \frac{1}{4} \gamma\left(\frac{1}{4},1 \right)

Using the same substitution, we also have

\int\limits_{0}^{1} \mathrm{e}^{-x^{4}} x^{4} dx = \frac{1}{4} \int\limits_{0}^{1} \mathrm{e}^{-y} y^{1/4} dy
= \frac{1}{4} \gamma\left(\frac{5}{4},1 \right)

Thus we obtain

\int\limits_{0}^{1} \mathrm{e}^{-x^{4}} (1-x^{4}) dx
= \frac{1}{4} \Big[ \gamma\left(\frac{1}{4},1 \right) – \gamma\left(\frac{5}{4},1 \right) \Big]
\approx 0.7256

We have used the lower incomplete gamma function:

\gamma(s,z) = \int\limits_{0}^{z} \mathrm{e}^{-x} x^{s-1} dx

## Generalized Fresnel Integrals

The generalized fresnel integrals, also known as Böhmer’s integrals, appear in Volume 2 of Higher Transcendental Functions (Bateman Manuscript), Section 9.10, Equations 1 and 2:

\begin{align}
\tag{1a}
\label{eq:gfi-1a}
\mathrm{C}(x,a) &= \int\limits_{x}^{\infty} t^{a-1} \cos(t) \mathrm{d}t \\
\tag{1b}
\label{eq:gfi-1b}
&= \int\limits_{x}^{\infty} t^{a-1}\, \frac{\mathrm{e}^{it}+\mathrm{e}^{-it}}{2} \mathrm{d}t \\
&= \frac{1}{2} \Big[\mathrm{e}^{i\frac{\pi}{2}a} \Gamma(a,-ix) + \mathrm{e}^{-i\frac{\pi}{2}a} \Gamma(a,ix) \Big]
\tag{1c}
\label{eq:gfi-1c}
\end{align}

\begin{align}
\tag{2a}
\label{eq:gfi-2a}
\mathrm{S}(x,a) &= \int\limits_{x}^{\infty} t^{a-1} \sin(t) \mathrm{d}t \\
\tag{2b}
\label{eq:gfi-2b}
&= \int\limits_{x}^{\infty} t^{a-1}\, \frac{\mathrm{e}^{it}-\mathrm{e}^{-it}}{i2} \mathrm{d}t \\
&= \frac{1}{i2} \Big[\mathrm{e}^{i\frac{\pi}{2}a} \Gamma(a,-ix) – \mathrm{e}^{-i\frac{\pi}{2}a} \Gamma(a,ix) \Big]
\tag{2c}
\label{eq:gfi-2c}
\end{align}

To derive these results, we require a result from Volume 1 of Higher Transcendental Functions (Bateman Manuscript), Section 1.5.1:

Next consider $$\int_{C} z^{a-1} \mathrm{e}^{cz} \mathrm{d}z$$ where the contour C consists of the real axis from $$+\epsilon$$ to +R, the arc of the circle $$z=R\mathrm{e}^{i\phi}$$ from $$\phi = 0$$ to $$\phi = \beta \,\, (-\pi /2 \leq \beta \leq \pi /2)$$, the straight line from $$z=R\mathrm{e}^{i\beta}$$ to $$\epsilon \mathrm{e}^{i\beta}$$, and the arc of the circle $$z=\epsilon \mathrm{e}^{i\phi}$$ from $$\phi = \beta$$ to $$\phi = 0$$. Since the value of the contour integral is zero, on making $$\epsilon \to 0$$ and $$R \to \infty$$ it follows that

\int\limits_{0}^{\infty} t^{a-1} \mathrm{e}^{-ct\cos(\beta)\,-ict\sin(\beta)} \mathrm{d}t
= \Gamma(a) c^{-a} \mathrm{e}^{-ia\beta}
\tag{3}
\label{eq:gfi-3}

for

-\frac{1}{2}\pi \lt \beta \lt \frac{1}{2}\pi ,\,\,\,\, \Re a \gt 0,\,\, \mathrm{or} \,\,\, \beta = \pm \frac{1}{2}\pi ,\,\,\,\, 0 \lt \Re a \lt 1

We begin our derivation with

\int\limits_{x}^{\infty} t^{a-1}\, \mathrm{e}^{-it} \mathrm{d}t
= \int\limits_{0}^{\infty} t^{a-1}\, \mathrm{e}^{-it} \mathrm{d}t \,- \int\limits_{0}^{x} t^{a-1}\, \mathrm{e}^{-it} \mathrm{d}t
\tag{4}
\label{eq:gfi-4}

for the first integral in equation \eqref{eq:gfi-4}, via the reference above, for $$\beta = \pi /2$$ and $$c = 1$$, equation \eqref{eq:gfi-3} becomes

\int\limits_{0}^{\infty} t^{a-1}\, \mathrm{e}^{-it} \mathrm{d}t = \Gamma(a) \mathrm{e}^{-i\frac{\pi}{2}a}
\tag{5}
\label{eq:gfi-5}

for the second integral in equation \eqref{eq:gfi-4}, we use the substitution $$y=it$$

\int\limits_{0}^{x} t^{a-1}\, \mathrm{e}^{-it} \mathrm{d}t = \frac{1}{i^{a}} \int\limits_{0}^{ix} y^{a-1}\, \mathrm{e}^{-y} \mathrm{d}y = \mathrm{e}^{-i\frac{\pi}{2}a} \gamma(a,ix)
\tag{6}
\label{eq:gfi-6}

Substituting equations \eqref{eq:gfi-5} and \eqref{eq:gfi-6} into equation \eqref{eq:gfi-4} yields

\int\limits_{x}^{\infty} t^{a-1}\, \mathrm{e}^{-it} \mathrm{d}t = \mathrm{e}^{-i\frac{\pi}{2}a} [\Gamma(a) \,-\, \gamma(a,ix)] = \mathrm{e}^{-i\frac{\pi}{2}a} \Gamma(a,ix)
\tag{7}
\label{eq:gfi-7}

Using the same arguments, beginning with substituting $$\beta = -\pi /2$$ into equation \eqref{eq:gfi-3} we have

\int\limits_{x}^{\infty} t^{a-1}\, \mathrm{e}^{it} \mathrm{d}t = \mathrm{e}^{i\frac{\pi}{2}a} [\Gamma(a) \,-\, \gamma(a,-ix)] = \mathrm{e}^{i\frac{\pi}{2}a} \Gamma(a,-ix)
\tag{8}
\label{eq:gfi-8}

Substituting equations \eqref{eq:gfi-7} and \eqref{eq:gfi-8} into equations \eqref{eq:gfi-1b} and \eqref{eq:gfi-2b} yields the generalized fresnel integrals.

Notes:

1. $$\gamma(a,x) = \int_{0}^{x} t^{a-1} \mathrm{e}^{-t} \mathrm{d}t$$ is the lower incomplete gamma function.
2. $$\Gamma(a,x) = \int_{x}^{\infty} t^{a-1} \mathrm{e}^{-t} \mathrm{d}t$$ is the upper incomplete gamma function.
3. $$\Gamma(a) = \Gamma(a,x) + \gamma(a,x)$$
4. This analysis was necessary in order to avoid difficulties when using the upper incomplete gamma function directly with the left hand sides of equations \eqref{eq:gfi-4} and \eqref{eq:gfi-8}. Doing so results, after a change in variables, in an upper limit of integration of $$i\infty$$. If one treats this as a modulus and replaces it with $$\infty$$ one obtains the correct results for the generalized fresnel integrals. However, I have not been able to justify this, thus the method presented here.

## Evaluate the Integral $$\int_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x$$

How to evaluate

\int\limits_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x
\tag{1}
\label{eq:mtc-1}

was part of a question posed at Mathematics Stack Exchange. Note that this is the Mellin transform of the indicated cosine function.

The original answer that I provided required some rather questionable steps regarding the limits of integration, so here I provide another solution that avoids such difficulties.

In Volume 2 of Higher Transcendental Functions (Bateman Manuscript), Section 9.10, Equation 1 we have a generalization of the fresnel integrals attributed to Bohmer:
\begin{align}
\mathrm{C}(x,a) &= \int\limits_{x}^{\infty} z^{a-1} \cos(z) \mathrm{d}z \\
&= \frac{1}{2} \Big[\mathrm{e}^{i\pi a/2} \Gamma(a,-ix) + \mathrm{e}^{-i\pi a/2} \Gamma(a,ix)\Big]
\end{align}

Thus

\mathrm{C}(0,a) = \int\limits_{0}^{\infty} z^{a-1} \cos(z) \mathrm{d}z
= \Gamma(a) \cos\left(\frac{\pi}{2}a\right)

For our integral, let $$z=2\pi ax$$:

\int\limits_{0}^{\infty} x^{s-1} \cos(2\pi ax) \mathrm{d}x
= (2\pi a)^{-s} \int\limits_{0}^{\infty} z^{s-1} \cos(z) \mathrm{d}z
= (2\pi a)^{-s} \Gamma(s) \cos\left(\frac{\pi}{2}s\right)

## Problems from Chapter 8 (The Normal Integral) of Irresistible Integrals by Boros and Moll

Here I present worked solutions of select problems from Chapter 8 (The Normal Integral) of Irresistible Integrals by Boros and Moll. This book has a plethora of interesting expositions and problems related to evaluating integrals. It also contains a lot of miscellaneous material that is either not related or only tangentially related to the thesis of the book. Thus I only chose problems of personal interest. Note that most of these problems can be found in Gradshteyn and Ryzhik (G & R), 5th Edition.

I will use the same designations of exercise and example as the authors.

We begin with the normal integral,

\int\limits_{0}^{\infty} \mathrm{e}^{-x^{2}} \mathrm{d} x = \frac{\sqrt{\pi}}{2}
\label{eq:ii8-1}
\tag{1}

Proof, begin with the gamma function

\Gamma(z) = \int\limits_{0}^{\infty} t^{z-1} \mathrm{e}^{-t} \mathrm{d} t
= 2\int\limits_{0}^{\infty} x^{2z-1} \mathrm{e}^{-x^{2}} \mathrm{d} x

Where we let $$t=x^{2}$$. Now let $$z=1/2$$

\Gamma\left(\frac{1}{2}\right) = \sqrt{\pi} = 2\int\limits_{0}^{\infty} \mathrm{e}^{-x^{2}} \mathrm{d} x

rearrangement yields our result.

## Exercise 8.1.2.a:

\int\limits_{0}^{\infty} x^{2n+1}\mathrm{e}^{-px^{2}} \mathrm{d} x = \frac{1}{2p^{\,n+1}}\int\limits_{0}^{\infty}z^{n}\mathrm{e}^{-z} \mathrm{d}z
= \frac{\Gamma(n+1)}{2p^{\,n+1}} = \frac{n!}{2p^{\,n+1}}

We let $$z = px^{2}$$ and $$n \in \mathbb{Z}_{0}^{+}$$ and $$p \gt 0$$.

## Exercise 8.1.2.b: (G & R) 3.461.3

\int\limits_{0}^{\infty} x^{2n}\mathrm{e}^{-px^{2}} \mathrm{d} x = \frac{1}{2p^{\,n+1/2}}\int\limits_{0}^{\infty}z^{n-1/2}\mathrm{e}^{-z} \mathrm{d}z
= \frac{\Gamma(n+1/2)}{2p^{\,n+1/2}} = \frac{(2n!)\sqrt{\pi}}{2^{2n+1}n!p^{\,n+1/2}}

with the same substitution.

## Exercise 8.3.1: (G & R) 3.321.3

\int\limits_{0}^{\infty} \mathrm{e}^{-a^{2}x^{2}} \mathrm{d} x
= \frac{1}{a}\int\limits_{0}^{\infty} \mathrm{e}^{-y^{2}} \mathrm{d} y
= \frac{\sqrt{\pi}}{2a}
\label{eq:ii8-2}
\tag{2}

letting $$x=y/a$$ and using equation \eqref{eq:ii8-1}.

## Exercise 8.3.2: (G & R) 3.323.2

\begin{align}
\tag{a}
\int\limits_{-\infty}^{\infty} \mathrm{e}^{-a^{2}x^{2}+bx} \mathrm{d} x
&= \mathrm{e}^{b^{2}/4a^{2}} \int\limits_{-\infty}^{\infty}
\mathrm{e}^{-a^{2}(x-b/2a^{2})^{2}}\mathrm{d} x \\
\tag{b}
&= \mathrm{e}^{b^{2}/4a^{2}} \int\limits_{-\infty}^{\infty} \mathrm{e}^{-a^{2}z^{2}} \mathrm{d}z \\
&= 2\mathrm{e}^{b^{2}/4a^{2}} \int\limits_{0}^{\infty} \mathrm{e}^{-a^{2}z^{2}} \mathrm{d}z \\
&= \mathrm{e}^{b^{2}/4a^{2}} \frac{\sqrt{\pi}}{a}
\tag{c}
\end{align}
a. Complete the square.
b. Let $$z=x-b/2a^{2}$$.
c. Use equation \eqref{eq:ii8-2}.

## Exercise 8.3.3: (G & R) 3.361.2

\int\limits_{-a}^{\infty} \frac{\mathrm{e}^{-bx}}{\sqrt{x+a}}\mathrm{d} x
= \mathrm{e}^{ba} \int\limits_{0}^{\infty} z^{1/2} \mathrm{e}^{-bz}\mathrm{d} z
= \mathrm{e}^{ba} \Gamma\left(\frac{1}{2}\right)\frac{1}{\sqrt{b}}
= \mathrm{e}^{ba} \sqrt{\frac{\pi}{b}}

we let $$x+a = z$$.

## Exercise 8.3.4: (G & R) 2.33

\begin{align}
\tag{a}
\int \mathrm{exp}(-(ax^{2}+2bx+c)) \mathrm{d} x
&= \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \int \mathrm{e}^{-a(x+b/a)^{2}} \mathrm{d} x \\
\tag{b}
& = \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \frac{1}{\sqrt{a}} \int \mathrm{e}^{-z^{2}} \mathrm{d}z \\
\tag{c}
&= \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{erf}(z) \\
&= \mathrm{exp}\left(\frac{b^{2}}{a}-c\right) \frac{1}{2} \sqrt{\frac{\pi}{a}} \,\mathrm{erf}\left(x\sqrt{a}+\frac{b}{\sqrt{a}}\right) + \mathrm{constant}
\label{eq:ii8-3}
\tag{3}
\end{align}
a. Complete the square.
b. Let $$z^{2} = a(x+b/a)^{2}$$
c. From the definition of the error function

\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int\limits_{0}^{x} \mathrm{exp}(-t^{2}) \mathrm{d} x

we have

\int \mathrm{exp}(-t^{2}) \mathrm{d} x = \frac{\sqrt{\pi}}{2} \mathrm{erf}(x)

Note that the book is missing the exponential term in the answer.

## Exercise 8.3.5: (G & R) 3.462.7

The first step is to use equation \eqref{eq:ii8-3}, setting $$c=0$$ and integrating from 0 to $$\infty$$

\int\limits_{0}^{\infty} \mathrm{exp}(-(ax^{2}+2bx)) \mathrm{d} x
= \frac{1}{2}\sqrt{\frac{\pi}{a}} \,\mathrm{e}^{b^{2}/a} \Big[1-\mathrm{erf}(b/\sqrt{a})\Big]

Now we differentiate both sides with respect to $$a$$

\int\limits_{0}^{\infty} x^{2}\mathrm{exp}(-(ax^{2}+2bx)) \mathrm{d} x
= -\frac{\sqrt{\pi}}{2} a^{-3/2} \mathrm{e}^{b^{2}/a} \Big[1-\mathrm{erf}(b/\sqrt{a})\Big] \left(\frac{1}{2}+\frac{b^{2}}{a} \right)
-\frac{b}{2a^{2}}

this result does match that of Boros and Moll.

## Exercise 8.3.6: (G & R) 3.468.2

\begin{align}
\tag{a}
\int\limits_{0}^{\infty} \frac{x\,\mathrm{exp}(-bx^{2})}{\sqrt{a^{2}+x^{2}}}\mathrm{d} x
&= \frac{1}{2\sqrt{b}} \int\limits_{0}^{\infty} \frac{\mathrm{e}^{-w}}{\sqrt{w+a^{2}b}}\mathrm{d}w \\
\tag{b}
&= \frac{\mathrm{exp}(a^{2}b)}{2\sqrt{b}} \int\limits_{a^{2}b}^{\infty} \mathrm{e}^{-z} z^{-1/2} \mathrm{d}z \\
\tag{c}
&= \frac{\mathrm{exp}(a^{2}b)}{2\sqrt{b}} \Gamma\left(\frac{1}{2},a^{2}b \right)
\end{align}
a. $$w=bx^{2}$$
b. $$z=w+a^{2}b$$
c.

\Gamma(a,x) = \int\limits_{x}^{\infty} t^{a-1} \mathrm{e}^{-t} \mathrm{d}t

is the upper incomplete gamma function. We also have,

\mathrm{erf}(x) = \frac{1}{x}\sqrt{x^{2}} \left(1 -\frac{1}{\sqrt{\pi}}\Gamma\left(\frac{1}{2},x^{2} \right) \right)

for $$x \gt 0$$ and $$x \in \mathbb{R}$$. So that

\Gamma\left(\frac{1}{2},x^{2} \right) = \sqrt{\pi}[1-\mathrm{erf}(x)]

and our result matches that of the book.

## Example 8.4.1: (G & R) 3.325

Prove

\int\limits_{0}^{\infty} \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x = \frac{1}{2}\sqrt{\frac{\pi}{a}}\mathrm{e}^{-2\sqrt{ab}}

Let

\mathrm{L}(a,b) := \int\limits_{0}^{\infty} \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
\label{eq:841-1}
\tag{1}

Making the substitution $$t=x\sqrt{a}$$ yields

\int\limits_{0}^{\infty} \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x = \frac{1}{\sqrt{a}} \int\limits_{0}^{\infty}
\mathrm{exp}(-t^{2}-\frac{ab}{t^{2}}) \mathrm{d} t
\label{eq:841-2}
\tag{2}

Letting $$ab=c$$ we call the integral in equation \eqref{eq:841-2} $$f(c)$$,

f(c) = \int\limits_{0}^{\infty} \mathrm{exp}(-t^{2}-\frac{c}{t^{2}}) \mathrm{d} t
\label{eq:841-3}
\tag{3}

so that

\mathrm{L}(a,b) = \frac{f(ab)}{\sqrt{a}}
\label{eq:841-4}
\tag{4}

In equation \eqref{eq:841-3} we let $$y=\sqrt{c}/t$$

f(c) = \sqrt{c} \int\limits_{0}^{\infty} \mathrm{exp}(-y^{2}-\frac{c}{y^{2}}) y^{-2} \mathrm{d} y
\label{eq:841-5}
\tag{5}

Combining equations \eqref{eq:841-3} and \eqref{eq:841-5}, we have

f(c) = \frac{1}{2} \int\limits_{0}^{\infty} \mathrm{exp}(-t^{2}-\frac{c}{t^{2}}) \left(1+\frac{\sqrt{c}}{t^{2}} \right) \mathrm{d} t
\label{eq:841-6}
\tag{6}

Now we let $$s = t – \sqrt{c}/t$$

f(c) = \frac{\mathrm{e}^{- 2\sqrt{c}}}{2} \int\limits_{-\infty}^{\infty} \mathrm{exp}(-s^{2}) \mathrm{d} s = \frac{\sqrt{\pi}}{2} \mathrm{e}^{- 2\sqrt{c}} \lim_{z \to \infty} \mathrm{erf}(z) = \frac{\sqrt{\pi}}{2} \mathrm{e}^{- 2\sqrt{c}}
\label{eq:841-7}
\tag{7}

Combining equations \eqref{eq:841-1}, \eqref{eq:841-4}, and \eqref{eq:841-7} yields our result.

I posted this solution and inquired about different solution methods at Mathematics Stack Exchange. There are two very interesting solutions there.

## Exercise 8.4.1

\begin{align}
\label{a}
\int\limits_{0}^{\infty} \mathrm{e}^{-(ax+b/x)} \frac{1}{\sqrt{x}} \mathrm{d}x
&= 2\int\limits_{0}^{\infty} \mathrm{e}^{-(ay^{2}+b/y^{2})} \mathrm{d}y \\
\label{b}
&= \sqrt{\frac{\pi}{a}} \mathrm{e}^{-2\sqrt{ab}}
\end{align}
a. $$x=y^{2}$$
b. Use the result from Example 8.4.1 above.

## Exercise 8.4.2.a

\begin{align}
\tag{a}
\int\limits_{0}^{\infty} \mathrm{exp}\left(-\mu x^{2} – \frac{a}{x^{2}}\right) – \mathrm{exp}(-\mu x^{2}) \mathrm{d}x
&= \frac{1}{2} \sqrt{\frac{\pi}{\mu}} \mathrm{e}^{-2\sqrt{a\mu}} \,-\, \frac{1}{\mu} \int\limits_{0}^{\infty} \mathrm{e}^{-z^{2}} \mathrm{d}z \\
\tag{b}
&= \frac{1}{2} \sqrt{\frac{\pi}{\mu}} \mathrm{e}^{-2\sqrt{a\mu}} \,-\, \frac{1}{2} \sqrt{\frac{\pi}{\mu}}
\end{align}
a. Use the result from Example 8.4.1 above.
b. The integral equals $$\mathrm{erf}(\infty) = 1$$.

## Exercise 8.4.2.b

Differentiate the result from Example 8.4.1 with respect to $$a$$

\int\limits_{0}^{\infty} x^{2} \, \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
= \frac{\sqrt{\pi}}{2a} \mathrm{e}^{-2\sqrt{ab}} \left( \frac{1}{2\sqrt{a}} + \sqrt{b}\right)

## Exercise 8.4.2.c

Differentiate the result from Example 8.4.1 with respect to $$b$$

\int\limits_{0}^{\infty} x^{-2} \, \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
= \frac{1}{2} \sqrt{\frac{\pi}{b}} \, \mathrm{e}^{-2\sqrt{ab}}

## Exercise 8.4.2.d

Differentiate the result from Exercise 8.4.2.c with respect to $$b$$

\int\limits_{0}^{\infty} x^{-4} \, \mathrm{exp}(-ax^{2}-\frac{b}{x^{2}}) \mathrm{d} x
= \frac{\sqrt{\pi}}{2b} \mathrm{e}^{-2\sqrt{ab}} \left( \frac{1}{2\sqrt{b}} + \sqrt{a} \right)

Note that the problems in Exercise 8.4.2 are in G & R Section 3.472.

## Convergence of $$\int_{1}^{\infty} \mathrm{e}^{-x} x^{p} \mathrm{d} x$$

The question for what values of $$p$$ does the improper integral

\int\limits_{1}^{\infty} \mathrm{e}^{-x} x^{p} \mathrm{d} x

converge was asked at Mathematics Stack Exchange.

My solution was to note that this integral can be expressed in terms of the upper incomplete Gamma function

\Gamma(a,x) = \int\limits_{x}^{\infty} \mathrm{e}^{-z} z^{a-1} \mathrm{d} z

Thus

\int\limits_{1}^{\infty} \mathrm{e}^{-x} x^{p} \mathrm{d} x = \Gamma(1+p,1)

As noted here, the upper incomplete Gamma function, $$\Gamma(a,x)$$ is an entire
function for all $$a$$ when $$x \ne 0$$. Thus the integral converges for all values
of $$p$$.