# Homework Help: Sum of odd & even functions

1. Jul 18, 2009

### John O' Meara

1. The problem statement, all variables and given/known data
Suppose that the function f has domain all real numbers. Show that f can be written as the sum of an even function and an odd function.

2. Relevant equations
f(-x) = f(x) is even and f(-x)=-f(x) is odd

3. The attempt at a solution
If g(x) is an even function it can be written as $$g(x) = \frac{f(x)+f(-x)}{2} where f(x) is even and if h(x) is odd it can be written as h(x)=\frac{f(x)-f(-x)}{2}$$. but how do you write f = g + h?

2. Jul 18, 2009

### VeeEight

$$f(x) = \frac{f(x)+f(-x)}{2} + \frac{f(x)-f(-x)}{2}$$

Now what can you say about $$\frac{f(x)+f(-x)}{2}$$ and $$\frac{f(x)-f(-x)}{2}$$ ?

3. Jul 18, 2009

### HallsofIvy

Your wording is awkward. It is not "if g is an even function then..." and "if h is odd...". You want to define g(x) to be (f(x)+ f(-x))/2 and show that it is even. Define h(x) to be (f(x)- f(-x))/2 and show that it is odd.

$$g+h= \frac{f(x)+ f(-x)}{2}+ \frac{f(x)- f(-x)}{2}= \frac{f(x)+ f(-x)+ f(-x)+ f(x)- f(-x)}{2}$$
What is that equal to?

4. Jul 19, 2009

### John O' Meara

How did Hallsofivy get five terms in the last equation divided by 2. I would only have got four divided by 2.

5. Jul 19, 2009

### n!kofeyn

It looks like a typo. The second $+f(-x)$ shouldn't be there.

6. Jul 19, 2009

### John O' Meara

And the answer that those four terms divided by 2 is f(x). Now I am embarrassed asking the question, it is so simple.

7. Jul 19, 2009

### n!kofeyn

Haha. No worries. That was what VeeEight was getting at as well. It is a neat problem that is just a little trick of dividing by 2. No need to feel embarrassed.

8. Jul 19, 2009

### HallsofIvy

Yes, my eyes went squoggly for a moment. Thanks, n!kofeyn.

9. Jul 19, 2009

### John O' Meara

Thanks all of you for your replies.