True or False: If the function $(f + g)(x)$ is continuous, then the functions $f(x)$ and $g(x)$ are continuous

continuityreal-analysis

The full question comes from Advanced Calculus by Fitzpatrick, Section 3.1, Question 1a

Determine if the following is true or false and justify answer

If $f + g : \mathbb{R} \rightarrow \mathbb{R}$ is continuous, then $f : \mathbb{R} \rightarrow \mathbb{R}$ and $g : \mathbb{R} \rightarrow \mathbb{R}$ are continuous

My intuition tells me this is false, but when I work through it I'm arriving at something that looks like True

My attempt

This is of form $P \rightarrow Q$ so it will be False when we have $True \rightarrow False$.

Assume $f + g$ is continuous. Our goal is of form
$$\lim\limits_{n \to \infty}x_n = x_0 \rightarrow \lim\limits_{n \to \infty}f(x_n) = f(x_0) \quad \wedge \quad \lim\limits_{n \to \infty}x_n = x_0 \rightarrow \lim\limits_{n \to \infty}g(x_n) = g(x_0)$$

We can prove each separately. Note that each is of the form $P \rightarrow Q$ so we will assume $P$ again and show $Q$.

Let $x_0$ be arbitrary and assume $\lim\limits_{n \to \infty}x_n = x_0$.

\begin{align}
\lim\limits_{n \to \infty}x_n = x_0 \rightarrow&& &\lim\limits_{n \to \infty}(f+g)(x_n) = (f+g)(x_0) &&\text{assumption and definition of continuity} \tag 1\\
\lim\limits_{n \to \infty}x_n = x_0 \rightarrow&& &\lim\limits_{n \to \infty}f(x_n) + g(x_n) = f(x_0) + g(x_0) && \text{def. of sum of functions} \tag 2\\
\lim\limits_{n \to \infty}x_n = x_0 \rightarrow&& &\lim\limits_{n \to \infty}f(x_n) + \lim\limits_{n \to \infty}g(x_n) = f(x_0) + g(x_0) && \text{sum property of limits} \tag 3
\end{align}

At this point it seems like you can get $\lim\limits_{n \to \infty}f(x_n) = f(x_0)$ and $\lim\limits_{n \to \infty}g(x_n) = g(x_0)$ which would show this all to be true, however I don't think that is a valid step.

That being said, that doesn't prove it False – I think I need a counterexample but I'm not seeing one.

Any help is appreciated to refine this.

Best Answer

It is false. Let $f\colon \mathbb R \to \mathbb R$ be: $$ f(x) = \begin{cases} -1 &\text{if } x \lt 0 \\ 1 & \text{otherwise} \end{cases} $$ and let $g\colon \mathbb R \to \mathbb R$ be: $$ g(x) = \begin{cases} 1 &\text{if } x \lt 0 \\ -1 & \text{otherwise} \end{cases} $$

Then $f$ and $g$ are not continuous at $x = 0$, but their sum is the zero function, which is continuous everywhere.

Related Question