# Is f(x)=x^2+sin x an even or odd function?

Sep 26, 2015

It is neither.

#### Explanation:

A function $f$ is even if and only if $f \left(- x\right) = f \left(x\right)$ for every $x$ in the domain of $f$.
A function $f$ is odd if and only if $f \left(- x\right) = - f \left(x\right)$ for every $x$ in the domain of $f$.

For $f \left(x\right) = {x}^{2} + \sin x$, we check $f \left(- x\right)$.

If $f \left(- x\right)$ simplifies to $f \left(x\right)$, then $f$ is even,
If $f \left(- x\right)$ simplifies to $- f \left(x\right) = - \left({x}^{2} + \sin x\right)$, the $f$ is odd.
If $f \left(- x\right)$ does not simplify to one of the above, then $f$ is neither even nor odd.

$f \left(- x\right) = {\left(- x\right)}^{2} + \sin \left(- x\right)$

$= {x}^{2} - \sin x$ which is neither $f \left(x\right)$ nor $- f \left(x\right)$

We cannot show that $f \left(- x\right) = f \left(x\right)$ for every $x$ by showing that it is true for only one $x$,
but we can show that is fails to be true for all $x$ by showing that it fails for one value.

$f \left(\frac{\pi}{2}\right) = {\pi}^{2} / 4 + 1$
$f \left(- \frac{\pi}{2}\right) = {\pi}^{2} / 4 - 1$

It is, I think, clear that these numbers are neither equal nor negatives of each other.

Sep 26, 2015

Neither.

$f \left(- \frac{\pi}{6}\right) = {\pi}^{2} / 36 - \frac{1}{2} \approx \frac{10}{36} - \frac{1}{2} = - \frac{2}{9}$

$f \left(\frac{\pi}{6}\right) = {\pi}^{2} / 36 + \frac{1}{2} \approx \frac{10}{36} + \frac{1}{2} = \frac{7}{9}$

So $f \left(- \frac{\pi}{6}\right) \ne \pm f \left(\frac{\pi}{6}\right)$

#### Explanation:

An even function requires $f \left(- x\right) = f \left(x\right)$

An odd function requires $f \left(- x\right) = - f \left(x\right)$

Our example satisfies neither of these conditions.