# Let  f(x) = |x-1|.  1) Verify that  f(x)  is neither even nor odd. 2) Can  f(x)  be written as the sum of an even function and an odd function ? a) If so, exhibit a solution. Are there more solutions ? b) If not, prove that it is impossible.

Feb 6, 2018

Let $f \left(x\right) = | x - 1 |$.
If f were even, then $f \left(- x\right)$ would equal $f \left(x\right)$ for all x.
If f were odd, then $f \left(- x\right)$ would equal $- f \left(x\right)$ for all x.
Observe that for x = 1
$f \left(1\right) = | 0 | = 0$
$f \left(- 1\right) = | - 2 | = 2$
Since 0 is not equal to 2 or to -2, f is neither even nor odd.

Might f be written as $g \left(x\right) + h \left(x\right)$, where g is even and h is odd?

If that were true then $g \left(x\right) + h \left(x\right) = | x - 1 |$. Call this statement 1.
Replace x by -x.
$g \left(- x\right) + h \left(- x\right) = | - x - 1 |$
Since g is even and h is odd, we have:
$g \left(x\right) - h \left(x\right) = | - x - 1 |$ Call this statement 2.

Putting statements 1 and 2 together, we see that
$g \left(x\right) + h \left(x\right) = | x - 1 |$
$g \left(x\right) - h \left(x\right) = | - x - 1 |$
$2 g \left(x\right) = | x - 1 | + | - x - 1 |$
$g \left(x\right) = \frac{| x - 1 | + | - x - 1 |}{2}$

This is indeed even, since $g \left(- x\right) = \frac{| - x - 1 | + | x - 1 |}{2} = g \left(x\right)$

From statement 1
$\frac{| - x - 1 | + | x - 1 |}{2} + h \left(x\right) = | x - 1 |$
$| - x - 1 \frac{|}{2} + | x - 1 \frac{|}{2} + h \left(x\right) = | x - 1 |$
$h \left(x\right) = | x - 1 \frac{|}{2} - | - x - 1 \frac{|}{2}$

This is indeed odd, since
$h \left(- x\right) = | - x - 1 \frac{|}{2} - | x - 1 \frac{|}{2} = - h \left(x\right)$.