# Thread: Even and odd parts of a piecewise defined function

1. ## Even and odd parts of a piecewise defined function

Hello,

I'm supposed to find the even and odd parts of the following $$f(x)=\begin{cases}x^2 & x<0 \\ e^{-x} & x>0.\end{cases}$$

We have a formula, $f(x)=f_e(x)+f_o(x)=1/2 (f(x)+f(-x))+1/2(f(x)-f(-x))$.

So for even/odd to mean anything $x$ should live in an interval which is symmetric with respect to 0. For otherwise there would exist some $x_0$ such that either $f(x)\neq f(-x)$ or $f(-x) \neq -f(x)$ simply because the function isn't defined on appropriate values.

I tried just naively shoving function values into the formula. So $f_e(x)=1/2 (f(x)+f(-x))=(e^{-x}+x^2)$ but since $f(-x)=1/2(e^{-(-x)}+(x)^2)$ this function is not even. So this can't be correct.

Is there some mistake?

2. ## Re: Even and odd parts of a piecewise defined function

use the formula more carefully

$f_e(x) = \begin{cases}\dfrac{x^2 + e^x}{2} &x < 0 \\\dfrac{e^{-x}+x^2}{2} &0 < x \end{cases}$

3. ## Re: Even and odd parts of a piecewise defined function

Originally Posted by bkbowser
I'm supposed to find the even and odd parts of the following $$f(x)=\begin{cases}x^2 & x<0 \\ e^{-x} & x>0.\end{cases}$$
We have a formula, $f(x)=f_e(x)+f_o(x)=1/2 (f(x)+f(-x))+1/2(f(x)-f(-x))$.
What is the exact formulation of $f(-x)$ you are using.

i.e. $f(-x)=\begin{cases}? & x<0 \\ ?? & x>0.\end{cases}$

FYI This is a very important idea: Any function is sum of an even function and an odd function.

4. ## Re: Even and odd parts of a piecewise defined function

Originally Posted by bkbowser
Hello,

I'm supposed to find the even and odd parts of the following $$f(x)=\begin{cases}x^2 & x<0 \\ e^{-x} & x>0.\end{cases}$$

We have a formula, $f(x)=f_e(x)+f_o(x)=1/2 (f(x)+f(-x))+1/2(f(x)-f(-x))$.

So for even/odd to mean anything $x$ should live in an interval which is symmetric with respect to 0. For otherwise there would exist some $x_0$ such that either $f(x)\neq f(-x)$ or $f(-x) \neq -f(x)$ simply because the function isn't defined on appropriate values.

I tried just naively shoving function values into the formula. So $f_e(x)=1/2 (f(x)+f(-x))=(e^{-x}+x^2)$ but since $f(-x)=1/2(e^{-(-x)}+(x)^2)$ this function is not even. So this can't be correct.

Is there some mistake?
The "even part" of a function is $\frac{f(x)+ f(-x)}{2}$.

If x< 0 then -x> 0 so for x< 0, $f(x)= x^2$ and $f(-x)= e^{-(-x)}= e^x$. If x< 0, $\frac{f(x)+ f(-x)}{2}= \frac{x^2+ e^x}{2}$. If x> 0, x< 0 for $f(x)= e^{-x}$ and $f(-x)= (-x)^2= x^2$ so $\frac{f(x)+ f(-x)}{2}= \frac{e^{-x}+ x^2}{2}. 5. ## Re: Even and odd parts of a piecewise defined function Originally Posted by HallsofIvy The "even part" of a function is$\frac{f(x)+ f(-x)}{2}$. If x< 0 then -x> 0 so for x< 0,$f(x)= x^2$and$f(-x)= e^{-(-x)}= e^x$. If x< 0,$\frac{f(x)+ f(-x)}{2}= \frac{x^2+ e^x}{2}$. If x> 0, x< 0 for$f(x)= e^{-x}$and$f(-x)= (-x)^2= x^2$so$\frac{f(x)+ f(-x)}{2}= \frac{e^{-x}+ x^2}{2}.
Sorry, it may just me but I cannot read the above.
I still ask how this is defined: $f(-x)=\begin{cases}? & x<0 \\ ?? & x>0.\end{cases}$