Integrals of Gradshteyn and Ryzhik: 3.321

We define the error function as:
\begin{equation}
\mathrm{erf}(z) = \frac{2}{\sqrt{\pi}} \int\limits_{0}^{z} \mathrm{e}^{-x^2} dx
\end{equation}

3.321.2

\begin{equation}
\int\limits_{0}^{u} \mathrm{e}^{-q^{2}x^{2}} dx = \frac{1}{q} \int\limits_{0}^{qu} \mathrm{e}^{-z^{2}} dz
= \frac{\sqrt{\pi}}{2q} \mathrm{erf}(z) \Big|_{0}^{qu}
= \frac{\sqrt{\pi}}{2q} \mathrm{erf}(qu),\,\,q \gt 0
\end{equation}
using the substitution \(z=qx\)

3.321.3

\begin{equation}
\int\limits_{0}^{\infty} \mathrm{e}^{-q^{2}x^{2}} dx = \frac{\sqrt{\pi}}{2q},\,\,q \gt 0
\end{equation}
follows from 3.321.2

3.321.4

\begin{equation}
I = \int\limits_{0}^{u} x\mathrm{e}^{-q^{2}x^{2}} dx
= \frac{\sqrt{\pi}}{2q} \,x\, \mathrm{erf}(qx) \,- \frac{\sqrt{\pi}}{2q} \int \mathrm{erf}(qx) dx
\end{equation}
using integration by parts.
\begin{align}
\int \mathrm{erf}(qx) dx &= \frac{1}{q} \int \mathrm{erf}(y) dy \\
&= \frac{1}{q} \left[y\,\mathrm{erf}(y) – \frac{2}{\sqrt{\pi}} \int y\,\mathrm{e}^{-y^2} dy \right] \\
&= \frac{1}{q} y\,\mathrm{erf}(y) + \frac{1}{q\sqrt{\pi}} \mathrm{e}^{-y^2} \\
&= x\,\mathrm{erf}(qx) + \frac{1}{q\sqrt{\pi}} \mathrm{e}^{-q^{2}x^{2}}
\end{align}
using integration by parts and the substitution \(y=qx\)
\begin{equation}
I = \frac{\sqrt{\pi}}{2q} x \,\mathrm{erf}(qx) \,- \frac{\sqrt{\pi}}{2q} x \,\mathrm{erf}(qx)
\,- \frac{1}{2q^2} \mathrm{e}^{-q^{2}x^{2}} \Big|_{0}^{u}
= \frac{1}{2q^2} \left[1 – \mathrm{e}^{-q^{2}u^{2}} \right]
\end{equation}

3.321.5

\begin{align}
I &= \int\limits_{0}^{u} x^{2} \mathrm{e}^{-q^{2}x^{2}} dx
= \frac{-1}{2q^2} x \mathrm{e}^{-q^{2}x^{2}} + \frac{1}{2q^2} \int\mathrm{e}^{-q^{2}x^{2}} dx \\
&= \frac{1}{2q^3} \left[-qx \mathrm{e}^{-q^{2}x^{2}} + \frac{\sqrt{\pi}}{2} \mathrm{erf}(qx) \right]\Big|_{0}^{u} \\
&= \frac{1}{2q^3} \left[\frac{\sqrt{\pi}}{2} \mathrm{erf}(qu) \,-\, qu \mathrm{e}^{-q^{2}x^{2}} \right]
\end{align}
We used integration by parts, 3.321.4, and 3.321.2.

3.321.6

\begin{align}
I &= \int\limits_{0}^{u} x^{3} \mathrm{e}^{-q^{2}x^{2}} dx
= \frac{\sqrt{\pi}}{4q^3}x\,\mathrm{erf}(qx) \,- \frac{x^2}{2q^2}\mathrm{e}^{-q^{2}x^{2}}
– \frac{\sqrt{\pi}}{4q^3} \int \mathrm{erf}(qx) dx + \frac{1}{2q^2} \int x\,\mathrm{e}^{-q^{2}x^{2}} dx \\
&= \frac{\sqrt{\pi}}{4q^3}\,x\,\mathrm{erf}(qx) \,- \frac{x^2}{2q^2}\mathrm{e}^{-q^{2}x^{2}}
– \frac{\sqrt{\pi}}{4q^3}\,x\,\mathrm{erf}(qx) \,- \frac{1}{4q^4}\mathrm{e}^{-q^{2}x^{2}}
– \frac{1}{4q^4}\mathrm{e}^{-q^{2}x^{2}} \\
&= \frac{1}{2q^4} (-q^{2}x^{2} – 1)\mathrm{e}^{-q^{2}x^{2}}\Big|_{0}^{u} \\
&= \frac{1}{2q^4} \left[1-(1+q^{2}u^{2}) \mathrm{e}^{-q^{2}u^{2}} \right]
\end{align}
using integration by parts, 3.321.5, the work done in the solution of 3.321.4 and the result 3.321.4.

3.321.7

\begin{align}
I &= \int\limits_{0}^{u} x^{4} \mathrm{e}^{-q^{2}x^{2}} dx
= -\frac{1}{2q^4}x\mathrm{e}^{-q^{2}x^{2}} – \frac{1}{2q^4}q^{2}x^{3}\mathrm{e}^{-q^{2}x^{2}}
+ \frac{1}{2q^4}\int \mathrm{e}^{-q^{2}x^{2}} dx + \frac{q^{2}}{2q^4}\int x^{2}\mathrm{e}^{-q^{2}x^{2}} dx \\
&= \frac{1}{2q^5}\left[-qx\,\mathrm{e}^{-q^{2}x^{2}} – q^{3}x^{3}\,\mathrm{e}^{-q^{2}x^{2}}
+ \frac{\sqrt{\pi}}{2} \mathrm{erf}(qx) + \frac{\sqrt{\pi}}{4} \mathrm{erf}(qx)
-\frac{1}{2}qx\,\mathrm{e}^{-q^{2}x^{2}} \right]\Big|_{0}^{u} \\
&= \frac{1}{2q^5} \left[\frac{3\sqrt{\pi}}{4}\mathrm{erf}(qx)
– qx\,\mathrm{e}^{-q^{2}x^{2}}\left(\frac{3}{2} + q^{2}x^{2}\right) \right]\Big|_{0}^{u} \\
&= \frac{1}{2q^5} \left[\frac{3\sqrt{\pi}}{4}\mathrm{erf}(qu)
– qu\,\mathrm{e}^{-q^{2}u^{2}}\left(\frac{3}{2} + q^{2}u^{2}\right) \right]
\end{align}
using integration by parts, 3.321.6, 3.321.2, and 3.321.5.

Evaluate the Integral \(\int_{0}^{1} \mathrm{li}(x) dx\)

\begin{equation}
\int\limits_{0}^{1} \mathrm{li}(x) dx = -\ln 2
\end{equation}
is entry 6.211 in Gradshteyn and Ryzhik’s Table of Integrals, Series, and Products.

\begin{equation}
\mathrm{li}(x) = \int\limits_{0}^{x} \frac{dt}{\ln t},\,\,|\mathrm{arg}x| \lt \pi ,\,\,|\mathrm{arg}(1-x)| \lt \pi
\end{equation}
is the logarithmic integral function.

We begin with the confluent hypergeometric function of the second kind (also known as
Tricomi’s confluent hypergeometric function)
\begin{equation}
\Psi(a,b;z) = \frac{1}{\Gamma(a)} \int\limits_{0}^{\infty} \mathrm{e}^{-zt} t^{a-1} (1+t)^{b-a-1} dt,
\,\, \mathfrak{R}(a) \gt 0,\,\, \mathfrak{R}(z) \gt 0
\end{equation}

We can express the logarithmic integral function in terms of the confluent hypergeometric function of the second kind
\begin{equation}
\mathrm{li}(x) = -x\Psi(1,1;-\ln x) = \int\limits_{0}^{\infty} \frac{x^t}{t+1} dt
\end{equation}

\begin{align}
\int\limits_{0}^{1} \mathrm{li}(x) dx &= -\int\limits_{0}^{1} \int\limits_{0}^{\infty} \frac{x^{t+1}}{t+1} dt dx \\
&= -\int\limits_{0}^{\infty} \frac{1}{t+1} \int\limits_{0}^{1} x^{t+1} dx dt \\
&= -\int\limits_{0}^{\infty} \frac{1}{(t+1)(t+2)} dt \\
&= [\ln(t+2)-\ln(t+1)]\Big|_{0}^{\infty} \\
&= -\ln 2
\end{align}

Integrate \(\int_{0}^{a} (a^{2}-x^{2})^{n-1/2} \mathrm{d} x\)

From Victor Moll’s attempt to solve all of the integrals in Gradshteyn and Ryzhik, we have

\begin{equation}
\int\limits_{0}^{a} (a^{2}-x^{2})^{n-1/2} \mathrm{d} x = a^{2n} \frac{(2n-1)!!}{(2n)!!} \frac{\pi}{2}
\label{eq:1608041}
\tag{1}
\end{equation}

Moll’s solution is at the link, so let us solve this another way. We first use the substitution used by Moll, let \(x=av\) to obtain

\begin{equation}
\int\limits_{0}^{a} (a^{2}-x^{2})^{n-1/2} \mathrm{d} x = a^{2n} \int\limits_{0}^{1} (1-v^{2})^{n-1/2} \mathrm{d} v
\label{eq:1608042}
\tag{2}
\end{equation}

We designate the integral on the right hand side as I and make the substitution \(z = v^{2}\)

\begin{equation}
\mathrm{I} = \int\limits_{0}^{1} (1-v^{2})^{n-1/2} \mathrm{d} v = \frac{1}{2} \int\limits_{0}^{1} z^{-1/2} (1-z)^{n-1/2} \mathrm{d} z
\label{eq:1608043}
\tag{3}
\end{equation}

From the beginning this integral looked like a gamma or beta function, now, in this form it is obviously a beta function. We then have

\begin{equation}
\mathrm{I} = \frac{1}{2} \mathrm{B}\left(\frac{1}{2}, n + \frac{1}{2} \right)
\label{eq:1608044}
\tag{4}
\end{equation}

and thus

\begin{equation}
\int\limits_{0}^{a} (a^{2}-x^{2})^{n-1/2} \mathrm{d} x = a^{2n} \frac{1}{2} \mathrm{B}\left(\frac{1}{2}, n + \frac{1}{2} \right)
\label{eq:1608045}
\tag{5}
\end{equation}

Now we must show that the right hand sides of equations \eqref{eq:1608041} and \eqref{eq:1608045} are equal or

\begin{equation}
\mathrm{B}\left(\frac{1}{2}, n + \frac{1}{2} \right) \overset{\underset{\mathrm{?}}{}}{=} \pi \frac{(2n-1)!!}{(2n)!!}
\label{eq:1608046}
\tag{6}
\end{equation}

We begin by expressing the beta function in terms of gamma functions

\begin{equation}
\mathrm{B}\left(\frac{1}{2}, n + \frac{1}{2} \right) = \frac{\Gamma(\frac{1}{2}) \Gamma(n + \frac{1}{2})}{\Gamma(n+1)} = \sqrt{\pi}
\frac{\Gamma(n + \frac{1}{2})}{\Gamma(n+1)}
\label{eq:1608047}
\tag{7}
\end{equation}

Now we invoke the following two relationships between the gamma function and the double factorial, found at Wikipedia and Wolfram Math World respectively

\begin{equation}
(2n-1)!! = \frac{2^{n} \Gamma(n + \frac{1}{2})}{\sqrt{\pi}} \quad \mathrm{and} \quad (2n)!! = 2^{n}n! = 2^{n} \Gamma(n+1)
\end{equation}

Substituting these expressions into \eqref{eq:1608046} shows that it is indeed an equality.

Putting everything together, we have
\begin{equation}
\int\limits_{0}^{a} (a^{2}-x^{2})^{n-1/2} \mathrm{d} x = a^{2n} \frac{(2n-1)!!}{(2n)!!} \frac{\pi}{2} = a^{2n} \frac{1}{2} \mathrm{B}\left(\frac{1}{2}, n + \frac{1}{2} \right)
\end{equation}