## Section2.7Improper Integrals

Recall that the Fundamental Theorem of Calculus says that if $f$ is a continuous function on the closed interval $[a,b]\text{,}$ then

\begin{equation*} \ds{\int_a^b f(x)~dx=F(x)\bigg|_a^b=F(b)-F(a)}\text{,} \end{equation*}

where $F$ is any antiderivative of $f\text{.}$

Both the continuity condition and closed interval must hold to use the Fundamental Theorem of Calculus, and in this case, $\ds\int_a^b f(x)\,dx$ represents the net area under $f(x)$ from $a$ to $b\text{:}$

We begin with an example where blindly applying the Fundamental Theorem of Calculus can give an incorrect result.

###### Example2.51. Using FTC.

Explain why $\ds\int_{-1}^1\frac{1}{x^2}\,dx$ is not equal to $-2\text{.}$

Solution

Here is how one might proceed:

\begin{equation*} \begin{split} \int_{-1}^1\frac{1}{x^2}\,dx \amp= \int_{-1}^1 x^{-2}\,dx = -x^{-1}\bigg|_{-1}^1 = -\frac{1}{x}\bigg|_{-1}^1\\ \amp=~ \left(-\frac{1}{1}\right) - \left(-\frac{1}{(-1)}\right) ~=~ -2\end{split} \end{equation*}

However, the above answer is WRONG! Since $f(x)=1/x^2$ is not continuous on $[-1,~1]\text{,}$ we cannot directly apply the Fundamental Theorem of Calculus. Intuitively, we can see why $-2$ is not the correct answer by looking at the graph of $f(x)=1/x^2$ on $[-1,~1]\text{.}$ The shaded area appears to grow without bound as seen in the figure below.

Formalizing this example leads to the concept of an improper integral. There are two ways to extend the Fundamental Theorem of Calculus. One is to use an infinite interval, i.e., $[a,\infty)\text{,}$ $(-\infty,b]$ or $(-\infty,\infty)\text{.}$ The second is to allow the interval $[a,b]$ to contain an infinite discontinuity of $f(x)\text{.}$ In either case, the integral is called an improper integral. One of the most important applications of this concept is probability distributions because determining quantities like the cumulative distribution or expected value typically require integrals on infinite intervals.

### Subsection2.7.1Improper Integrals: Infinite Limits of Integration

To compute improper integrals, we use the concept of limits along with the Fundamental Theorem of Calculus.

###### Definition2.52. Improper Integrals — One Infinite Limit of Integration.

If $f(x)$ is continuous on $[a,\infty)\text{,}$ then the improper integral of $f$ over $[a,\infty)$ is

\begin{equation*} \int_{a}^{\infty} f(x)\,dx=\lim_{R\to\infty}\int_a^R f(x)\,dx\text{.} \end{equation*}

If $f(x)$ is continuous on $(-\infty,b]\text{,}$ then the improper integral of $f$ over $(-\infty,b]$ is

\begin{equation*} \int_{-\infty}^b f(x)\,dx=\lim_{R\to -\infty}\int_R^b f(x)\,dx\text{.} \end{equation*}

Since we are dealing with limits, we are interested in convergence and divergence of the improper integral. If the limit exists and is a finite number, we say the improper integral converges. Otherwise, we say the improper integral diverges, which we capture in the following definition.

###### Definition2.53. Convergence and Divergence.

If the limit exists and is a finite number, we say the improper integral converges.

If the limit is $\pm\infty$ or does not exist, we say the improper integral diverges.

To get an intuitive (though not completely correct) interpretation of improper integrals, we attempt to analyze $\ds\int_a^\infty f(x)\,dx$ graphically. Here assume $f(x)$ is continuous on $[a,\infty)\text{:}$

We let $R$ be a fixed number in $[a,\infty)\text{.}$ Then by taking the limit as $R$ approaches $\infty\text{,}$ we get the improper integral:

\begin{equation*} \int_a^\infty f(x)\,dx=\lim_{R\to\infty}\int_a^R f(x)\,dx\text{.} \end{equation*}

We can then apply the Fundamental Theorem of Calculus to the last integral as $f(x)$ is continuous on the closed interval $[a,R]\text{.}$

We next define the improper integral for the interval $(-\infty,~\infty)\text{.}$

###### Definition2.54. Improper Integrals — Two Infinite Limits of Integration.

If both $\ds\int_{-\infty}^a f(x)\,dx$ and $\ds\int_{a}^{\infty} f(x)\,dx$ are convergent, then the improper integral of $f$ over $(-\infty,\infty)$ is

\begin{equation*} \int_{-\infty}^{\infty} f(x)\,dx=\int_{-\infty}^a f(x)\,dx+\int_{a}^{\infty} f(x)\,dx \end{equation*}

The above definition requires both of the integrals

to be convergent for $\ds\int_{-\infty}^{\infty} f(x)\,dx$ to also be convergent. If either of $\ds\int_{-\infty}^a f(x)\,dx$ or $\ds\int_{a}^{\infty} f(x)\,dx$ is divergent, then so is $\ds\int_{-\infty}^{\infty} f(x)\,dx\text{.}$

###### Example2.55. Improper Integral—One Infinite Limit of Integration.

Determine whether $\ds\int_1^\infty\frac{1}{x}\,dx$ is convergent or divergent.

Solution

Using the definition for improper integrals we write this as:

\begin{equation*} \begin{split} \int_1^\infty \frac{1}{x}\,dx\amp= \lim_{R\to\infty} \int_1^R\frac{1}{x}\,dx = \lim_{R\to\infty} \ln|x|\bigg|_1^R\\ \amp =\lim_{R\to\infty} \ln|R| - \ln|1| = \lim_{R\to\infty} \ln|R| = +\infty\end{split} \end{equation*}

Therefore, the integral is divergent.

###### Example2.56. Improper Integral — Two Infinite Limits of Integration.

Determine whether $\ds\int_{-\infty}^\infty x\sin(x^2)\,dx$ is convergent or divergent.

Solution

We must compute both $\ds\int_0^\infty x\sin(x^2)\,dx$ and $\ds\int_{-\infty}^0 x\sin(x^2)\,dx\text{.}$ Note that we don't have to split the integral up at $0\text{,}$ any finite value $a$ will work. First we compute the indefinite integral. Let $u=x^2\text{,}$ then $du=2x\,dx$ and hence,

\begin{equation*} \int x\sin(x^2)\,dx=\frac{1}{2} \int \sin(u)\,du=-\frac{1}{2}\cos(x^2)+C \end{equation*}

Using the definition of improper integral gives:

\begin{equation*} \begin{split} \int_0^\infty x\sin(x^2)\,dx \amp = \lim_{R\to\infty} \int_0^R x\sin(x^2)\,dx =\lim_{R\to\infty} \left[-\frac{1}{2}\cos(x^2)\right] \bigg|_0^R\\ \amp = -\frac{1}{2} \lim_{R\to\infty} \cos(R^2) +\frac{1}{2}\end{split} \end{equation*}

This limit does not exist since $\cos x$ oscillates between $-1$ and $+1\text{.}$ In particular, $\cos x$ does not approach any particular value as $x$ gets larger and larger. Thus, $\ds\int_0^\infty x\sin(x^2)\,dx$ diverges, and hence, the integral $\ds\int_{-\infty}^\infty x\sin(x^2)\,dx$ diverges.

### Subsection2.7.2Improper Integrals: Discontinuities

When there is a discontinuity in $[a,b]$ or at an endpoint, then the improper integral is as follows.

###### Definition2.57.

{Improper Integrals — Discontinuities on Integration Bounds} If $f(x)$ is continuous on $(a,b]\text{,}$ then the improper integral of $f$ over $(a,b]$ is

\begin{equation*} \int_a^b f(x)\,dx=\lim_{R\to a^+}\int_R^b f(x)\,dx\text{.} \end{equation*}

If $f(x)$ is continuous on $[a,b)\text{,}$ then the improper integral of $f$ over $[a,b)$ is

\begin{equation*} \int_a^b f(x)\,dx=\lim_{R\to b^-}\int_a^R f(x)\,dx\text{.} \end{equation*}

Definition 2.53 on convergence and divergence of an improper integral holds here as well: If the limit above exists and is a finite number, we say the improper integral converges. Otherwise, we say the improper integral diverges.

When there is a discontinuity in the interior of $[a,b]\text{,}$ we use the following definition.

###### Definition2.58. Improper Integrals—Discontinuities Within Integration Interval.

If $f$ has a discontinuity at $x=c$ where $c\in[a,b]\text{,}$ and both $\ds\int_a^c f(x)\,dx$ and $\ds\int_c^b f(x)\,dx$ are convergent, then $f$ over $[a,b]$ is

\begin{equation*} \int_a^b f(x)\,dx=\int_a^c f(x)\,dx+\int_c^b f(x)\,dx\text{.} \end{equation*}

Again, we can get an intuitive sense of this concept by analyzing $\ds\int_a^b f(x)\,dx$ graphically. Here assume $f(x)$ is continuous on $(a,b]$ but discontinuous at $x=a\text{:}$

We let $R$ be a fixed number in $(a,b)\text{.}$ Then by taking the limit as $R$ approaches $a$ from the right, we get the improper integral:

\begin{equation*} \int_a^b f(x)\,dx=\lim_{R\to a^+}\int_R^b f(x)\,dx\text{.} \end{equation*}

Now we can apply FTC to the last integral as $f(x)$ is continuous on $[R,b]\text{.}$

###### Example2.59. A Divergent Integral.

Determine if $\ds\int_{-1}^1\frac{1}{x^2}\,dx$ is convergent or divergent.

Solution

The function $f(x)=1/x^2$ has a discontinuity at $x=0\text{,}$ which lies in $[-1,1]\text{.}$ We must compute $\ds\int_{-1}^0 \frac{1}{x^2}\,dx$ and $\ds\int_0^1 \frac{1}{x^2}\,dx\text{.}$ Let's start with $\ds\int_0^1 \frac{1}{x^2}\,dx\text{:}$

\begin{equation*} \int_0^1 \frac{1}{x^2}\,dx = \lim_{R\to 0^+} \int_R^1 \frac{1}{x^2} \,dx = \lim_{R\to 0^+} -\frac{1}{x}\bigg|_R^1 = -1 + \lim_{R\to 0^+} \frac{1}{R} \end{equation*}

which diverges to $+\infty\text{.}$ Therefore, $\ds\int_{-1}^1\frac{1}{x^2}\,dx$ is divergent since one of $\ds\int_{-1}^0 \frac{1}{x^2}\,dx$ and $\ds\int_0^1 \frac{1}{x^2}\,dx$ is divergent.

###### Example2.60. Integral of the Logarithm.

Determine if $\ds\int_0^1 \ln x \,dx$ is convergent or divergent. Evaluate it if it is convergent.

Solution

Note that $f(x)=\ln x$ is discontinuous at the endpoint $x=0\text{.}$ We first use Integration by Parts to compute $\ds\int\ln x\,dx\text{.}$ We let $u=\ln x$ and $dv=dx\text{.}$ Then $du=(1/x)dx\text{,}$ $v=x\text{,}$ giving:

\begin{align*} \int \ln x\,dx \amp = \ds x\ln x-\int x\cdot\frac{1}{x}\,dx\\ \amp = x\ln x-\int 1\,dx\\ \amp = x\ln x-x+C \end{align*}

Now using the definition of improper integral for $\ds\int_0^1 \ln x \,dx\text{:}$

\begin{equation*} \begin{split} \int_0^1 \ln x \,dx \amp= \lim_{R\to 0^+} \int_R^1 \ln x\,dx = \lim_{R\to 0^+} (x\ln x-x)\bigg|_R^1 \\ \amp= -1 - \lim_{R\to 0^+}(R\ln R) + \lim_{R\to 0^+}R\end{split} \end{equation*}

Note that $\ds\lim_{R\to 0^+}R=0\text{.}$ We next compute $\ds\lim_{R\to 0^+}(R\ln R)\text{.}$ First, we rewrite the expression as follows:

\begin{equation*} \lim_{x\to0^+}(R\ln R)=\lim_{R\to0^+}\frac{\ln R}{1/R}\text{.} \end{equation*}

Now the limit is of the indeterminate type $(-\infty)/(\infty)$ and l'Hôpital's Rule can be applied.

\begin{equation*} \lim_{R\to0^+}(R\ln R) =\lim_{R\to0^+}\frac{\ln R}{1/R} =\lim_{R\to0^+}\frac{1/R}{-1/R^2} =\lim_{R\to0^+}-\frac{R^2}{R} =\lim_{R\to0^+}(-R) =0 \end{equation*}

Thus, $\ds\lim_{R\to 0^+}(R\ln R)=0\text{.}$ Thus

\begin{equation*} \int_0^1 \ln x \,dx = -1\text{,} \end{equation*}

and the integral is convergent to $-1\text{.}$

Graphically, one might interpret this to mean that the net area under $\ln x$ on $[0,1]$ is $-1$ (the area in this case lies below the $x$-axis).

###### Example2.61. Integral of a Square Root.

Determine if $\ds\int_0^4\frac{dx}{\sqrt{4-x}}$ is convergent or divergent. Evaluate it if it is convergent.

Solution

Note that $\frac{1}{\sqrt{4-x}}$ is discontinuous at the endpoint $x=4\text{.}$ We use a $u$-substitution to compute $\int \frac{dx}{\sqrt{4-x}}\text{.}$ We let $u=4-x\text{,}$ then $du=-dx\text{,}$ giving:

\begin{align*} \ds\int\frac{dx}{\sqrt{4-x}}\amp =\int-\frac{du}{u^{1/2}}\\ \amp =\int -u^{-1/2}\,du\\ \amp =-2(u)^{1/2}+C\\ \amp =-2\sqrt{4-x}+C \end{align*}

Now using the definition of improper integrals for $\ds\int_0^4\frac{dx}{\sqrt{4-x}}\text{:}$

\begin{equation*} \ds\int_0^4\frac{dx}{\sqrt{4-x}}=\lim_{R\to4^{-}}(-2\sqrt{4-x})\bigg|_0^R=\lim_{R\to4^{-}}-2\sqrt{4-R}+2\sqrt{4}=4 \end{equation*}
###### Example2.62. Improper Integral.

Determine if $\ds\int_{1}^{2}\dfrac{dx}{\left( x-1\right) ^{1/3}}$ is convergent or divergent. Evaluate it if it is convergent.

Solution

Note that $f\left( x\right) =\dfrac{1}{\left( x-1\right) ^{1/3}}$ is discontinuous at the endpoint $x=1\text{.}$ We first use substitution to find $\ds\int \dfrac{dx}{\left( x-1\right) ^{1/3}}\text{.}$ We let $u=x-1\text{.}$ Then $du=dx\text{,}$ giving

\begin{equation*} \int \dfrac{dx}{\left( x-1\right) ^{1/3}}=\int \frac{du}{u^{1/3}}=\int u^{-1/3}du=\frac{3}{2}u^{2/3}+C=\frac{3}{2}\left( x-1\right) ^{2/3}+C\text{.} \end{equation*}

Now using the definition of improper integral for $\ds\int_{1}^{2}\dfrac{dx}{ \left( x-1\right) ^{1/3}}:$

\begin{equation*} \begin{split} \int_{1}^{2}\dfrac{dx}{\left( x-1\right) ^{1/3}}\amp=\lim_{R\rightarrow 1^{+}}\int_{R}^{2}\dfrac{dx}{\left( x-1\right) ^{1/3}}=\left. \lim_{R\rightarrow 1^{+}}\frac{3}{2}\left( x-1\right) ^{2/3}\right\vert _{R}^{2} \\ \amp=\frac{3}{2}-\lim_{R\rightarrow 1^{+}}\frac{3}{2}\left( R-1\right) ^{2/3}=\frac{3}{2}\end{split}\text{,} \end{equation*}

and the integral is convergent to $\frac{3}{2}\text{.}$ Graphically, one might interpret this to mean that the net area under $\dfrac{1}{\left( x-1\right)^{1/3}}$ on $\left[ 1,2\right]$ is $\frac{3}{2}\text{.}$

### Subsection2.7.3$p$-Integrals

Integrals of the form $\ds \frac{1}{x^p}$ come up again in the study of series. These integrals can be either classified as an improper integral with an infinite limit of integration, $\ds\int_{a}^{\infty} \dfrac{1}{x^p}\,dx\text{,}$ or as an improper integral with discontinuity at $x=0\text{,}$ $\ds\int_{0}^{a} \dfrac{1}{x^p}\,dx\text{.}$ In asymptotic analysis, it is useful to know when either of these intervals converge or diverge.

1. If $p>1\text{,}$ we have $\ds\int_{a}^{\infty }\frac{1}{x^p}\,dx=\lim_{R \rightarrow \infty} \left. \frac{x^{1-p}}{1-p} \right|^R_a = \lim_{R\rightarrow \infty} \frac{R^{1-p}}{1-p} - \frac{a^{1-p}}{1-p}=\frac{a^{1-p}}{p-1}\text{.}$

2. If $p\leq 1\text{,}$ the above tells us that the resulting limit is infinite.

1. If $p\lt 1\text{,}$ we have to $\ds\int_0^a \frac{1}{x^p}\, dx=\lim_{R \rightarrow 0^+} \left. \frac{x^{1-p}}{1-p} \right|^a_R = \lim_{R\rightarrow 0^+} \frac{a^{1-p}}{1-p} - \frac{R^{1-p}}{1-p}=\frac{a^{1-p}}{1-p}\text{.}$

2. If $p\geq 1\text{,}$ the above tells us that the resulting limit is infinite.

With Example 2.55 and Example 2.59, you have already seen how the $p$-Test is applied. For good measure, here is one more example.

###### Example2.65. $p$-Test.

Determine if the following integrals are convergent or divergent.

1. $\ds\int_1^{\infty} \frac{1}{x^3}\,dx$

2. $\ds\int_0^{5} \frac{1}{x^4}\,dx$

Solution
1. This is a $p$-integral with an infinite upper limit of integration and $p=3 > 1\text{.}$ Therefore, by the $p$-Test for Infinite Limit, $\ds\int_1^{\infty} \frac{1}{x^3}\,dx$ converges.

2. We classify $\ds\int_0^{5} \frac{1}{x^4}\,dx$ as a $p$-integral with a discontinuity at $x=0$ and $p=4 \geq 1\text{.}$ Thus, by the $p$-Test for Discontinuity, the integral diverges.

### Subsection2.7.4Comparison Test

The following test allows us to determine convergence/divergence information about improper integrals that are hard to compute by comparing them to easier ones. We state the test for $[a,\infty)\text{,}$ but similar versions hold for the other improper integrals.

Informally, (i) says that if $f(x)$ is larger than $g(x)\text{,}$ and the area under $f(x)$ is finite (converges), then the area under $g(x)$ must also be finite (converges). Informally, (ii) says that if $f(x)$ is larger than $g(x)\text{,}$ and the area under $g(x)$ is infinite (diverges), then the area under $f(x)$ must also be infinite (diverges).

###### Example2.67. Comparison Test.

Show that $\ds\int_2^\infty \frac{\cos^2x}{x^2} \,dx$ converges.

Solution

We use the Comparison Test to show that it converges. Note that $0\leq \cos^2x\leq 1$ and hence

\begin{equation*} 0 \leq\frac{\cos^2x}{x^2}\leq\frac{1}{x^2}\text{.} \end{equation*}

Thus, taking $f(x)=1/x^2$ and $g(x)=\cos^2x / x^2$ we have $f(x)\geq g(x)\geq 0\text{.}$ One can easily see that $\ds\int_2^\infty \frac{1}{x^2}\,dx$ converges. Therefore, $\ds\int_2^\infty \frac{\cos^2x}{x^2} \,dx$ also converges.

##### Exercises for Section 2.7.

Determine whether the following improper integrals are convergent or divergent. Evaluate those that are convergent.

1. $\ds\int_{0}^{\infty}\dfrac{1}{x^2+1}\,dx$

Converges to $\pi/2$
Solution

We first compute the corresponding indefinite integral using trigonometric substitution. Let $x = \tan \theta$ and so $dx = \sec^2\theta\,d\theta\text{:}$

\begin{equation*} \begin{split} \int \frac{1}{x^2+1}\,dx \amp = \int\frac{1}{1+\tan^2\theta} \sec^2\theta\,d\theta\\ \amp = \int \frac{\sec^2\theta}{\sec^2\theta}\,d\theta\\ \amp = \int\,d\theta\\ \amp = \theta + C\\ \amp = \arctan(x)+ C \end{split} \end{equation*}

We recall the graph of $y=\arctan(x)\text{:}$

Therefore,

\begin{equation*} \begin{split} \int_0^{\infty} \frac{1}{x^2+1}\,dx \amp = \lim_{R\to\infty} \int_0^R \frac{1}{x^2+1}\,dx \\ \amp = \lim_{R\to\infty} \arctan(R) - \arctan(0)\\ \amp =\frac{\pi}{2} - 0\\ \amp = \frac{\pi}{2}. \end{split} \end{equation*}

Hence the interval is converges to $\pi/2\text{.}$

2. $\ds\int_{0}^{\infty}\dfrac{x}{x^2+1}\,dx$

Divergent (to $\infty$)
Solution

We first solve the corresponding indefinite integral using the following substitution:

\begin{equation*} u = 1+x^2, du = 2x\,dx\text{.} \end{equation*}

Then

\begin{equation*} \begin{split} \int \frac{x}{x^2+1}\,dx \amp = \int \frac{1}{u} \frac{du}{2}\\ \amp = \frac{1}{2} \int\frac{1}{u}\,du \\ \amp = \frac{1}{2} \ln |u| + C\\ \amp = \frac{1}{2} \ln |x^2+1| + C \end{split} \end{equation*}

Therefore,

\begin{equation*} \begin{split} \int_0^\infty \frac{x}{1+x^2}\,dx \amp = \lim_{R\to\infty}\int_0^R \frac{x}{1+x^2}\,dx \\ \amp = \frac{1}{2}\left[\lim_{R\to \infty} \ln|R^2 + 1| - \ln(1)\right] \end{split} \end{equation*}

Hence, the integral diverges.

3. $\ds\int_{0}^{\infty}e^{-x}(\cos x+\sin x)\,dx\text{.}$

Converges to 1
Solution

We first find the corresponding indefinite integral using Integration by Parts: Let

\begin{equation*} \begin{array}{cc} u = e^{-x} \amp dv = (\cos x + \sin x)\,dx \\ du = -e^{-x} \, dx \amp v = \sin x - \cos x. \end{array} \end{equation*}

Therefore,

\begin{equation*} \int e^{-x}\left(\cos x + \sin x\right)\, dx = e^{-x}(\sin x - \cos x) + \int e^{-x}\left(\sin x - \cos x\right)\,dx\text{.} \end{equation*}

Now let

\begin{equation*} \begin{array}{cc} u = e^{-x} \amp dv = (\sin x - \cos x)\,dx \\ du = -e^{-x} \, dx \amp v = -\left(\sin x + \cos x\right), \end{array} \end{equation*}

which gives

\begin{equation*} \begin{split} \int e^{-x}\left(\cos x + \sin x\right)\, dx \amp = -2 e^{-x}\cos x - \int e^{-x}\left(\cos x + \sin x\right)\, dx \\ 2\int e^{-x}\left(\cos x + \sin x\right)\, dx \amp = -2 e^{-x}\cos x \\ \int e^{-x}\left(\cos x + \sin x\right)\, dx \amp = -e^{-x}\cos x + C. \end{split} \end{equation*}

Therefore,

\begin{equation*} \begin{split} \int_0^\infty e^{-x}\left(\cos x + \sin x\right) \, dx \amp = \lim_{R\to\infty^-} \int_0^R e^{-x}\left(\cos x + \sin x\right) \, dx\\ \amp =\lim_{R \to \infty^{-}} -e^{-x}\cos x \big\vert_0^{R} \\ \amp = \lim_{R \to \infty^{-}} -e^{-R}\cos R - (-1)\\ \amp = 1, \end{split} \end{equation*}

i.e. the integral converges to 1.

4. $\ds\int_{0}^{\pi/2}\sec^{2}x\,dx$

Divergent (to $\infty$)
Solution

The integrand $f(x) = \sec^2(x)$ has vertical asymptotes at $x=2\pi k \pm \frac{\pi}{2}\text{,}$ and so is defined on \​(\left[0, \frac{\pi}{2}\right)\), but has a discontinuity at the endpoint \​(x=\frac{\pi}{2}\). We recall that \​(\diff{}{x} \tan(x) = \sec^2 (x)\). Hence,

\begin{equation*} \begin{split} \int_0^{\pi/2} \sec^2(x) \, dx \amp = \lim_{R \to \frac{\pi}{2}^-} \int_0^R \sec^2(x)\,dx \\ \amp = \lim_{R \to \frac{\pi}{2}^-} \tan(x)\bigg\lvert_0^R\\ \amp = \lim_{R \to \frac{\pi}{2}^-} \tan(R). \end{split} \end{equation*}

From the graph of $y=\tan(x)$ above, we conclude that

\begin{equation*} \lim_{R \to \frac{\pi}{2}^-} \tan(R) = +\infty\text{,} \end{equation*}

and so the integral diverges.

5. $\ds\int_{0}^{4}\dfrac{1}{(4-x)^{2/5}}\,dx$

Converges to $\frac{5}{3}(4^{3/5})$
Solution

The integrand $f(x) = \frac{1}{(4-x)^{2/5}}$ has a discontinuity at the right endpoint $x=4\text{.}$ Therefore,

\begin{equation*} \begin{split} \int_0^4 \frac{1}{(4-x)^{2/5}} \, dx \amp = \lim_{R\to 4^-} \int_0^R \frac{1}{(4-x)^{2/5}}\,dx \\ \amp = \lim_{R\to 4^-} \left(-\frac{5}{3}(4-x)^{3/5}\right) \bigg\lvert_0^R\\ \amp = \left(\frac{5}{3} \lim_{R\to 4^-} (4-R)^{3/5}\right) - \left( -\frac{5}{3} 4^{3/5} \right)\\ \amp = 0 + \frac{5}{3} 4^{3/5}. \end{split} \end{equation*}

Therefore, the integral converges to $\frac{5}{3} 4^{3/5}\text{.}$

6. $\ds\int_1^{\infty}\frac{1}{x^2}\,dx$

Converges to 1
Solution

This is a $p$-integral with an infinite upper limit and $p=3 > 1\text{.}$ Therefore, by the $p$-test for Infinte Limit, the integral converges.

\begin{equation*} \begin{split} \int_1^{\infty} \frac{1}{x^2} \, dx \amp = \lim_{R\to\infty} \int_1^R \frac{1}{x^2}\,dx \\ \amp = \lim_{R\to\infty} \frac{-1}{x}\bigg\lvert_1^R \\ \amp = \left(- \lim_{R\to\infty} \frac{1}{R}\right) - \left(-1\right)\\ \amp = 0 + 1 \end{split} \end{equation*}

Therefore, the integral converges to 1.

7. $\ds\int_e^{\infty}\frac{1}{x\sqrt{\ln x}}\,dx$

Divergent
Solution

The integrand $f(x) = \frac{1}{x\sqrt{\ln x}}$ is continuous on $[e,\infty)\text{.}$ We first compute the corresponding indefinite integral using a substitution: Let $u=\ln x\text{,}$ with $du = \frac{1}{x}\,dx\text{.}$

\begin{equation*} \begin{split} \int \frac{1}{x\sqrt{\ln x}} \, dx \amp = \int \frac{1}{\sqrt{u}}\,du\\ \amp = 2\sqrt{u} + C\\ \amp = 2\sqrt{\ln(x)} + C \end{split} \end{equation*}

Therefore, we have

\begin{equation*} \begin{split} \int_e^{\infty} \frac{1}{x\sqrt{\ln x}} \, dx \amp = \lim_{R\to\infty} \int_e^R \frac{1}{x\sqrt{\ln x}} \, dx \\ \amp = \lim_{R\to\infty} 2\sqrt{\ln(x)} \bigg\lvert_e^R\\ \amp = 2\left(\lim_{R\to\infty} \sqrt{\ln(R)} - 1\right)\\ \amp = \infty \end{split} \end{equation*}

Hence, the integral diverges.

8. $\ds\int_0^{\infty}e^{-3x}\,dx$

Converges to 1/3
Solution

We compute:

\begin{equation*} \begin{split} \int_0^{\infty} e^{-3x} \, dx \amp = \lim_{R\to\infty} \int_0^R e^{-3x}\,dx \\ \amp = -\frac{1}{3} \lim_{R\to\infty} e^{-3x} \bigg\lvert_0^R\\ \amp = -\frac{1}{3} \left(0 - 1\right)\\ \amp = \frac{1}{3}. \end{split} \end{equation*}

Therefore, the integral converges to $1/3\text{.}$

9. $\ds\int_1^e\frac{1}{x(\ln x)^2}\,dx$

Divergent
Solution

The integrand $f(x) = \frac{1}{x(\ln x)^2}$ has a discontinuity at $x=1\text{.}$ We first compute the corresponding indefinite integral. Let $u=\ln x$ with $du = \frac{1}{x}\,dx\text{:}$

\begin{equation*} \begin{split} \int \frac{1}{x(\ln x)^2}\,dx \amp = \int \frac{1}{u^2}\,du\\ \amp = -\frac{1}{u} + C\\ \amp = -\frac{1}{\ln x} + C \end{split} \end{equation*}

We now compute the definite integral:

\begin{equation*} \begin{split} \int_1^e \frac{1}{x(\ln x)^2}\,dx \amp = \lim_{R\to 1^+} \int_R^e\frac{1}{x(\ln x)^2}\,dx \\ \amp = \lim_{R\to 1^+} \left[-\frac{1}{\ln x} \right]_R^e\\ \amp = -1 - \left(- \lim_{R\to 1^+} \frac{1}{\ln R}\right) \end{split} \end{equation*}

We conclude that the integral diverges (to $+\infty$).

10. $\ds\int_0^{\infty}e^{-x}\sin^2\left(\frac{\pi x}{2}\right)\,dx$

Converges to $\frac{\pi^2}{2+2\pi^2}$
Solution

First, we rewrite

\begin{equation*} \sin^2\left(\frac{\pi x}{2}\right) = \frac{1}{2}\left(1-\cos(\pi x)\right)\text{.} \end{equation*}

Therefore,

\begin{equation*} \int_0^{\infty} e^{-x}\sin^2\left(\frac{\pi x}{2}\right) \, dx = \frac{1}{2}\left(\int_0^{\infty} e^{-x}\,dx -\int_0^{\infty} e^{-x}\cos(\pi x) \, dx\right) \end{equation*}

We will first integral $\displaystyle \int e^{-x}\cos(\pi x)\,dx$ using Integration by Parts: Let

\begin{equation*} \begin{array}{cc} u = e^{-x} \amp dv = \cos(\pi x)\,dx \\ du = -e^{-x} \, dx \amp v = \sin(\pi x)/\pi. \end{array} \end{equation*}

This gives

\begin{equation*} \int e^{-x}\cos(\pi x)\,dx = \frac{e^{-x}\sin(\pi x)}{\pi} + \frac{1}{\pi} \int e^{-x}\sin(\pi x)\,dx\text{.} \end{equation*}

We now integrate by parts one more time, with:

\begin{equation*} \begin{array}{cc} u = e^{-x} \amp dv = \sin(\pi x)\,dx \\ du = -e^{-x} \, dx \amp v = -\cos(\pi x)/\pi. \end{array} \end{equation*}

Thus,

\begin{equation*} \int e^{-x}\cos(\pi x)\,dx = \frac{e^{-x}\sin(\pi x)}{\pi} - \frac{e^{-x}\cos(\pi x)}{\pi ^2} - \frac{1}{\pi^2} \int e^{-x}\cos(\pi x)\,dx\text{.} \end{equation*}

We now notice that the integral appears on both sides of the equation, and so we can combine terms:

\begin{equation*} \begin{split} \pi ^2 \int e^{-x}\cos(\pi x)\,dx \amp = \pi e^{-x}\sin(\pi x) - e^{-x}\cos(\pi x) - \int e^{-x}\cos(\pi x)\,dx\\ \left(\pi^2 + 1\right) \int e^{-x}\cos(\pi x)\,dx \amp = \pi e^{-x}\sin(\pi x) - e^{-x}\cos(\pi x)\\ \int e^{-x}\cos(\pi x)\,dx \amp = \frac{\pi e^{-x}\sin(\pi x) - e^{-x}\cos(\pi x)}{\pi^2 + 1}. \end{split} \end{equation*}

All together, we find that

\begin{equation*} \begin{split} \int e^{-x}\sin^2\left(\frac{\pi x}{2}\right) \, dx \amp = \frac{1}{2}\left(\int e^{-x}\,dx -\int e^{-x}\cos(\pi x) \, dx\right)\\ \amp = -\frac{e^{-x}}{2} - \frac{1}{2}\left[\frac{\pi e^{-x}\sin(\pi x) - e^{-x}\cos(\pi x)} {\pi^2 + 1} \right] \end{split} \end{equation*}

We now solve the definite integral:

\begin{equation*} \begin{split} \int_0^{\infty} e^{-x}\sin^2\left(\frac{\pi x}{2}\right) \,dx \amp = \lim_{R\to\infty} \int_0^R e^{-x}\sin^2\left(\frac{\pi x}{2}\right) \,dx\\ \amp = \lim_{R\to\infty} \left[ -\frac{e^{-x}}{2} - \frac{1}{2}\left(\frac{\pi e^{-x}\sin(\pi x) - e^{-x}\cos(\pi x)} {\pi^2 + 1} \right)\right]_0^R\\ \amp = 0 - \left[-\frac{1}{2} - \frac{1}{2}\left(\frac{-1}{\pi^2+1}\right) \right]\\ \amp = \frac{1}{2} - \frac{1}{\pi^2+1}. \end{split} \end{equation*}

Therefore, the integral converges to $\frac{1}{2} - \frac{1}{\pi^2+1}\text{.}$

11. $\ds\int_{-\infty}^{\infty}\frac{1}{x^2+1}\,dx$

Converges to $\pi$
Solution

We first compute the corresponding indefinite integral using trigonometric substitution. Let $x = \tan \theta$ and so $dx = \sec^2\theta\,d\theta\text{:}$

\begin{equation*} \begin{split} \int \frac{1}{x^2+1}\,dx \amp = \int\frac{1}{1+\tan^2\theta} \sec^2\theta\,d\theta\\ \amp = \int \frac{\sec^2\theta}{\sec^2\theta}\,d\theta\\ \amp = \int\,d\theta\\ \amp = \theta + C\\ \amp = \arctan(x)+ C \end{split} \end{equation*}

We recall the graph of $y=\arctan(x)\text{:}$

Using the fact that the integrand is an even function, we calculate

\begin{equation*} \begin{split} \int_{-\infty}^{\infty} \frac{1}{x^2+1}\,dx \amp = 2 \int_0^{\infty} \frac{1}{x^2+1}\,dx \\[1ex] \amp = 2 \lim_{R\to\infty^-} \int_0^R \frac{1}{x^2+1}\,dx \\[1ex] \amp = 2 \lim_{R\to\infty^-} \arctan x \big\vert_0^R \\[1ex] \amp =2 \lim_{R\to\infty^-} \arctan R - \arctan 0 \\[1ex] \amp = 2 \left(\frac{\pi}{2} -0\right) = \pi. \end{split} \end{equation*}
12. $\ds\int_{-\infty}^{\infty}\frac{x}{x^2+1}\,dx$

Divergent
Solution

We first find the corresponding indefinite integral by making the substitution,

\begin{equation*} u = x^2 +1,\ du = 2x\,dx\text{.} \end{equation*}
\begin{equation*} \int\frac{x}{x^2+1}\,dx= \int \frac{1}{u} \frac{du}{2} = \frac{1}{2} \ln|x^2 + 1| + C\text{.} \end{equation*}

We first consider the integral

\begin{equation*} \begin{split} \int_0^\infty \frac{x}{x^2+1}\,dx \amp = \lim_{R\to\infty^-} \int_0^R \frac{x}{x^2+1}\,dx \\ \amp = \lim_{R\to\infty^-} \frac{1}{2} \ln|x^2 + 1| \big\vert_0^R \\ \amp = \frac{1}{2} \lim_{R\to\infty^-} \ln|R^2+1| - \frac{1}{2} \ln |1| \to \infty. \end{split} \end{equation*}

And so since this integral is divergent, we must have that $\displaystyle \int_{-\infty}^{\infty} \frac{x}{x^2+1}\,dx$ is divergent.

Prove that the integral $\ds{\int_{1}^{\infty}\frac{1}{x^p}\,dx}$ is convergent if $p>1$ and divergent if $0\lt p\leq 1\text{.}$

Solution

Since

\begin{equation*} \int_1^{\infty}\frac{1}{x^p}\,dx = \lim_{R\to\infty} \frac{x^{1-p}}{1-p} \bigg\lvert_1^R = \lim_{R\to\infty} \frac{R^{1-p}}{1-p} - \frac{1}{1-p}\text{.} \end{equation*}

So if $p>1\text{,}$ we see that the integral converges. However for $0 \lt p \leq 1\text{,}$ the integral diverges.

Suppose that $p>0\text{.}$ Find all values of $p$ for which $\ds{\int_{0}^{1}\dfrac{1}{x^p}\,dx}$ converges.

$0\lt p\lt 1$
Solution

We wish to find all values of $p$ for which the integral $\displaystyle \int_0^1 \frac{1}{x^p} \,dx$ converges. We know that

\begin{equation*} \int_0^1 \frac{1}{x}\,dx = \lim_{R\to 0^+} \int_R^1 \frac{1}{x}\,dx = \lim_{R\to 0^+} \ln x \big\vert_R^1 = \ln (1) - \lim_{R\to 0^+} \ln R \to \infty\text{,} \end{equation*}

and so for $p=1$ the integral diverges. For $p > 0, \neq 1\text{,}$ we have

\begin{equation*} \int \frac{1}{x^p} \,dx = \frac{x^{1-p}}{1-p} + C\text{.} \end{equation*}

We are left with two cases: If $p > 1\text{,}$ then

\begin{equation*} \int_0^1 \frac{1}{x^p}\,dx = \lim_{R\to 0^+} \int_R^1 \frac{1}{x}\,dx =\lim_{R\to 0^+} \frac{x^{1-p}}{1-p} \bigg\vert_R^1 = \frac{-1}{p-1}+ \frac{1}{p-1}\lim_{R\to 0^+} \frac{1}{R^{p-1}}, \qquad (p-1 > 0) \end{equation*}

which diverges. If $\lt p \lt 1\text{,}$ then

\begin{equation*} \int_0^1 \frac{1}{x^p}\,dx = \lim_{R\to 0^+} \int_R^1 \frac{1}{x}\,dx = \lim_{R\to 0^+} \frac{x^{1-p}}{1-p} \bigg\vert_R^1 = \frac{1}{1-p}- \frac{1}{1-p}\lim_{R\to 0^+} R^{1-p}, \qquad (1-p > 0) \end{equation*}

which converges to $\dfrac{1}{1-p}\text{.}$ Thus, the integral converges for all $p \in (0,1)\text{,}$ and diverges for all $p\geq 1\text{.}$

Show that $\ds{\int_{1}^{\infty}\dfrac{\sin^2 x}{x(\sqrt{x}+1)}\,dx}$ converges.

Solution

We now show that $\displaystyle \int_1^\infty \frac{\sin^2 x}{x(\sqrt{x}+1)} \,dx$ converges using the comparison test. First notice that $0 \leq \sin^2 x \leq 1$ for all $x\text{.}$ Therefore,

\begin{equation*} \frac{\sin^2 x}{x(\sqrt{x}+1)} \leq \frac{1}{x(\sqrt{x}+1)} = \frac{1}{x^{3/2}+x} \leq \frac{1}{x^{3/2}}, x \in[1,\infty)\text{.} \end{equation*}

Since

\begin{equation*} \int_1^\infty \frac{1}{x^{3/2}}\,dx = \lim_{R\to\infty^-} \int_1^R \frac{1}{x^{3/2}}\,dx = \lim_{R\to\infty^-}\frac{-2}{\sqrt{x}} \bigg\vert_1^R = \lim_{R\to\infty^-} \frac{-2}{\sqrt R} - (-2) = 2\text{,} \end{equation*}

we conclude that $\displaystyle \int_1^\infty \frac{\sin^2 x}{x(\sqrt{x}+1)} \,dx$ converges.