\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{mathrsfs}
\usepackage{hyperref}

\begin{document}
\flushleft\underline{Homework 9 --- MATH 4590 Spring 2018} \\
\begin{enumerate}[1.]
\item Use induction to prove that
$$1+r+r^2+\ldots+r^n = \dfrac{1-r^{n+1}}{1-r}.$$
\textit{Proof}: The case $n=1$ says $1+r = \dfrac{1-r^2}{1-r}$. Since $1-r^2=(1-r)(1+r)$ we get $\dfrac{(1-r)(1+r)}{1-r} = 1+r$, completing this case. Now assume it holds for $n=N$, i.e. assume
$$(*) \hspace{35pt} 1+r+r^2+\ldots+r^N = \dfrac{1-r^{N+1}}{1-r}.$$
We now want to show it holds, i.e. 
$$\textbf{Goal: } 1+r+r^2+\ldots+r^N+r^{N+1} = \dfrac{1-r^{N+2}}{1-r}.$$
Start with the left-hand side:
$$\begin{array}{ll}
1+r+\ldots+r^{N}+r^{N+1} &\stackrel{(*)}{=} \dfrac{1-r^{N+1}}{1-r} + r^{N+1} \\
&=\dfrac{1-r^{N+1}}{1-r} + \dfrac{r^{N+1}-r^{N+2}}{1-r} \\
&= \dfrac{1-r^{N+2}}{1-r},
\end{array}$$
completing the proof. $\blacksquare$
\newpage
\item Define 
$$F(x) = \left\{ \begin{array}{ll}
0, & \quad x<0 \\
(n-1)x - \dfrac{(n-1)n}{2}, & \quad x \in [n-1,n), n \in \{1,2,3,\ldots\}
\end{array} \right.$$
\begin{enumerate}[a.)]
\item Sketch this function on $[0,5]$. Is $F$ continuous? \\
\textit{Solution}: 
\begin{tikzpicture}[scale=0.5]
\draw (-5,0) -- (5,0);
\draw (0,0) -- (0,15);
\draw[very thick] (-5,0) -- (1,0);
\draw[very thick] (1,0) -- (2,1);
\draw[very thick] (2,1) -- (3,5);
\draw[very thick] (3,5) -- (4,9);
\draw[very thick] (4,9) -- (5,14);

\draw (-0.35,1) node {$1$};
\draw (-0.35,5) node {$5$};
\draw (-0.35,9) node {$9$};
\draw (-0.35,14) node {$14$};
n=3 2x-3
n=4 3x - 6
n=5 4x - 10
\end{tikzpicture}
\item Find $F'(x)$ at places which have a derivative. Add a sketch for $F'$ to your sketch in part a.). \\
\textit{Solution}: 
$$F'(x) = \left\{ \begin{array}{ll}
0, & \quad x<1 \\
1, & \quad 1<x<2 \\
2, & \quad 2<x<3 \\
3, & \quad 3<x<4 \\ 
\vdots & \quad\quad\quad\vdots \\
n, & \quad n<x<n+1 \\
\vdots & \quad\quad\quad\vdots
\end{array} \right.$$
Which is identical to $\lfloor x \rfloor$ for any $x \not\in \mathbb{Z}$. (note: it is ok to not equal $\lfloor x \rfloor$ at $x \in \mathbb{Z}$ because $\mathbb{Z}$ is a zero set and so it does not contribute to the integral in part c)!!)
\item Use the above part to evaluate $\displaystyle\int_a^b \lfloor x \rfloor \mathrm{d}x$, where $\lfloor x \rfloor$ denotes the floor function (i.e. $\lfloor x \rfloor$ is the greatest integer $\leq x$) \\
\textit{Solution}: We get, since $\lfloor x \rfloor \stackrel{\text{almost everywhere}}{=} F'(x)$,
$$\displaystyle\int_a^b \lfloor x \rfloor \mathrm{d}x = \displaystyle\int_a^b F'(x) \mathrm{d}x = F(b)-F(a),$$
where $F$ is the function defined in this question.
\end{enumerate}
\item Prove that if $Z_1$ and $Z_2$ are zero sets, then $Z_1 \cup Z_2$ is a zero set. \\
\textit{NOTE}: Recall that a set $Z$ is called a zero set provided that for any $\epsilon>0$ there exists a sequence of interval $(\alpha_n,\beta_n)$ so that for any $\xi \in Z$, $\xi \in (\alpha_j,\beta_j)$ for some $j$ (this means the intervals ``cover" $Z$) and the sum of the lengths of these intervals is $<\epsilon$, i.e.
$$\displaystyle\sum_{n=1}^{\infty} \mathrm{length}\Big( (\alpha_n,\beta_n) \Big) = \displaystyle\sum_{n=1}^{\infty} \beta_n-\alpha_n < \epsilon.$$
\textit{Proof}: Suppose that $Z_1$ and $Z_2$ are zero sets. Let $\epsilon > 0$. We need to show that $Z_1 \cup Z_2$ is also a zero set. Since $Z_1$ is a zero set, there is a sequence of intervals $(\alpha_n, \beta_n)$ covering $Z_1$ so that
$$\displaystyle\sum_{n=1}^{\infty} \beta_n - \alpha_n < \dfrac{\epsilon}{2}.$$
Similarly, there is a different sequence of intervals $(\gamma_n, \delta_n)$ that cover $Z_2$ so that
$$\displaystyle\sum_{n=1}^{\infty} \delta_n - \gamma_n < \dfrac{\epsilon}{2}.$$
Define a new sequence of intervals 
$$(\phi_n,\psi_n) = \left\{ \begin{array}{ll}
(\alpha_n, \beta_n), & \quad n=1,3,5,7,\ldots \\
(\gamma_n, \delta_n), & \quad n=2,4,6,8,\ldots.
\end{array} \right.$$
Then we observe that the sequence $(\phi_n,\psi_n)$ covers $Z_1 \cup Z_2$ and 
$$\displaystyle\sum_{n=1}^{\infty} \psi_n - \phi_n = \left( \displaystyle\sum_{n \in \{1,3,5,7,\ldots\}} \beta_n - \alpha_n \right) + \left( \displaystyle\sum_{n \in \{2,4,6,8,\ldots\}} \delta_n - \gamma_n \right) < \dfrac{\epsilon}{2} + \dfrac{\epsilon}{2} = \epsilon,$$
proving that $Z_1 \cup Z_2$ is a zero set. $\blacksquare$
\item Show that any two antiderivatives of a function $f$ differ by a constant. (\textit{hint: use the ``antiderivative theorem"}) \\
\textit{Solution}: Let $F_1$ and $F_2$ be any two antiderivatives of $f$. By the antiderivative theorem, each of these differ from the indefinite integral $I=\displaystyle\int_a^x f(t) \mathrm{d}t$ by a constant, say $F_1 = I+C_1$ and $F_2 = I+C_2$. Now we see that
$$F_1-F_2 = (I+C_1) - (I+C_2) = C_1-C_2,$$
or in other words, $F_1$ and $F_2$ differ by a constant, as was to be shown.

\item If $f_n \rightrightarrows f$ and $g_n \rightrightarrows g$ on $A$, prove that $f_n+g_n \rightrightarrows f+g$ on $A$. \\
\textit{Solution}: Let $\epsilon > 0$. Since $f_n \rightrightarrows f$, we know there exists $N_f$ so that for all $n \geq N_f$ and $\forall x \in A$, 
$$|f_n(x) - f(x)| < \dfrac{\epsilon}{2}.$$
Similarly, since $g_n \rightrightarrows g$, we know there exists $N_g$ so that for all $n \geq N_g$ and $\forall x \in A$, 
$$|g_n(x)-g(x)| < \dfrac{\epsilon}{2}.$$
Therefore if we choose $N = \mathrm{max}\{N_f,N_g\}$ and let $n \geq N$, we may calculate for all $x \in A$,
$$\begin{array}{ll}
|(f_n(x)+g_n(x)) - (f(x)+g(x))| &= |(f_n(x)-f(x)) + (g_n(x)-g(x))| \\
&\leq |f_n(x)-f(x)| + |g_n(x)-g(x)| \\
< \dfrac{\epsilon}{2} + \dfrac{\epsilon}{2} \\
= \epsilon,
\end{array}$$
completing the proof. $\blacksquare$
\end{enumerate}
\end{document}