# Continuous and differentiable function

1. Feb 13, 2012

### frankpupu

function f:R->R can be written as a sum f=f1+f2 where f1 is even and f2 is odd。then if f is continuous then f1 and f2 may be chosen continuous, and if f is differentiable then f1 and f2 can be chosen differentiable

i am quiet confusing this statement , if f1 is continuous f2 is not how their sum to be continuous and differentiable as well. but i am sure this statement is true. can someone explain to me ???

2. Feb 13, 2012

### DrewD

I don't know if you could have $f_1$ continuous everywhere and $f_2$ discontinuous. A simple way that you could have two discontinuous functions sum to a continuous one is if you take cosine from $-\infty<\theta\leq 0$ and 0 when greater than zero as $f_1$ and then a similar thing but where it is defined on the positive number and 0 for the negatives (and at 0 or else it will still be discontinuous). Individually there is a discontinuity at 0, but when you add them they are continuous.

This is a trivial case, but I hope it makes it clear.

3. Feb 14, 2012

### HallsofIvy

You are correct that if f1 is continous at, say, x= a, and f2 is not, then f cannot be continuous at x= a. But why are you raising the question? This statement says nothing about "f1 is continuous f2 is not". It simply says that if f is continuous then f1 and f2 can both be chosen to be continuous. Here it is fairly standard to take f1= (f(x)+ f(-x))/2 and f2= (f(x)- f(-x))/2. If f is continuous, so are f1 and f2. If f is differentiable, so are f1 and f2.