Spivaks proof on the intermediate value theorem

calculuslimitsself-learning

I am a student trying to learn calculus and I've been working my way through spivaks calculus book and I am quite confused on his proof of the intermediate value theorem.

I understand how to use the intermediate value theorem but in his proof he states that if $f$ is continuous on $[a,b]$ and $f(a)<c<f(b)$ then there is some $x$ in $[a,b]$ such that $f(x)=c$. His proof says that let $g=f-c$, then $g$ is continuous and $g(a)<0<g(b)$, then by theorem 1 (which is a theorem that I understand) there is an $x$ in $[a,b]$ such that $g(x)=0$, which means $f(x)=c$.

I looked online everywhere for a similar version of this proof to no avail. My question is how can we say that $g$ is continuous? It does not seem like a rigorous proof?

Best Answer

$f$ is a continuous on $[a,b]$. $c$ is a constant.

Lemma: for any continuous function $f$ on $[a,b]$ and constant $c$, the function $g(x) =f(x) -c$ is continuous on $[a,b]$.

Pf: Let $d \in [a,b]$. $f$ is continuous at $x=d$ so $\lim_{x\to d} f(x) = f(d)$. That means that for any $\epsilon > 0$ there is a $\delta>0$ so that $|x-d| < \delta$ will imply $|f(x) - f(d)| < \epsilon$.

But that means $|g(x) - g(d)| = |(f(x) -c) -(f(d) -c)| = |f(x) -f(d)| < \epsilon$.

That means using the same $\delta$ and $\epsilon$ that $\lim_{x\to d} g(x) = g(d)$.

Which means $g$ is continuous at $x = d$ for all $d \in [a,b]$.

Related Question