© | Dror Bar-Natan: Classes: 2004-05: Math 157 - Analysis I: (28) Next: Homework Assignment 6
Previous: Term Exam 1

Solution of Term Exam 1

this document in PDF: Solution.pdf

Problem 1. Find formulas for $ \sin\alpha$, $ \cos\alpha$ and $ \tan\alpha$ in terms of $ \tan\frac{\alpha}{2}$. (You may use any formula proven in class; you need to quote such formulae, though you don't need to reprove them).

Solution. (Graded by Shay Fuchs) Using the formulas $ \sin2\beta=2\sin\beta\cos\beta$ and $ \sin^2\beta+\cos^2\beta=1$ and taking $ \beta=\frac{\alpha}{2}$ we get

$\displaystyle \sin\alpha
= \frac
{2\sin\frac{\alpha}{2}\cos\frac{\alpha}{2}}
{\sin^2\frac{\alpha}{2}+\cos^2\frac{\alpha}{2}}.
$

Dividing the numerator and denominator by $ \cos^2\frac{\alpha}{2}$ this becomes

$\displaystyle \sin\alpha = \frac{2\tan\frac{\alpha}{2}}{\tan^2\frac{\alpha}{2}+1}.
$

Likewise using $ \cos2\beta=\cos^2\beta-\sin^2\beta$ we get

$\displaystyle \cos\alpha
=\frac
{\cos^2\frac{\alpha}{2}-\sin^2\frac{\alpha}{2}}...
...2\frac{\alpha}{2}}
=\frac{1-\tan^2\frac{\alpha}{2}}{1+\tan^2\frac{\alpha}{2}}.
$

Finally, dividing these two formulas by each other we get

$\displaystyle \tan\alpha=\frac{\sin\alpha}{\cos\alpha}
=\frac{2\tan\frac{\alpha}{2}}{1-\tan^2\frac{\alpha}{2}}.
$

Problem 2.

  1. Let $ k$ be a natural number. Prove that any natural number $ n$ can be written in a unique way in the form $ n=qk+r$, where $ q$ and $ r$ are integers and $ 0\leq r<k$.
  2. We say that a natural number $ n$ is ``divisible by $ 3$'' if $ n/3$ is again a natural number. Prove that $ n$ is divisible by $ 3$ if and only if $ n^2$ is divisible by $ 3$.
  3. We say that a natural number $ n$ is ``divisible by $ 4$'' if $ n/4$ is again a natural number. Is it true that $ n$ is divisible by $ 4$ if and only if $ n^2$ is divisible by $ 4$?

Solution. (Graded by Brian Pigott)

  1. We prove this assertion (without uniqueness) by induction. If $ n=1$ write $ n=0k+1$ (if $ k>1$) or $ n=1k+0$ (if $ k=1$). In either case the assertion is proven for $ n=1$. Now assume $ n$ can be written in the form $ n=qk+r$, where $ q$ and $ r$ are integers and $ 0\leq r<k$. If $ r<k-1$ then $ r+1<k$ and so $ n+1=(qk+r)+1=qk+(r+1)$ is a formula of the desired form for $ n+1$. Otherwise $ r=k-1$ and so $ n+1=(qk+r)+1=q(k+1)=q(k+1)+0$, and again that's a formula of the desired form for $ n+1$. This concludes the proof that every natural number $ n$ can be written in the form $ n=qk+r$, where $ q$ and $ r$ are integers and $ 0\leq r<k$. Now assume it can be done in two ways; i.e., assume $ n=q_1k+r_1=q_2k+r_2$ where $ q_1$, $ q_2$, $ r_1$ and $ r_2$ are integers and $ 0\leq r_1, r_2<k$. But then $ q_1k+r_1=q_2k+r_2$ and so $ (q_1-q_2)k=r_2-r_1$ and so $ q_1-q_2=\frac{r_2-r_1}{k}$. But $ q_1-q_2$ is an integer and so $ \gamma=\frac{r_2-r_1}{k}$ is an integer. From $ 0\leq r_1, r_2<k$ it follows that $ -k<r_2-r_1<k$ and so $ -1<\gamma<1$ and so the integer $ \gamma$ must be 0. Thus $ 0=\frac{r_2-r_1}{k}$ and so $ r_1=r_2$. But then the equality $ n=q_1k+r_1=q_2k+r_2$ implies $ q_1k=q_2k$ and so $ q_1=q_2$ and we see that the pair $ (q,r)$ is unique.

  2. An integer $ n$ is divisible by $ 3$ iff $ q=n/3$ is an integer iff $ n=3q$ with an integer $ q$. Now if $ n$ is divisible by $ 3$ then $ n=3q$ with an integer $ q$ and then $ n^2=(3q)^2=9q^2=3(3q^2)$. So $ n^2$ is also $ 3$ times an integer (the integer $ 3q^2$), and so $ n^2$ is also divisible by $ 3$. Assume now that $ n$ is not divisible by $ 3$. By the previous part $ n=3q+r$ with integer $ q$ and $ r$ and with $ 0\leq r<3$. Had $ r$ been 0 we'd have had that $ n=3q+0=3q$ is divisible by $ 3$ contrary to assumption. So $ r=1$ or $ r=2$. In the former case $ n^2=(3q+1)^2=3(3q^2+2q)+1$, but then by the uniqueness of writing $ n^2$ as $ 3q'+r'$ it follows that $ r'=1$, so $ n^2$ cannot be written in the form $ n^2=3q'$, so $ n^2$ is not divisible by $ 3$. In the latter case $ n^2=(3q+2)^2=3(3q^2+4q+1)+1$ and for the same reason again we find that $ n^2$ is not divisible by $ 3$. So if $ n$ is divisible by $ 3$ so is $ n^2$, and if $ n$ is not divisible by $ 3$ so is $ n^2$.

  3. No it's not true. Example: $ 2$ is not divisible by $ 4$ but $ 2^2=4$ is divisible by $ 4$.

Plot of f(x)

Problem 3. A function $ f(x)$ is defined for $ 0\leq x\leq 1$ and has the graph plotted above.

  1. What are $ f(0)$, $ f(0.5)$ and $ f(1)$?
  2. Let $ g$ be the function $ f\circ f$. What are $ g(0)$, $ g(0.5)$ and $ g(1)$?
  3. Are there any values of $ x$ for which $ g(x)=1$? How many such $ x$'s are there? Roughly what are they?
  4. Plot the graph of the function $ g$. (The general shape of your plot should be clear and correct, though numerical details need not be precise).
  5. (5 points bonus, will be given only to excellent solutions and may raise your overall exam grade to 105!) Plot the graphs of the functions $ g\circ f$ and $ g\circ g$.

Solution. (Graded by Derek Krepski)

  1. By inspecting the graph, $ f(0)=0$, $ f(0.5)=1$ and $ f(1)=0$.
  2. $ g(0)=f(f(0))=f(0)=0$, $ g(0.5)=f(f(0.5))=f(1)=0$ and $ g(1)=f(f(1))=f(0)=0$.
  3. $ g(x)=1$ means $ f(f(x))=1$. Denoting $ y=f(x)$ we must have $ f(y)=1$, and inspecting the graph we find that $ y=0.5$. Thus $ f(x)=0.5$. Inspecting the graph we find that there are two values of $ x$ for which this happens and they are approximately $ x=0.15$ and $ x=0.85$.
  4. and 5.:

    g gf gg

Problem 4.

  1. Define `` $ \displaystyle \lim_{x\to a}f(x)=l$'' and `` $ \displaystyle \lim_{x\to a+}f(x)=l$''.
  2. Prove that if $ \displaystyle \lim_{x\to a+}f(x)=l$ and $ \displaystyle \lim_{x\to a-}f(x)=l$ then $ \displaystyle \lim_{x\to a}f(x)=l$.
  3. Prove that if $ \displaystyle \lim_{x\to a}f(x)=l$ then $ \displaystyle \lim_{x\to a+}f(x)=l$ and $ \displaystyle \lim_{x\to a-}f(x)=l$.
  4. Draw the graph of some function for which $ \displaystyle \lim_{x\to a+}f(x)=0$ and $ \displaystyle \lim_{x\to a-}f(x)=1$.

Solution. (Graded by Shay Fuchs)

  1. `` $ \displaystyle \lim_{x\to a}f(x)=l$'' means that for every $ \epsilon>0$ there is a $ \delta>0$ so that whenever $ 0<\vert x-a\vert<\delta$ we have that $ \vert f(x)-l\vert<\epsilon$, while `` $ \displaystyle \lim_{x\to a+}f(x)=l$'' means that for every $ \epsilon>0$ there is a $ \delta>0$ so that whenever $ 0<x-a<\delta$ (i.e., whenever $ a<x<a+delta$) we have that $ \vert f(x)-l\vert<\epsilon$

  2. Let $ \epsilon>0$ be given. Using $ \displaystyle \lim_{x\to a+}f(x)=l$ choose $ \delta_1>0$ so that whenever $ 0<x-a<\delta_1$ we have that $ \vert f(x)-l\vert<\epsilon$. Using $ \displaystyle \lim_{x\to a-}f(x)=l$ choose $ \delta_2>0$ so that whenever $ 0<a-x<\delta_1$ we have that $ \vert f(x)-l\vert<\epsilon$. Set $ \delta=\min(\delta_1,\delta_2)$ and assume $ 0<\vert x-a\vert<\delta$. If $ x>a$ then $ 0<x-a<\delta\leq\delta_1$ and by the choice of $ \delta_1$ it follows that $ \vert f(x)-l\vert<\epsilon$. If $ x<a$ then $ 0<a-x<\delta\leq\delta_2$ and by the choice of $ \delta_2$ it follows that $ \vert f(x)-l\vert<\epsilon$. So in any case, $ \vert f(x)-l\vert<\epsilon$ as required.

  3. Let $ \epsilon>0$ be given. Using $ \displaystyle \lim_{x\to a}f(x)=l$ choose $ \delta>0$ so that whenever $ 0<\vert x-a\vert<\delta$ we have that $ \vert f(x)-l\vert<\epsilon$. But then if $ 0<x-a<\delta$ then certainly $ 0<\vert x-a\vert<\delta$ so by the choice of $ \delta$ we get $ \vert f(x)-l\vert<\epsilon$. Thus $ \displaystyle \lim_{x\to a+}f(x)=l$. A similar argument shows that also $ \displaystyle \lim_{x\to a-}f(x)=l$.

Problem 5. Give examples to show that the following definitions of $ \displaystyle \lim_{x\to a}f(x)=l$ do not agree with the standard one:

  1. For all $ \delta>0$ there is an $ \epsilon>0$ such that if $ 0<\vert x-a\vert<\delta$, then $ \vert f(x)-l\vert<\epsilon$.
  2. For all $ \epsilon>0$ there is a $ \delta>0$ such that if $ \vert f(x)-l\vert<\epsilon$, then $ 0<\vert x-a\vert<\delta$.

Solution. (Graded by Derek Krepski)

  1. This is satisfied whenever there exists a constant $ M$ so that $ \vert f(x)\vert<M$ for all $ x$ and regardless of the limit of $ f$. Indeed, choose $ \epsilon$ bigger than $ \vert l\vert+M$ where $ M$ is a constant as in the previous sentence (for example, if $ f$ is $ \sin x$, then $ M$ can be chosen to be $ 1$), and then $ \vert f(x)-l\vert<\epsilon$ is always true.
  2. According to this definition, for example, $ \displaystyle\lim_{x\to
a}c=c$ is false, and hence it cannot be equivalent to the standard definition. Indeed, in this case $ \vert f(x)-l\vert<\epsilon$ means $ 0=\vert c-c\vert<\epsilon$. This imposes no condition on $ x$, so $ \vert x-a\vert$ need not be smaller than $ \delta$.

The results. 89 students took the exam; the average grade was 59 and the standard deviation was about 18.5.

The generation of this document was assisted by LATEX2HTML.


Dror Bar-Natan 2004-10-20