# Representing a real valued function as a sum of odd and even functions [duplicate]

With $f(x)$ being a real valued function we can write it as a sum of an odd function $m(x)$ and an even function $n(x)$: $f(x)=m(x)+n(x)$

Write an equation for $f(-x)$ in terms of $m(x)$ and $n(x)$:

My attempt using the properties - even function if: $f(x)=f(-x)$ and odd function if: $-f(x)=f(-x)$

$f(x)=m(x)+n(x) \implies f(-x)=m(-x)+n(-x) \implies f(-x)= -m(x)+n(x) \implies f(-x)=n(x)-m(x)$

I think that is correct but then I need to find equations for both $m(x)$ and $n(x)$ in terms of $f(x)$ and $f(-x)$ so a suggestion on how to tackle that would be great.

-

## marked as duplicate by J. M., Micah, Amzoti, Start wearing purple, Julian KuelshammerMay 30 '13 at 15:46

$$f(x)=\frac{1}{2}\left(f(x)+f(-x)\right)+\frac{1}{2}\left(f(x)-f(-x)\right)$$
Add and subtract $f(x) = m(x) + n(x)$ and $f(-x)=n(x)-m(x)$.
No, add the two equations. $m(x)$ will cancel and you can simplify to express $n(x)$ in terms of $f(x)$ and $f(-x)$. Then, subtract to do the same for $m(x)$. – response May 30 '13 at 14:32