\documentclass[12pt]{article}
\usepackage{amsfonts}


%new commands

% reference for equation labels
\newcommand{\eq}[1]{(\ref{#1})}

% abbreviations for equation environments
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\bea}{\begin{eqnarray}}
\newcommand{\eea}{\end{eqnarray}}
\newcommand{\beann}{\begin{eqnarray*}}
\newcommand{\eeann}{\end{eqnarray*}}


% abbreviation for reals

\def\Cx{\mathbb{C}}
\def\Nl{\mathbb{N}}
\def\Ra{\mathbb{Q}}
\def\Rl{\mathbb{R}}
\def\Ts{\mathbb{T}}
\def\Ir{\mathbb{Z}}
\def\DD{\mathcal{D}}

% abbreviations for \varepsilon and \varphi
\newcommand{\eps}{\varepsilon}
\newcommand{\vphi}{\varphi}


\pagestyle{empty}

\begin{document}

\centerline{\textbf{Sample Integration Questions}}
 \centerline{\textbf{Solutions}}
\centerline{\textbf{Math 127B}. \textbf{Winter, 2005}}

\bigskip\bigskip
\noindent
\textbf{1.}  Give an example of a function $f : [0,1]\to \Rl$ such that
$f^2$ is Riemann integrable, but $f$ is not.



\bigskip\noindent
\textbf{Solution.}
\begin{itemize}
\item The function
\[
f(x) = \cases{1 & for $x\in \Ra$,\cr
-1 & for $x\notin \Ra$,}
\]
is not Riemann integrable on $[0,1]$ since the upper Darboux sums
are all equal to $1$, and the lower darboux sums are all equal to $-1$.
The function $f^2$ is the constant function equal to $1$ which is Riemann
integrable.
\end{itemize}



\newpage
\noindent
\textbf{2.}  Suppose that $f : [a,b] \to \Rl$ is a bounded, Riemann
integrable function. Define $F : [a,b] \to \Rl$ by
\[
F(x) = \int_a^x f(t)\, dt.
\]
Prove that there exists a constant $M$ such that
\[
|F(x)-F(y)|\le M|x-y|\qquad\mbox{for all $x,y\in [a,b]$}.
\]
Is $F$ necessarily differentiable in $(a,b)$?

\bigskip\noindent
\textbf{Solution.}
\begin{itemize}
\item Since $f$ is bounded, there is a constant $M$ such that
\[
|f(x)| \le M\qquad \mbox{for all $x\in [a,b]$.}
\]
It follows that for any $x,y\in [a,b]$
\beann
|F(x) - F(y)| &=& \left|\int_x^y f(t)\, dt\right|\\
&\le& \left|\int_x^y |f(t)|\, dt\right|\\
&\le& \left|\int_x^y M\, dt\right|\\
&\le& M \left|x-y\right|.
\eeann
\item $F$ need not be differentiable if $f$ is not continuous. For example,
if
\[
f(x) = \cases{1 & for $x>0$,\cr
-1 & for $x<0$,}
\]
then
\[
F(x) = \int_0^x f(t)\,dt = |x|
\]
is not differentiable at $x=0$.


\end{itemize}



\newpage
\noindent
\textbf{3.} Suppose that $g : \Rl \to \Rl$ is continuous.
Define $f : \Rl \to \Rl$ by
\[
f(x) = \int_0^x (x-t) g(t)\, dt.
\]
Prove that $f$ satisfies the following equations:
\[
f^{\prime\prime}(x) = g(x),\qquad
f(0) = f^\prime(0) = 0.
\]

\bigskip\noindent
\textbf{Solution.}
\begin{itemize}
\item We can rewrite $f$ as
\[
f(x) = x \int_0^x g(t)\, dt - \int_0^x t g(t)\, dt.
\]
Differentiating this equation with respect to $x$
using the product rule and the fundamental theorem of
calculus (which applies since both $g(t)$ and $tg(t)$ are continuous),
we get
\beann
f^\prime(x) &=& x\cdot g(x) + 1 \cdot \int_0^x g(t)\, dt - x g(x)\\
&=& \int_0^x g(t)\, dt.
\eeann
Differentiating this equation with respect to $x$ and using the fundamental
theorem of calculus again, we get
\[
f^{\prime\prime}(x) = g(x).
\]
\item We have
\beann
f(0) &=& \int_0^0 (x-t) g(t)\, dt = 0,\\
f^\prime(0) &=& \int_0^0 g(t)\, dt = 0.
\eeann

\end{itemize}



\newpage
\noindent

\noindent
\textbf{4.} Define the improper integral
\[
\int_0^\infty \frac{\sin x}{x} \, dx
\]
as a limit of proper integrals, and prove that it converges.

\bigskip\noindent
\textbf{Solution.}
\begin{itemize}
\item Note that
\[
\lim_{x\to 0} \frac{\sin x}{x} =1
\]
so $\sin x/x$ extends to a continuous function on $[0,\infty)$.
Its Riemann integral therefore exists on any bounded interval $[0,b]$
with $b > 0$. Hence we define
\[
\int_0^\infty \frac{\sin x}{x} \, dx =
\lim_{b\to \infty} \int_0^b \frac{\sin x}{x} \, dx.
\]
\item Let
\[
I(b) = \int_0^b \frac{\sin x}{x} \, dx.
\]
Then for any $b,c > 0$, we have (using an integration by parts)
\beann
|I(b) - I(c)| &=& \left|\int_b^c \frac{\sin x}{x} \, dx\right|\\
&=& \left|\left[\frac{-\cos x}{x}\right]_b^c - \int_b^c \frac{\cos x}{x^2} \, dx\right|\\
&\le&\left|\frac{\cos b}{b} - \frac{\cos c}{c}\right|
+ \left|\int_b^c \frac{\cos x}{x^2} \, dx\right|\\
&\le&\frac{1}{b} + \frac{1}{c}
+ \left|\int_b^c \frac{1}{x^2} \, dx\right|\\
&\le&\frac{1}{b} + \frac{1}{c}
+ \left|\left[-\frac{1}{x}\right]_b^c\right|\\
&\le&\frac{1}{b} + \frac{1}{c}
+ \left|\frac{1}{b}-\frac{1}{c}\right|\\
&\le&\frac{2}{b} + \frac{2}{c}.
\eeann
Given any $\epsilon >0$, let $N = 4/\epsilon$. It follows from
this inequality that if $b,c > N$ then
\[
|I(b) - I(c)| < \epsilon.
\]
Hence, by the Cauchy criterion, the limit of $I(b)$ as $b\to \infty$ exists,
and the improper integral converges.

\item One can show that
\[
\int_0^\infty \frac{|\sin x|}{x}\, dx = \infty,
\]
so the integral is not absolutely convergent. This is why we had to integrate
by parts (to improve the convergence of the integrals)
before taking absolute values inside the integral.

\item In fact, one can show using methods from complex analysis that
\[
\int_0^\infty \frac{\sin x}{x} \, dx = \frac{\pi}{2}.
\]
\end{itemize}
(This question is more difficult than the ones that will be on the final exam.)

\newpage\noindent
\textbf{5.} Suppose that
\[
F(x) = \cases{x^2 & for $0\le x < 2$,\cr
x^3 & for $2\le x \le 3$.}
\]
Evaluate the Riemann-Stieltjes integral
\[
\int_0^3 x dF(x),
\]
briefly justifying your computations.


\bigskip\noindent
\textbf{Solution.}
\begin{itemize}
\item Note that $F$ has a jump discontinuity of size $4$ at $x=2$.
We separate $F$ into a `jump part' $F_1$ and a `continuous part'
$F_2$ as:
\beann
F(x) &=& F_1(x) + F_2(x),\\
F_1(x) &=&  \cases{0 & for $0\le x < 2$,\cr
4 & for $2\le x \le 3$,}\\
F_2(x) &=& \cases{x^2 & for $0\le x < 2$,\cr
x^3 - 4 & for $2\le x \le 3$.}
\eeann
Then, using a standard property of the Riemann-Stieltjes integral, we have
\beann
\int_0^3 x\, dF(x) &=& \int_0^3 x \,dF_1(x) + \int_0^3 x \, dF_2(x).
\eeann
The Riemann-Stietjes integral with respect to the jump-function $F_1$ is given
by
\[
\int_0^3 f(x) \, dF_1(x) = f(2)\cdot 4, 
\]
so
\[
\int_0^3 x \, dF_1(x) = 8.
\]
If $F$ is continuously differentiable, then
\[
\int_a^b f \, dF = \int_a^b f F^\prime\, dx 
\]
Hence, for the continuous part, using the standard property
that we can split up the domain of integration, we have
\beann
\int_0^3 x \,dF_2(x) &=& \int_0^2 x \,dF_2(x) + \int_2^3 x \,dF_2(x)\\
&=& \int_0^2 x \,d(x^2) + \int_2^3 x \,d(x^3-4)\\
&=& \int_0^2 x \cdot 2x\, dx + \int_2^3 x\cdot 3x^2 \,dx\\
&=& \int_0^2 2x^2 \, dx + \int_2^3 3x^3 \,dx\\
&=& \left[\frac{2x^3}{3}\right]_0^2 + \left[\frac{3x^4}{4}\right]_2^3\\
&=& \frac{16}{3} + \frac{243}{4} - 12\\
&=& \frac{649}{12}.
\eeann
Hence
\[
\int_0^3 x dF(x) = 8 + \frac{649}{12} = \frac{745}{12}.
\]
\end{itemize}
\end{document}
