# Discontinuous and Continuous Functions

Hi I have a question which I know has already sort of been put onto this site, but I really don't understand how to approach this or whether it is true or false.

I know that if $f$ and $g$ is continuous at $a$, then $f+g$ is continuous at $a$.

Question: True or False and state why... If neither $f$ nor $g$ is continuous at $a$, then $f+g$ is not continuous at $a$.

I'm unsure how to substantiate whether the question is true or false and why. Can anyone help me please?

• If you think the question is false, a counter example is often the way to go. You should try to consider some examples first and make up your mind on whether you think it is true or false. Try really basic examples first. Hint: What happen if you consider $-f$? – Maxime Scott Dec 16 '17 at 16:04
• @MaximeScott . Well said. And the example $g=-f$ is perfect. – DanielWainfleet Dec 16 '17 at 16:15
• Oh okay thanks, i've been trying to do this for ages and thinking it was really difficult or something... – The Statistician Dec 16 '17 at 16:16

Consider the following case:

$f(x) = \begin{cases} 1, & \text{if$x = 0$} \\[2ex] 0, & \text{if$x \ne 0$} \end{cases}$

So $f$ is not continuous.

$g(x) = \begin{cases} 0, & \text{if$x = 0$} \\[2ex] 1, & \text{if$x \ne 0$} \end{cases}$

So $g$ is not continuous.

Then $f(x)+g(x) = 1$, which is a continuous function. So the argument is false. And actually this can be generalized:

Let $h(x)$ be a continuous function. Then if $h(0) \ne 0$ we can write $$f(x) = \begin{cases} h(x), & \text{if x = 0} \\[2ex] 0, & \text{if x \ne 0} \end{cases}$$ and

$$g(x) = \begin{cases} 0, & \text{if x = 0} \\[2ex] h(x), & \text{if x \ne 0} \end{cases}$$ otherwise, if $h(0) = 0$, we can just pick another $x$, e.g. $x = 1$. Then we can write every real valued continuous function $h(x)$ as $h(x) = f(x)+g(x)$ (I am not sure it can be generalized for complex valued functions and maybe some other types of functions that I don't know).

• That actually makes this example so much easier to understand. I've been thinking it was really difficult and not getting anywhere, but now you've explained it it actually makes it seem so simple and easy. Thanks so much – The Statistician Dec 16 '17 at 16:17
• No problem, I learned something from that as well :) – ArsenBerk Dec 16 '17 at 16:28

Consider a counter example, the discontinuous floor function: $$\left \lfloor{x}\right \rfloor$$ What happens if you do the following? $$\left \lfloor{x}\right \rfloor - \left \lfloor{x}\right \rfloor$$

• Is that the Modulus of x? and if so, surely |x|-|x|=0?? – The Statistician Dec 16 '17 at 16:23
• @DomJones It is the floor function, not modulus. And yes, it should equal 0. – D.R. Dec 16 '17 at 16:47
• Sorry for this, but could you explain what a floor function is? – The Statistician Dec 16 '17 at 17:33
• @DomJones See en.wikipedia.org/wiki/Floor_and_ceiling_functions – D.R. Dec 16 '17 at 18:48
• Ok thank you. That helped thanks – The Statistician Dec 16 '17 at 19:14