%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Filename: assignment10.tex
% Author:   <NAME>
% Modified: January 09, 2020
%  _         _____   __  __
% | |    __ |_   _|__\ \/ /
% | |   / _` || |/ _ \\  /
% | |__| (_| || |  __//  \
% |_____\__,_||_|\___/_/\_\
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document Definition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[11pt]{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages and Related Settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Global, document-wide settings
\usepackage[margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

% Other packages
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage[cache=false]{minted}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Command Definitions and Redefinitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Nice-looking underline
\newcommand\und[1]{\underline{\smash{#1}}}

% Line spacing is 1.5
\renewcommand{\baselinestretch}{1.5}

% Absolute value
\DeclarePairedDelimiter\abs{\lvert}{\rvert}%

% Absolute value big
\DeclarePairedDelimiter\absb{\Big\lvert}{\Big\rvert}%

% Ceiling
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}

% Floor
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}

% % Naturals, Reals, Integers, and Rationals, 
\newcommand{\nats}{\mathbb{N}}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\preals}{\mathbb{R^+}}
\newcommand{\nreals}{\mathbb{R^-}}
\newcommand{\ints}{\mathbb{Z}}
\newcommand{\pints}{\mathbb{Z^+}}
\newcommand{\nints}{\mathbb{Z^-}}
\newcommand{\rats}{\mathbb{Q}}
\newcommand{\prats}{\mathbb{Q^+}}
\newcommand{\nrats}{\mathbb{Q^-}}
\newcommand{\irrats}{\mathbb{I}}
\newcommand{\pirrats}{\mathbb{I^+}}
\newcommand{\nirrats}{\mathbb{I^-}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Miscellaneous
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Setting stuff
\setlength{\parindent}{0pt}  % Remove indentations from paragraphs

% PDF information and nice-looking urls
\hypersetup{%
  pdfauthor={<NAME>},
  pdftitle={Real Analysis},
  pdfsubject={Mathematics, Real Analysis, Real Numbers},
  pdfkeywords={Mathematics, Real Analysis, Real Numbers},
  pdflang={English},
  colorlinks=true,
  linkcolor={black!50!blue},
  citecolor={black!50!blue},
  urlcolor={black!50!blue}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Author(s), Title, and Date
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Author(s)
\author{<NAME>\\
        Luther College\\
        \href{mailto:<EMAIL>}{<EMAIL>}}

% Title
\title{\rule{\paperwidth - 150pt}{1pt}\textbf{\\\textit{Real Analysis}\\}\rule
{\paperwidth - 150pt}{1pt}\\\textbf{Assignment \textnumero10}\\{\normalsize
Instructor: Dr. <NAME>}}

% Date
\date{\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Beginning of the Document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Homework
%
% 6.2 # 1, 3, 5
% 6.3 # 1, 3
% 6.4 # 3a, 5a
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{itemize}
    \item[6.2.1]
        \begin{itemize}
            \item[(a)]
                \begin{equation*}
                    \boxed{f(x) = \lim_{n \to \infty}{f_n(x)}
                                = \lim_{n \to \infty}{\frac{nx}{1 + nx^2}}
                                = \frac{1}{x}}
                \end{equation*}

            \item[(b)]
                Notice that
                \begin{equation*}
                    f(x) = \frac{1}{x} - \frac{1}{\frac{1}{nx} + x}
                         = \frac{1}{nx^3 + x}
                \end{equation*}
                Then it is easy to see that the convergence is \textbf{not
                uniform} since $\forall \epsilon > 0$ and $\forall n \in
                \nats$, we can always have $x = \frac{1}{2n}$ s.t.
                $\frac{1}{nx^3 + x} = \frac{8n^2}{4n + 1} > \epsilon$ which
                shows that $\abs{f(x) - f_n(x)} > \epsilon$.

            \item[(c)]
                Similar to $(b)$, it is \textbf{not uniform} on $(0, 1)$ since
                $\forall \epsilon > 0$ and $\forall n \in \nats$, we can always
                have $x = \frac{1}{2n}$ s.t.  $\frac{1}{nx^3 + x} =
                \frac{8n^2}{4n + 1} > \epsilon$ which shows that $\abs{f(x) -
                f_n(x)} > \epsilon$.

            \item[(d)]
                We have:
                \begin{equation*}
                    \absb{\frac{x}{nx^2 + x} - \frac{1}{x}}
                        = \absb{\frac{1}{nx^3 + x}}
                        < \frac{1}{n}
                \end{equation*}
                Hence, $\forall \epsilon > 0$ and $\exists N$ s.t. $\forall n
                \geq N, \frac{1}{n} < \epsilon$ and $\abs{f(x) - f_n(x) <
                \epsilon}$. Finally, we got that the convergence \textbf{is
                uniform} on $(1, \infty)$.
        \end{itemize}

    \newpage

    \item[6.2.3]
        \begin{itemize}
            \item[(a)]
                We have:
                \begin{align*}
                    \lim_{n \to \infty}{g_n(x)}
                        &= \lim_{n \to \infty}{\frac{x}{1 + x^n}}
                        = x \text{ if $x < 1$}\\
                    \lim_{n \to \infty}{g_n(x)}
                        &= \lim_{n \to \infty}{\frac{x}{1 + x^n}}
                        = \frac{1}{2} \text{ if $x = 1$}\\
                    \lim_{n \to \infty}{g_n(x)}
                        &= \lim_{n \to \infty}{\frac{x}{1 + x^n}}
                        = 0 \text{ if $x > 1$}\\
                    &and\\
                    \lim_{n \to \infty}{h_n(x)}
                        &= 0 \text{ if $x = 0$}\\
                    \lim_{n \to \infty}{h_n(x)}
                        &= 1 \text{ if $x > 0$}
                \end{align*}
                Hence, $(g_n)$ converges pointwise to
                \begin{equation*}
                    g(x) = 
                    \begin{cases}
                        x \text{ if $x < 1$}\\
                        \frac{1}{2} \text{ if $x = 1$}\\
                        0 \text{ if $x > 1$}\\
                    \end{cases}
                \end{equation*}
                And $(h_n)$ converges pointwise to
                \begin{equation*}
                    g(x) = 
                    \begin{cases}
                        0 \text{ if $x - 1$}\\
                        1 \text{ if $x > 1$}
                    \end{cases}
                \end{equation*}

            \item[(b)]
                It follows by \textbf{Theorem 6.2.6 (Continuous Limit
                Theorem)}, that both $(g_n)$ (pick $x = 1$) and $(h_n)$ (pick
                $x = 0$) do not converge uniformly on $[0, \infty)$.

            \item[(c)]
                For $(g_n)$ consider a half-open interval $[0, 1)$. Then we
                have:
                \begin{equation*}
                    \abs{g_n(x) - g(x)} = \frac{x^n}{1 + x^n} < x^n
                \end{equation*}
                Now, as $x < 1$, it follows that $\forall \epsilon > 0, \exists
                N$ s.t. $\forall n \geq N, x^n < \epsilon$ and therefore the
                convergence is uniform on $[0, 1)$.
                \\
                \\
                For $(h_n)$ consider a half-open interval $[1, \infty)$. Pick
                $N = 2$, then $\forall \epsilon > 0$ and $\forall n \geq N$ we
                have:
                \begin{equation*}
                    \abs{h_n(x) - h(x)} = 1 - 1 = 0 < \epsilon
                \end{equation*}
                Hence, the convergence is uniform on $[1, \infty)$.
        \end{itemize}
    
    \newpage

    \item[6.2.5]
        We first prove the the theorem directly and then its converse. Suppose
        $(f_n)$ converges uniformly on $A$ to some function $f$. Let $\epsilon
        > 0$. Then, by definition, $\exists N \in \nats$ s.t. $\forall x \in A,
        n \geq N$ implies $\abs{f_n(x) - f(x)} < \frac{\epsilon}{2}$. Now, if
        $m, n \geq N$, then, by the triangle inequality, we have:
        \begin{align*}
            \abs{f_n(x) - f_m(x)}
                &= \abs{f_n(x) - f(x) + f(x) - f_m(x)}\\
                &\leq \abs{f_n(x) - f(x)} + \abs{f(x) - f_m(x)}\\
                &< \frac{\epsilon}{2} + \frac{\epsilon}{2}\\
                &< \epsilon
        \end{align*}
        Hence, $\abs{f_n(x) - f_m(x) < \epsilon}$.\\
        $\qed$
        \\
        \\
        Conversely, suppose that $\forall \epsilon > 0, \exists N \in \nats$
        s.t. $\forall x \in A$ and $\forall m, n \geq N, \abs{f_n(x) - f_m(x)}
        < \epsilon$. Now, notice that $(f_n(x))$ is a Cauchy sequence and per
        \textbf{Theorem 2.6.4 (Cauchy Criterion)}, it converges. Now, since
        this is true $\forall x \in A$, we can define $f(x) = \lim_{n \to
        \infty}(f_n(x))$ and we now have to show that $f_n$ converges to $f$
        uniformly. Let $\epsilon > 0$ be given. Then we know that $\exists N
        \in \nats$ s.t. $x \in A$ and $\forall m, n \geq N, \abs{ f_n(x) -
        f_m(x)} < \epsilon$. Then it follows by the \textbf{Algebraic Limit
        Theorem} that $\lim_{m \to \infty}{f_n(x) - f_m(x)} = f_n(x) - f_m(x)$.
        Finally, per the \textbf{Order Limit Theorem}, we get that for $x \in
        A$ and $\forall n \geq N, \abs{f_n(x) - f(x)} < \epsilon$. Hence, we
        got that $f_n$ uniformly converges to $f$.\\
        $\qed$
        \\
        \\
        Finally, we have shown that a sequence of functions $(f_n)$ defined on
        a set $A \subseteq \reals$ converges uniformly on $A$ if and only if
        for every $\epsilon > 0$ there exists an $N \in \nats$ such that
        $\abs{f_n(x) - f_m(x)} < \epsilon$ whenever $m, n \geq N$ and $x \in
        A$.\\
        $\qed$

    \item[6.3.1]
        \begin{itemize}
            \item[(a)]
                Let $\epsilon > 0$ be given. Then on the closed interval $[0,
                1]$, we have:
                \begin{equation*}
                    \abs{g_n(x) - g_m(x)} = \absb{\frac{x^n}{n} - \frac{x^m}{m}}
                \end{equation*}
                Now, if we have $m, n > N$ with $\epsilon > \frac{1}{N}$, we
                then get:
                \begin{equation*}
                    \abs{g_n(x) - g_m(x)} < \absb{\frac{x^n}{n}}
                        \leq \frac{1}{N} < \epsilon
                \end{equation*}
                It follows that $(g_n)$ converges uniformly on $[0, 1]$.
                We have:
                \begin{equation*}
                    0 \leq g(x) = \lim_{n \to \infty}{\frac{x^n}{n}}
                        \leq \lim_{n \to \infty}{\frac{1}{n}} = 0
                \end{equation*}
                Thus, $\forall x \in [0, 1], g(x) = 0$. Hence, $g(x)$ is
                differentiable on $[0, 1]$ and $\forall x \in [0, 1],
                g^\prime(x) = 0$.

            \item[(b)]
                Notice that $g^\prime_n(x) = n \times \frac{x^{n - 1}}{n} =
                x^{n - 1}$. Now, notice that we have:
                \begin{equation*}
                    h(x) = \lim_{n \to \infty}g_n(x) =
                    \begin{cases}
                        0 \text{ if } 0 \leq x \leq 1\\
                        1 \text{ if } x = 1
                    \end{cases}
                \end{equation*}
                Then the convergence is not uniform. To show this we set $x_n =
                \frac{1}{\sqrt[n]{3}}$. We get:
                \begin{equation*}
                    \abs{g^\prime_{n + 1}(x_n) - h(x_n)} = \frac{1}{3}
                \end{equation*}
                Now $\forall n \in \nats, \exists x \in [0, 1]$ s.t.
                $\abs{g_n(x) - g(x)} \geq \frac{1}{3}$ and therefore, the
                convergence is not uniform. Also, notice that $g^\prime$ and
                $h$ are not the same since $g^\prime(1) = 0$ and $h(1) = 1$.
        \end{itemize}

    \item[6.3.3]
        \begin{itemize}
            \item[(a)]
                Notice that we have:
                \begin{equation*}
                    \Big(f_n(x)\Big)^\prime = \frac{1 - nx^2}{(1 + nx^2)^2}
                \end{equation*}
                Then the maximum and minimum should occur when $1 - nx^2 = 0$
                or in other words, $x = \pm \frac{1}{\sqrt{n}}$. Now, we get
                $f^\prime(\frac{1}{\sqrt{n}}) = \frac{1}{4\sqrt{n}}$ and
                $f^\prime(-\frac{}{\sqrt{n}}) = -\frac{1}{4\sqrt{n}}$. Now, it
                follows that $\frac{1}{4\sqrt{n}}$ is the maximum since $f_n(0)
                = 0$ and if $x > 0, f_n(x) > 0$. Moreover, notice that if $x <
                \frac{1}{4\sqrt{n}}, f^\prime(x) > 0$ and thus, $f$ is
                increasing. Similarly, if $x > \frac{1}{4\sqrt{n}}, f^\prime(x)
                < 0$ and $f$ is decreasing. Therefore, $\frac{1}{4\sqrt{n}}$ is
                the maximum. By the similar argument, $-\frac{1}{4\sqrt{n}}$ is
                the minimum. Now, let $\epsilon > 0$ be given and choose $N =
                \frac{1}{16\epsilon^2}$. Then for $n > N$, we have $n >
                \frac{1}{16\epsilon^2} \to \epsilon > \frac{1}{4\sqrt{n}}$.
                Thus, $\forall x \in \reals$, we get $\abs{f_n(x) - 0} \leq
                \frac{1}{4\sqrt{n}} < \epsilon$ and it follows that $f_n$
                converges uniformly to 0.\\
                $\qed$
                \\
                \\
                The limit function is $f(x) = \lim_{n \to \infty}{\frac{x}{1 +
                nx^2}} = 0$.

            \item[(b)]
                From the part $(a)$, we have:
                \begin{equation*}
                    \Big(f_n(x)\Big)^\prime = \frac{1 - nx^2}{(1 + nx^2)^2}
                        = \frac{1 - nx^2}{n^2x^4 + 2nx^2 + 1}
                \end{equation*}
                Now, assuming $x \neq 0$, we can divide both the numerator and
                the denominator by $n^2$ (given $n \neq 0$) and get:
                \begin{equation*}
                    \Big(f_n(x)\Big)^\prime = \frac{\frac{1}{n^2} -
                    \frac{x^2}{n}}{\frac{1}{n^2} +2\frac{x^2}{n} + x^4}
                \end{equation*}
                Since $\forall m \in \nats, \lim{\frac{1}{n^m}} = 0$, it
                follows by the \textbf{Algebraic Limit Theorem} that
                $\lim{f^\prime_n(x)} = 0$. Now, suppose that $x = 0$. Then
                $f^\prime_n = 0$ and if $x \neq 0$, we get $\lim{f^\prime_n(x)}
                = f^\prime(x)$.
        \end{itemize}

    \item[6.4.3]
        \begin{itemize}
            \item[(a)]
                Let $k \in \reals$ be fixed. Then we have:
                \begin{align*}
                    \abs{g(x) - g(k)} &= \absb{\sum_{n = 1}^\infty
                    \frac{\cos{(2^nx)}}{2^n} - \sum_{n = 1}^\infty
                    \frac{\cos{(2^nk)}}{2^n}}\\
                                      &= \absb{\sum_{n = 1}^\infty \frac{\cos{(2^nx)} - \cos{(2^nk)}}{2^n}}\\
                                      &= \absb{\sum_{n = 1}^\infty 2\sin{\Big(\frac{2^n(x + k)}{2}\Big)} \times \sin{\Big(\frac{2^n(k - x)}{2}\Big) \times \frac{1}{2^n}}}\\
                                      &= \absb{\sum_{n = 1}^\infty \frac{1}{2^{n - 1}}\sin{(2^{n - 1}(x + k))}\sin{(2^{n - 1}(k - x))}}
                \end{align*}
                And by applying the triangle inequality, we get:
                \begin{align*}
                    \abs{g(x) - g(k)} &\leq \absb{\sum_{n = 1}^\infty \frac{1}{2^{n - 1}}\sin{(2^{n - 1}(x + k))}\sin{(2^{n - 1}(k - x))}}
                                      &\leq \sum_{n = 1}^\infty \frac{1}{2^{n - 1}\abs{\sin{(2^{n - 1}(k - x))}}}
                \end{align*}
                Hence, $g(x)$ is continuous on all of $\reals$.\\
                $\qed$
        \end{itemize}

    \item[6.4.5]
        \begin{itemize}
            \item[(a)]
                Let $h_n(x) = \frac{x^n}{n^2}$. Then $h_n(x)$ is continuous on
                the closed interval $[-1, 1]$. Furthermore, $\frac{x^n}{n^2}
                \leq \frac{1}{n^2}$ and since $\sum_{n = 1}^\infty n^{-2}$
                converges, by \textbf{Corollary 6.4.5 (Weierstrass M-Test)},
                $\sum_{n = 1}^\infty h_n(x)$ also converges. Finally, by
                \textbf{Theorem 6.4.2 (Term-by-term Continuity Theorem)},
                $h(x)$ is continuous on $[-1, 1]$.
        \end{itemize}
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The End of the Document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}
