\documentclass[addpoints, 11pt]{exam}
\setlength{\headsep}{0.125in}
\setlength{\unitlength}{1in}
%
\pagestyle{head}
%
\usepackage{psfrag}
%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
%
\newcommand{\myCourseNumber}{Math 142A}
\newcommand{\myAssignmentDueDate}{Friday, November 20, 2026}
\newcommand{\myAssignmentTitle}{Homework Assignment 5}
%
%
\begin{document}

%
\firstpageheader{\bfseries \myCourseNumber \enspace \myAssignmentTitle \\ Due \myAssignmentDueDate }{}{}
%
\runningheader{{\bfseries (page \textit{\thepage}\ of \textit{\numpages})}}{}{}
%
%\firstpagefooter{}{}{(This exam is worth {\numpoints} points.)}
%

\begin{questions}
    
%%Fitzpatrick 3.1.9
\question Suppose that the function \ $f : \mathbb{R} \to \mathbb{R}$ \ is continuous at the point \ $x_0$ \ and that \ $f(x_0) > 0$. \ Show that there is an interval \ $I_n = \left( x_0 - \frac{1}{n}, \ x_0 + \frac{1}{n} \right)$ \ for some \ $n \in \mathbb{N}$ \ for which \ $f(x) > 0$ \ for every \ $x \in I_n$.

\bigskip

%%Fitzpatrick 3.1.13
\question A function \ $f : D \to \mathbb{R}$ \ is said to be \emph{Lipschitz} provided that there is a number \ $C \geq 0$ \ with
\begin{displaymath} |f(u) - f(v)| \leq C \, |u - v| \quad \text{for all $u$ and $v$ in $D$}. \end{displaymath}
Show that a Lipschitz function is continuous.

\bigskip

%%Fitzpatrick 3.1.14
\question Suppose the function \ $\lambda : \mathbb{R} \to \mathbb{R}$ \ has the the property that $\lambda(u + v) = \lambda(u) + \lambda(v)$ \ for all $u, v$.
\begin{parts}
\part Define the number $m$ by $m := \lambda(1)$.  Show that \ $\lambda(x) = m \, x$ \ for all rational numbers $x$.
\part Show that if $\lambda$ is continuous, then \ $\lambda(x) = m \, x$ for all $x \in \mathbb{R}$.
\end{parts}

\bigskip

\question
\begin{parts}
\part Let $f(x) = \begin{cases} 1 & \text{if $x$ is rational,} \\ 0 & \text{if $x$ is irrational}. \end{cases}$

Show that $f$ is discontinuous at every $x \in \mathbb{R}$.

\medskip

\part Let $h(x) = \begin{cases} x & \text{if $x$ is rational,} \\ 0 & \text{if $x$ is irrational.} \end{cases}$

Show that $h$ is continuous at $x = 0$ and at no other point.

\end{parts}

\bigskip

\question Let $f$ be a real-valued function whose domain is a subset of $\mathbb{R}$.

Show that $f$ is continuous at \ $x_0 \in \text{dom}(f)$ \ if and only if for every sequence $(x_n)$ in \ $\text{dom}(f) \setminus \{x_0\}$ converging to $x_0$, we have \ $\displaystyle \lim_{n \to \infty} f(x_n) = f(x_0)$.

\bigskip

\question Let $f$ and $g$ be continuous functions on $[a, \ b]$ such that \ $f(a) \geq g(a)$ \ and \ $f(b) \leq g(b)$.  Show that there is at least one \ $x_0 \in [a, \ b]$ \ at which \ $f(x_0) = g(x_0)$.

\bigskip

\question Prove that a polynomial $p(x)$ with odd degree has a least one real zero. 

\bigskip

\question Suppose that the function \ $f : [a, \ b] \to \mathbb{R}$ \ is continuous.  Show that for any \ $n \in \mathbb{N}$ \ and points

$x_1, x_n, \ldots, x_n \in [a, \ b]$, \  there is a point \ $z \in [a, \ b]$ \ such that \ $\displaystyle f(z) = \frac{f(x_1) + f(x_2) + \cdots + f(x_n)}{n}$.

\bigskip 

\question Suppose that the function \ $f : \left[0, \ 1\right] \to \mathbb{R}$ \ is continuous with \ $f(0) > 0$, \ and \ $f(1) = 0$. \ Show that there is a number \ $x_0 \in \left(0, \ 1\right]$ \ such that \ $f(x_0) = 0$ \ and \ $f(x) > 0$ \ for every \ $x \in \left[0, \ x_0\right)$.

\bigskip

\question Let $f(x) = \begin{cases} 0 & \text{if $x=0$}, \\ \sin\left(\frac{1}{x}\right) & \text{otherwise}. \end{cases}$

Show that $f$ has the intermediate value property on all of $\mathbb{R}$.

\bigskip

\end{questions}

\end{document}

