\section{Improper Integrals}

Until this time, we have only considered the integral of $f(x,y)$ over $D$ in the special case where $D$ is bounded and also $f(x,y)$ is bounded (i.e. there is some $M > 0$ so that $|f(x,y)| \leq M$ for all $(x,y) \in D$).  

If one (or both) of these assumptions fail, then the integral of $f(x,y)$ over $D$ might not be well defined even if we allow integrals to have infinite values (see below for an example). However, 
if we assume that $f \geq 0$ on $D$, then:
\begin{itemize}
\item either $\iint_{D} f (x,y) dA$ is finite (or \textbf{convergent}) and can be evaluated as a limit of real numbers;
\item or, the integral takes on infinite value (that is, it is \textbf{divergent}).
\end{itemize}

For non-negative functions, we can still evaluate improper double integrals as iterated (and possibly improper) one-dimensional integrals in the variables $x$ and $y$. See examples in the Worked Problems section.


\subsection{Determining Convergence/Divergence of Improper Integrals}
In many cases it is possible to use inequalities and estimates to determine whether an improper integral is convergent or divergent, even if we cannot (or would rather not) evaluate the actual value of the integral.  

The general principle is as follows. 
Suppose that $D \subset \mathbb{R}^2$ is some region and that $f(x,y)$ and $g(x,y)$ satisfy:
$$
0 \leq g(x,y) \leq f(x,y), \textrm{ for all } (x,y) \in D.
$$
Then, we necessarily have
$$
\iint_{D} f(x,y) dA \geq \iint_{D} g(x,y) d A
$$

\smallskip
Therefore:
$$
\iint_{D} g(x,y) d A = \infty \Rightarrow \iint_{D} f(x,y) d A = \infty,
$$
\smallskip

$$
\iint_{D} f(x,y) d A < \infty \Rightarrow \iint_{D} g (x,y) < \infty.
$$
\smallskip


\medskip




\subsection{Without positivity, improper integrals may fail to exist.}

All of the above methods (estimates, iterated integrals) assume that $f(x,y)$ is non-negative on the domain of integration $D \subset \mathbb{R}^2$.  This guarantees that its integral either converges to a number or else is infinite.
If $f(x,y)$ takes on both positive and negative values on its domain $D$,  the area integral $\iint_{D} f d A$ may be undefined for other reasons.  
To show how this can happen, we construct a function $f(x,y)$ on the domain $D : = \{(x,y) : x \geq 0, y \geq 0\}$ such that
$$
\int_0^{\infty} \int_0^{\infty} f(x,y) dx dy
$$
converges, but
$$
\int_0^{\infty} \int_0^{\infty} f(x,y) dy dx 
$$
diverges.

 

The function we choose is defined using the following rule. For $x,y \geq 0$, and for $n=1,2,\dots,$ let
$$
f(x,y) =
\begin{cases}
n , \textrm{ if } n - 1 \leq x < n \textrm{ and } n - 1 < y \leq n \\
-n, \textrm{ if } n \leq  x < n + 1 \textrm{ and } n -1 < y \leq n. \\

\end{cases}
$$
We also let $f(x,y)=0$ for all other pairs $(x,y)$.
The values of $f(x,y)$ are shown below.

\begin{figure}[h]
\centering
\includegraphics[width = .8\linewidth]{52fig5.png}
\caption{A function whose double integral is not well defined. The vertical dots at the upper right-hand corner are to remind you that this sequence of squares continues infinitely.}
\end{figure}

Now, for any $c> 0$, the horizontal line $y = c$ intersects a green square with label $n$ and a red square with label $-n$; moreover, the intersection of this line with the green square has the same length as the intersection with the red square.  Consequently,
$$
\int_0^{\infty} f(x,y) dx = \lim_{N \rightarrow \infty} \int_0^{N} f(x,y) dx = 0 \hbox{ for each }y>0.
$$
However, let us now see what happens if we use vertical lines $x=c$ instead. For $0\leq c< 1$, the line intersects only the first green square with label 1 in an interval of length 1.
For $c\geq 1$, the vertical line $x=c$ intersects a green square with label $n + 1$ and a red square with label $-n$, with both intersections having length 1. As a consequence,  we see that
$$
\int_0^{\infty} f(x,y) dy = \lim_{N \rightarrow \infty} \int_0^N f(x,y) dy = 1\hbox{ for each }x>0.
$$
So, evaluating the iterated integrals of $f$ gives
$$
\int_0^{\infty} \int_0^{\infty} f(x,y) dx dy = \int_0^{\infty} 0 d y = 0
$$
$$
\int_0^{\infty} \int_0^{\infty} f(x,y) dy dx = \int_0^{\infty} 1 d x = \infty.
$$
Hence the iterated integrals attain different values depending upon the order of integration. Consequently, the integral $\iint_{D} f(x,y) d A$ fails to exist. 













\section*{Worked Problems}
\begin{enumerate}[1.]


\item{\it Determine, for each of the following functions $f$ and domains $D$, whether the domain is bounded and whether $f(x,y)$ is bounded on $D$:

\begin{enumerate}
\smallskip
\item $f(x,y) = \frac{1}{x}$ and $D = [0,1]^2$ ;
\smallskip
\item $f(x,y) = \frac{1}{x}$ and $D = \{(x,y) : 0 \leq x \leq 1, 0 \leq y \leq x^2\}$;
\smallskip
\item $f(x,y) = \frac{1}{x^3}$ and $D =  \{(x,y) : 0 \leq x \leq 1, 0 \leq y \leq x^2\}$;
\smallskip
\item $f(x,y) = \frac{1}{x^2 y^2}$ and $D : = \{(x,y) : x \geq 2, y \geq 2\}$.
\end{enumerate}

\medskip
\noindent
Then, evaluate the associated improper integrals to determine if they converge or diverge.
}


\begin{figure}[h]
\centering
\includegraphics[width = .4\linewidth]{52fig3.pdf}
\caption{The region $D$ in (b) and (c)}
\end{figure}



The solutions are as follows:

\medskip

\begin{enumerate}
\item The domain is a closed square of side-length $1$, therefore is bounded. However, since $\frac{1}{x} \rightarrow \infty$ as $(x,y) \rightarrow (0,0)$, we see that $f(x,y)$ is not bounded on $D$.  The iterated integral is
$$
\iint_{D} \frac{1}{x} d A = \int_0^1 \int_0^1 \frac{1}{x} dy dx = \int_0^1 \frac{dx}{x} = + \infty.
$$

\bigskip

\item The domain is, again, bounded, since $|x| \leq 1$ and $|y| \leq x^2 \leq 1^2 = 1$.  Again, $f(x,y)$ is unbounded since $\frac{1}{x}\to 0$ as $(x,y)\to(0,0)$.  Nevertheless, we now have that
$$
\iint_{D} f(x,y) d A = \int_0^1 \int_0^{x^2} \frac{1}{x} dy dx = \int_0^1 x dx  = \frac{1}{2},
$$
and so the integral of $f(x,y)$ converges over this choice of domain.




\bigskip

\item The domain $D$ is the same as in (b) and is thus bounded.  We still have $f(x,y) = \frac{1}{x^3} \rightarrow \infty$ as $(x,y) \rightarrow (0,0)$, therefore $f(x,y)$ is again unbounded on $D$.  We have
$$
\iint_{D} f(x,y) d A = \int_0^1 \int_0^{x^2} \frac{1}{x^3}  dy dx = \int_0^1 \frac{1}{x} dx = \infty,
$$
so that the integral now diverges! Comparing (a), (b), (c) shows that both the domain and the function $f(x,y)$ matter when determining convergence and divergence of the improper integral.

\bigskip

\item In this example, the domain is unbounded, since both $x$ and $y$ may be as large as we wish. However, in this domain, we have:
$$
f(x,y) = \frac{1}{x^2 y^2} \leq \frac{1}{2^2 \cdot 2^2} = \frac{1}{16},
$$
so that $f$ is indeed bounded (even though the domain is unbounded!) Evaluating the associated improper integral gives
\begin{eqnarray*}
\iint_{D} f(x,y) dA & = & \int_2^\infty \int_2^\infty \frac{1}{x^2 y^2} dydx \\
& = & 2 \int_{2}^{\infty} \bigg[- \frac{1}{x^2 y} \bigg]_{y=2}^{\infty} dx = \int_{2}^{\infty} \frac{1}{2 x^2} dx = - \frac{1}{2x} \big\vert_2^{\infty}  \\[1ex]
\quad &=& \frac{1}{4}.
\end{eqnarray*}
And so, the integral of $f(x,y)$ over the unbounded domain $D$ converges.
\end{enumerate}


\bigskip

\item{\it For the following functions $f$ and domains:

\smallskip

\begin{enumerate}
\item $f(x,y) = \frac{1}{\sqrt{x^2 + y^2}}$ and $D =  \{(x,y) : 0 \leq x \leq 1, 0 \leq y \leq x^2\}$;

\smallskip

\item $f(x,y) = \frac{1}{10 + x + \sin y}$ and $D = \{(x,y) : x \geq 0, 0 \leq y \leq 1 \}$,
\end{enumerate}

\smallskip
\noindent
use the convergence/divergence test to determine the behaviour of the associated improper integral.}

\medskip
The solutions are as follows:

\smallskip

\begin{enumerate}
\item We estimate
$$
f(x,y) = \frac{1}{\sqrt{x^2 + y^2}} \leq \frac{1}{\sqrt{x^2}} = \frac{1}{x}
$$
where we used that $x \geq 0$ on $D$ in the last equality.  However, from Worked Problem 1(b), we know that
$$
\iint_{D} \frac{1}{x} d A < \infty \Rightarrow \iint_{D} \frac{1}{\sqrt{x^2 + y^2}} d A < \infty.
$$
We are done.

\smallskip
\item Notice that, on our domain $D$, we have $0 \leq y \leq 1$ so that $0 \leq \sin y \leq \sin 1 < \sin \frac{\pi}{2} = 1$.  This is a consequence of the region having bounded $y$ values, even though the $x$ values are unbounded, as shown in Figure \ref{52fig4}.

\begin{figure}[h]
\centering
\includegraphics[width = .4\linewidth]{52fig4.pdf}
\caption{The unbounded domain $D$ in (b)}\label{52fig4}
\end{figure}

Hence
$$
f(x,y) = \frac{1}{10 + x + \sin y} \geq \frac{1}{10 + x + 1} = \frac{1}{x + 11}, \textrm{ for all } (x,y) \in D.
$$
Let $g(x,y) = \frac{1}{11 + x}$. Then,
$$
\iint_{D} g(x,y) d A = \int_0^{\infty} \int_0^1 \frac{1}{x + 11} dy dx = \int_0^{\infty} \frac{1}{x + 11} dx = \log (x + 11) \big\vert_{x = 0}^{\infty} = \infty
$$
Now, since $f(x,y) \geq g(x,y)$ for all $(x,y)$ in $D$, we see that
$$
\iint_{D} f(x,y) d A \geq \iint_{D} g(x,y) dA = \infty,
$$
and so the integral of $f$ over $D$ diverges.
\end{enumerate}

\end{enumerate}



\bigskip


\section*{Practice Problems}
\begin{enumerate}[1.]
\item
{Determine whether the integral
$$\displaystyle \iint_Q \frac{x}{(1+x)(1+y)}dA,
$$
 where $Q$ is the first quadrant of the $xy$-plane, converges or diverges. If
it converges, evaluate it.}

\bigskip

\item {Determine whether the integral
$$\displaystyle \iint_{Q} e^{y-x} dA$$ converges or diverges, if
$$
Q : = \{(x,y) : \ x \geq 1, \ 0 \leq y \leq \ln (x^2 + x + 1) \}
$$
If it converges, evaluate it.}

\bigskip

\item {Determine whether the integral
$$\displaystyle \iint_{D} \frac{e^y }{y^{3/2} }\, dA$$ is convergent,
if $D$ is the triangle in the $xy$-plane with vertices $(0,0)$, $(1,0)$, $(1,1)$.
(You do not have to evaluate the integral.)}

\bigskip


\item 
Let $D$ be the region $\{(x,y):\ x\geq 2,0\leq y\leq \pi\}$.
Prove that the integral
$$
\iint_D \frac{1+e^{-x}}{x^2-\sin^2 y}dA
$$
is convergent, by comparing it to a different integral that is easier to evaluate.

\end{enumerate}




