\documentclass[12pt]{exam}
\usepackage{amsmath,amsfonts, times,amsthm,graphicx,xypic}

% \setlength{\textwidth}{6.5 in}
% \setlength{\oddsidemargin}{0pt}
% \setlength{\evensidemargin}{0pt}
% \setlength{\textheight}{8.5 in}
% \setlength{\headsep}{20pt}
% \setlength{\topmargin}{20pt}

\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\theenumi)}

\newcommand{\ds}{\displaystyle}
\newcommand{\ben}{\renewcommand{\theenumi}{\alph{enumi}}\renewcommand{\labelenumi}{(\theenumi)}\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}

\newcommand{\ba}{\begin{longanswer}}
\newcommand{\ea}{\end{longanswer}}

\theoremstyle{theorem}
\newtheorem*{claim}{Claim}

\newcommand{\bp}{\addtocounter{problemnum}{1}\begin{problem}}
\newcommand{\ep}{\end{problem}}

\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\id}{\operatorname{id}} 

\newcommand{\ra}{\rightarrow} 

\title{Practice Final}
\target{Math 157}

\begin{document}


\begin{exam}{\today}


\bp Everyone ought to try to approximate $\pi$. 
\ben
\item Define the number $\pi$.
\item The picture on the left makes it easy to see that
$2<\pi<4$:
$$\includegraphics[scale=0.4]{circlepic1.pdf}\qquad \includegraphics[scale=0.4]{circlepic3.pdf}$$
It takes more work to see that $3<\pi$.  Here's one way:
Use the following points $$(0,1),\quad \left(\frac{7}{25},\frac{24}{25}\right),\quad 
\left(\frac{3}{5},\frac{4}{5}\right),\quad\left(\frac{4}{5},\frac{3}{5}\right),\quad
\left(\frac{24}{25},\frac{7}{25}\right),\quad (1,0)$$ as the vertices of a
polygon (as pictured on the right) to approximate the area of the
quarter unit circle.  Use this to (under) approximate $\pi$.
\item Here's another way to approximate $\pi$.  Let
  $\mathcal{P}=\{x_0,x_1,\ldots, x_n\}$ be a partition of $[0,1]$ into
  $n$ subintervals of equal length.  
  Define step a function $s:[0,1]\to \R$ by
$$s(x)=\sqrt{1-x_{k+1}^2} \text{ if }x_k\leq x < x_{k+1} $$
%\text{ and } t(x)=\sqrt{1-x_{k}^2} \text{ if }x_k\leq x < x_{k+1}.$$
Note that $\ds \int_0^1 s < \frac{\pi}{4}.$ %<\int_0^1 t.$
How large must $n$ be in order for $3.14<\ds 4 \int_0^1 s $?
% or $\ds \int_0^1 t$
%to approximate $\pi$ to two decimal places?  
%That is, how large must
%$n$ be in order for $$\ds 3.14<4\int_0^1s<\pi<\ds 4\int_0^1 t<3.15?$$
\een
\ep

\bp Expressions like $\ds\int_0^1 \frac{1}{\sqrt{x}}dx$ and $\ds\int_1^\infty
\frac{1}{x^2}dx$ are undefined because (so far!) we have defined
$\ds\int_a^b f$ only for finite intervals
$[a,b]$ and for bounded functions $f$.  Nonetheless, by using limits we
can make sense of these ``improper integrals.''   We define
$$\ds\int_0^1 \frac{1}{\sqrt{x}}dx :=\lim_{B\to 0^+}\int_B^1 \frac{1}{\sqrt{x}}dx
\qquad \text{ and }\qquad 
\int_1^\infty\frac{1}{x^2}dx :=\lim_{B\to \infty}\int_1^B \frac{1}{x^2}dx.$$
\ben
\item Compute 
$\ds \int_0^1 \frac{1}{\sqrt{x}}dx $
\item Compute
$\ds \int_1^\infty\frac{1}{x^2}dx.$
%\item Define and compute $\ds \int_{1}^{\infty} \frac{1}{x^3}dx $
\een
\ep

\bp Let $f:[0,\infty)\to \R$ by $f(t)=\cos(\sqrt{t})$ and define
$A:[0,\infty)\to \R$ by $$A(x)=\int_0^x f(t)dt.$$
\ben
\item Sketch the graph of $f$.
\item Approximate $A(x)$ for $x=0,\pi^2, \frac{9\pi^2}{4},$ and $4\pi^2$.
\item On what intervals is $A$ increasing?  decreasing?
\item On what intervals is $A$ concave up?  concave down?
\item Sketch a good picture of the graph of $A$.
\een
\ep

% \bp Let $A=\{\text{continuous functions }f:[0,1]\to \R\}$.  For any
% $f\in A$, define $$\|f\|=\sup\{f(x)\}.$$  
% \ben
% \item Prove that $\|f+g\|\leq
% \|f\|+\|g\|.$
% \item Prove that $\|f\|=0\Rightarrow f=0.$
% \een
% \ep

\bp The $k$-th Fibonacci number $F_k$ is defined inductively for all
  $k$ by $F_1=1$, $F_2=1$, and $F_k=F_{k-1}+F_{k-2}$ for all $k>2$.
  The first few Fibonacci numbers are $$1,1,2,3,5,8,13,21,34,55,89,144,
  \ldots $$
  Prove that for every $n\in \N$, $F(4n)$ is divisible by $3$.
%\een
\ep


\bp Let $\pi_1:\R^2 \to \R$ and $\pi_2:\R^2 \to \R$
   be the canonical projections 
$$
\xymatrix{
&\R\times \R\ar@{->}[ld] _{\pi_1} \ar@{->}[rd]^{\pi_2} & \\
\R&&\R}
$$
For each of the following sets $A\subset \R^2$ describe $\pi_1(A)$ and $\pi_2(A)$.
\ben
% \item $A=\text{ the graph of $f$}$ where $f:(0,1]\to \R$ is given by
%   $f(x)=\frac{1}{x}$. 
\item $A=\text{ the graph of $g$}$ where $g:\R \to \R$ is given by
  $g(x)=0$ if $x\in \R \setminus \Q$ and $\frac{1}{r}$ if
  $x=\frac{p}{q}\in \Q$ is in lowest terms.
\item $A$ is the ordinate set of $g$ where $g:\R \to \R$ is given by
  $g(x)=0$ if $x\in \R \setminus \Q$ and $\frac{1}{r}$ if
  $x=\frac{p}{q}\in \Q$ is in lowest terms.
% \item $A$ is the graph of $h:\left[ -\frac{\pi}{3},\frac{\pi}{6}\right]\to \R$ where $h(x)=5\sin(3x)+2.$ 
\item $A$ is the unit circle.
\item $A=\{(x,y): 1<x\leq 2 \text{ and }5\leq x <7\}.$
\een
\ep


\bp Give an example, or prove that no such example exists.
\ben %\addtolength{\itemsep}{12pt}
\item Two functions $f,g$ satisfying $\ds\lim_{x\to 0}f(x)=0$,
  $\ds\lim_{x\to 0}g(x)=0$ and $\ds\lim_{x \to 0}\frac{f(x)}{g(x)}=3$
\item A continuous bijection $f:(0,1)\to \R $
\item A bijection $f:[0,2\pi)\to C$ where $C\subset \R^2$ is the unit circle
\item A function $f:[1,3]\to \R$ satisfying $f(1)=-1$, $f(3)=1$, and $f(x)\neq 0$
  for any number $x$
\item A continuous function $f$ whose domain is all real numbers
  satisfying $f(n)=n!$ for all $n\in \N$
%\item A continuous function $f:[0,1]\to \R$ so that $f(x)-x$ has no
%  minimum on $[-1,1]$.
\item A function with domain $[0,2]$ and range $[0,2]\cup [3,4]$
\item A function with domain $[0,2]$ and range $(0,2)$
\item A continuous function with domain $[0,2]$ and range
  $[0,2)\cup(2,3]$
%\item A continuous function with domain $[0,2]$ and range
%  $[0,2)$.
%\item A function whose domain is $[0,2]$ that has no minimum.
\item A function whose domain is $\R$ and whose range is $(0,1)$
\een
\ep


% \bp Recall that for any two sets $X$ and $Y$, the untion $X\cup Y$
% satisfies the important property
% \begin{quote}
% \emph{For any set $Z$ and
% any functions $f:X\to Z$ and $g:Y\to Z$ such that $f(x)=g(y)$ if $x=y$ 
% there exists a unique function 
% $h:X \cup Y\to Z$ so that $hi_1=f$ and $hi_2=g.$
% }
% \end{quote}
% $$
% \xymatrix{
% &Z&\\
% &X\cup Y \ar@{-->}[u]_h& \\
% X\ar@{->}[ru] _{i_1}\ar@{->}[ruu] ^{f}&&Y\ar@{->}[lu]^{i_2}Y\ar@{->}[luu]_{g} }
% $$
% \ben
% \item If $X=(-\infty,1)$ and $Y=[1,\infty)$ then $X\cup Y=\R$.  Give
%   an example to show that if $f:X \to \R$ and $g:Y\to \R$ are
%   continuous, the function $h: X \cup Y \to \R$ need not be
%   continuous.
% \item If $X=(-\infty,2]$ and $Y=[1,\infty)$ then $X\cup Y=\R$.  Prove
%   that if $f:X \to \R$ and $g:Y\to \R$ are
%   continuous, and $f(x)=g(y)$ if $x=y$, then the function 
%   $h: X \cup Y \to \R$ is also continuous.
% \een
% \ep



\bp Compute.  
\ben
\addtolength{\itemsep}{0.25in}
\item $\ds \lim_{h\to 0}\left( \frac{1}{h}\right)\left(\frac{3}{2+h}-\frac{3}{2}\right)$
\item $\ds \int_1^5 \left [ x^2-3x+2 \right]dx$
\item $\ds \lim_{x \to \infty}\sqrt{x^2+x}-x$
\item $\ds \int_0^\pi \cos \left(\frac{x}{2}\right)dx$
\item $\ds \int_0^ \pi |\sin(x)+\cos(x)|dx$
\item $\ds \int_0^2 \frac{x+\sqrt{4-x^2}}{2}dx$
\item $\ds \int_0^1 x^{\frac{1}{5}} dx$
%\item $\ds \lim_{B \to \infty}\int_1^B \frac{dx}{x^2}$
\item $\ds\lim_{h\to
    0}\frac{ \cos\left(\frac{\pi}{3}+h\right)-\frac{1}{2}}{h}$
\item $\ds \lim_{ x \to 0}\frac{\sin(x)}{x}$
\item $\ds \lim_{x\to \infty}\frac{\sin(x)}{x}$
\een
\ep

\bp True or false.
\ben
\addtolength{\itemsep}{.25cm}
\item If $f:X\to Y$ is injective, then for all $A\subset
  X$, $$f(X\setminus A)=Y\setminus f(A).$$
 \item For any $a,b,c,d\in \R$, $(ac+bd)^2\leq (a^2+c^2)(b^2+d^2).$
 \item If $A$ and $B$ satisfy $$\frac{17-6n}{3}\leq A \leq B \leq
   \frac{17+6n}{3}$$ for every $n\in \N$, then $A=B$.
\item If $f:[a,b]\to \R$ is monotonic then $f$ is integrable.
\item If $f:[a,b]\to \R$ is bounded then $f$ is integrable.
\item If $f:[a,b]\to \R$ is bounded then $f$ is continuous.
\item If $f:[a,b]\to \R$ is integrable then $f$ is monotonic.
\item If $f:[a,b]\to \R$ is integrable then $f$ is continuous.
\item If $f:[a,b]\to \R$ is monotonic then $f$ is invertible.
\item If $f:[a,b]\to \R$ is invertible then $f$ is monotonic.
\item If $f:[a,b]\to \R$ is integrable then $f$ is bounded.
\item If $f:[a,b]\to \R$ is integrable then $f$ is invertible.
\item If $f:[a,b]\to \R$ is continuous then $f$ is bounded.
\item For every real number $x$ there exists a real number $y$ with
  $y^2=x$.
\een
\ep


















\end{exam}
\end{document}
















