# Is the sum of two functions, one of which is non differentiable, necessarily non-differentiable?

Suppose $f(x) = g(x) + h(x)$ where $g(x)$ is known to be non-differentiable. When $h(x) \ne -g(x)$ is some other function (differentiable or not), can $f(x)$ ever be differentiable? We can assume $f, g, h$ are real valued functions.

edit: I should have specified that $h(x)$ is not some function that cancels out $g(x)$ . Bill Dubuque's answer is intriguing.

-
What does "some function that cancels out $g(x)$" mean? –  Chris Eagle May 2 '11 at 21:52
The difficulty is that there is no rigorous notion of what it means to say "$h(x)$ is not some function that cancels out $g(x)$". Any $h(x)$ is a function that "cancels out $g(x)$", because we have that $h(x)=f(x)-g(x)$. –  Zev Chonoles May 2 '11 at 21:55

Easy counterexamples have been mentioned. What is true, however, is the fact that sum of a differentiable function and a nondifferentiable function is nondifferentiable. This is true because differentiable functions are closed under subtraction, i.e. they comprise a subgroup of all functions. Hence the claimed property is simply a special case of the following complementary form of the subgroup property from my prior post.

THEOREM $\$ A nonempty subset $\rm\:S\:$ of abelian group $\rm\:G\:$ comprises a subgroup $\rm\iff\ S\ + \ \bar S\ =\ \bar S\$ where $\rm\: \bar S\:$ is the complement of $\rm\:S\:$ in $\rm\:G$

Instances of this are ubiquitous in concrete number systems, e.g.

                                 transcendental
algebraic * nonalgebraic  =  nonalgebraic  if  nonzero
rational * irrrational   =   irrational   if  nonzero
real *   nonreal     =    nonreal     if  nonzero

even  +     odd       =      odd          additive example
integer + noninteger    =   noninteger

-
For the theorem to work the space of functions must form an abelian group, and the space of differentiable functions forms a subgroup of this abelian group, right? Are these standard ideas? –  ijems May 2 '11 at 21:51
Yes, both your suppositions are correct. –  Bill Dubuque May 2 '11 at 23:35
This is a nice answer. Are you sure you mean "sum" in the beginning? –  Glen Wheeler May 5 '11 at 16:38
This is nice. In the theorem, "comprises" is ambiguous, since it can mean either "forms" or "contains"; I think "forms" would be clearer. –  joriki May 28 '11 at 23:47

Let $h(x)=-g(x)+k(x)$ where $k\neq0$ is any differentiable function other than the constant 0 function. Then $f(x)=g(x)-g(x)+k(x)=k(x)$ is differentiable.

-
Yes, of course. For example, if $h(x)=1-g(x)$, then $f(x)=1$ is differentiable.
And to answer the other side of the question (is the function of a continuous function and a discontinuous function always discontinuous?), suppose that $f(x) = g(x)+h(x)$ is differentiable as before, with $g(x)$ non-differentiable and $h(x)$ differentiable. Then $g(x) = f(x) - h(x)$ is the difference of differentiable functions, and it's a pretty quick (and standard) exercise in deltas and epsilons to show that this must be differentiable itself.