Functions

Even and Odd Functions: How to Test, Graph and Use Them

A function ff is even when f(−x)=f(x)f(-x)=f(x) for every xx in its domain, and odd when f(−x)=−f(x)f(-x)=-f(x). Even graphs mirror across the yy-axis, and odd graphs look the same after a half turn about the origin.

f(−x)=f(x) (even)f(−x)=−f(x) (odd)f(-x)=f(x)\ \text{(even)} \qquad f(-x)=-f(x)\ \text{(odd)}

Most functions are neither, which is why this is a test and not a guess. The sections below cover the test, the places where it quietly breaks, and the shortcuts that make it nearly instant.

What are even and odd functions?

The names come from powers. For an even exponent, (−x)n=xn(-x)^n=x^n, so x2x^2, x4x^4 and x100x^{100} ignore the sign of the input. For an odd exponent, (−x)n=−xn(-x)^n=-x^n, so xx, x3x^3 and x7x^7 flip it. A constant counts as an even-power term, since 5=5x05=5x^0. Using function notation, f(−x)f(-x) simply means “feed the function the opposite of the input”, and the two definitions describe what happens to the output when you do.

In plain terms: for an even function, opposite inputs give the same output, as with f(3)=f(−3)=9f(3)=f(-3)=9 for f(x)=x2f(x)=x^2. For an odd function, opposite inputs give opposite outputs, as with f(2)=8f(2)=8 and f(−2)=−8f(-2)=-8 for f(x)=x3f(x)=x^3. Among the parent functions, x2x^2, ∣x∣|x| and cos⁡x\cos x are even, while xx, x3x^3, 1x\frac{1}{x} and sin⁡x\sin x are odd.

One clean idea explains why only the zero function is both. If f(x)=f(−x)f(x)=f(-x) and f(−x)=−f(x)f(-x)=-f(x), then f(x)=−f(x)f(x)=-f(x), so 2f(x)=02f(x)=0 and f(x)=0f(x)=0. No other function can satisfy both rules at once.

Quick check

Is the constant function f(x)=5f(x)=5 even, odd or neither?

How do you test if a function is even or odd?

The test is mechanical, and it has three steps:

  1. Write f(−x)f(-x) by replacing every xx with (−x)(-x), always inside parentheses.
  2. Simplify completely.
  3. Compare with f(x)f(x) (match means even), then with −f(x)-f(x) (match means odd). No match means neither.

Take f(x)=x4−3x2+5f(x)=x^4-3x^2+5:

f(−x)=(−x)4−3(−x)2+5=x4−3x2+5=f(x)f(-x)=(-x)^4-3(-x)^2+5=x^4-3x^2+5=f(x)

The result equals f(x)f(x), so ff is even. Now take g(x)=x3+x2g(x)=x^3+x^2:

g(−x)=(−x)3+(−x)2=−x3+x2g(-x)=(-x)^3+(-x)^2=-x^3+x^2

This is not g(x)g(x), because the x3x^3 sign changed. It is not −g(x)=−x3−x2-g(x)=-x^3-x^2, because the x2x^2 sign did not. So gg is neither.

The parentheses are where most points are lost. (−x)2=x2(-x)^2=x^2, but −x2-x^2 is the negative of x2x^2, and typing the wrong one flips the verdict. For polynomials there is a faster read: if every exponent is even (constants included), the function is even; if every exponent is odd, it is odd; any mix is neither. That is why x3+5x^3+5 fails: the 55 is an even-power term sitting next to an odd one. To disprove a symmetry quickly, one counterexample is enough: g(2)=12g(2)=12 but g(−2)=−4g(-2)=-4, which is neither 1212 nor −12-12. A single check can disprove, but only the algebra can prove.

Even and odd functions with fractions and absolute values

For a fraction, test the whole expression, or classify the top and bottom separately and combine them like signs. Even behaves like +1+1 and odd like −1-1, so even over even is even, odd over odd is even, and mixed parity gives odd. Check h(x)=3xx2+1h(x)=\dfrac{3x}{x^2+1}:

h(−x)=3(−x)(−x)2+1=−3xx2+1=−h(x)h(-x)=\frac{3(-x)}{(-x)^2+1}=\frac{-3x}{x^2+1}=-h(x)

The numerator is odd and the denominator is even, and the result is odd, exactly as the sign shortcut predicts.

Absolute value is even, since ∣−x∣=∣x∣|-x|=|x|, so it leaves odd-or-even status to the factors around it. The function f(x)=x∣x∣f(x)=x|x| is odd times even, so it is odd. Verify: f(−x)=(−x)∣−x∣=−x∣x∣=−f(x)f(-x)=(-x)|-x|=-x|x|=-f(x). This function is the same as the piecewise function x2x^2 for x≥0x\ge 0 and −x2-x^2 for x<0x<0, and its shape is a good test of the idea. When you meet the absolute value function with shifts inside the bars, expect the symmetry to move or vanish.

For a piecewise rule, take an input xx in one piece and check that f(−x)f(-x), computed with the other piece, matches the right pattern. One piece alone never settles it.

Try this: Predict whether k(x)=x4x3−xk(x)=\dfrac{x^4}{x^3-x} is even, odd or neither using only the parity of the top and bottom. Then confirm by computing k(−x)k(-x).

Why the domain must be symmetric before you test

The test compares f(x)f(x) with f(−x)f(-x), so both must exist. If xx is in the domain but −x-x is not, the function cannot be even or odd, whatever the formula looks like. The function f(x)=x2f(x)=x^2 restricted to 0≤x≤50\le x\le 5 is neither: f(2)f(2) exists, but f(−2)f(-2) does not.

Domains hide this in two places. Square roots and logarithms (as in x\sqrt{x} or ln⁡x\ln x) have one-sided domains, so they are neither, with no algebra needed. Rational functions can fool you: f(x)=1x−1f(x)=\dfrac{1}{x-1} excludes x=1x=1 but allows x=−1x=-1, so it fails before you compute anything.

The zero filter

An odd function defined at 00 must satisfy f(0)=−f(0)f(0)=-f(0), so f(0)=0f(0)=0. If f(0)≠0f(0)\neq 0, odd is ruled out at once: f(x)=x3+2f(x)=x^3+2 has f(0)=2f(0)=2.

What do even and odd functions look like on a graph?

On an even graph, a point (a,b)(a,b) forces the point (−a,b)(-a,b): the picture is a mirror image across the yy-axis. On an odd graph, (a,b)(a,b) forces (−a,−b)(-a,-b), which is a half turn about the origin. For y=x3−3xy=x^3-3x, the points (2,2)(2,2) and (−2,−2)(-2,-2) are both on the curve, since 8−6=28-6=2.

A graph can never be symmetric about the xx-axis and still be a function, except for the zero function. Symmetry would put both (a,b)(a,b) and (a,−b)(a,-b) on the curve, and the vertical line test rejects that as soon as b≠0b\neq 0. So the only two symmetries to look for in a function are the yy-axis and the origin.

Shifting changes everything. Moving a graph sideways, as in f(x−h)f(x-h), moves the mirror line off the yy-axis, so (x−2)2(x-2)^2 is neither even nor odd even though it is a shifted even function. The transformations of functions are also where f(−x)f(-x) gets its geometric meaning: it is the graph reflected across the yy-axis. An even function is exactly one that is unchanged by that reflection.

Quick check

A graph is symmetric about the origin and contains the point (3,−2)(3,-2). Name another point on it.

Rules for sums, products and compositions

Composite functions sin(x²), sin(x³) and cos(x³) classified by inner and outer parity
sin(x²) is even even though sin is odd, because the inner x² is even.

Treat even as +1+1 and odd as −1-1. Products and quotients follow sign multiplication, and sums keep the type only when both parts match.

Combination Result
even + even even
odd + odd odd
even + odd neither (unless one is 00)
even ×\times even even
odd ×\times odd even
even ×\times odd odd

For composition of functions, the inner function decides. If gg is even, then f(g(−x))=f(g(x))f(g(-x))=f(g(x)), so the composite is even whatever ff is. If gg is odd, the composite has the same parity as ff: odd of odd stays odd, because f(g(−x))=f(−g(x))=−f(g(x))f(g(-x))=f(-g(x))=-f(g(x)).

So sin⁡(x2)\sin(x^2) is even (inner function even), while sin⁡(x3)\sin(x^3) is odd and cos⁡(x3)\cos(x^3) is even. Calculus adds a neat fact: a derivative reverses parity, so the slope of an even function is odd, and the reverse.

What if a function is neither even nor odd?

Polynomial 2x³ − 3x² − 4x + 4 split into an even part and an odd part
Grouping even-power and odd-power terms splits f(x) = 2x³ − 3x² − 4x + 4 into −3x² + 4 and 2x³ − 4x.

Every function defined on a symmetric domain splits into one even piece and one odd piece:

f(x)=f(x)+f(−x)2⏟even+f(x)−f(−x)2⏟oddf(x)=\underbrace{\frac{f(x)+f(-x)}{2}}_{\text{even}}+\underbrace{\frac{f(x)-f(-x)}{2}}_{\text{odd}}

Swapping xx and −x-x leaves the first piece unchanged and flips the sign of the second, which is exactly the definition. A function is even when its odd piece is zero, and odd when its even piece is zero.

Split f(x)=2x3−3x2−4x+4f(x)=2x^3-3x^2-4x+4. First, f(−x)=−2x3−3x2+4x+4f(-x)=-2x^3-3x^2+4x+4. Then:

f(x)+f(−x)2=−6x2+82=−3x2+4\frac{f(x)+f(-x)}{2}=\frac{-6x^2+8}{2}=-3x^2+4

f(x)−f(−x)2=4x3−8x2=2x3−4x\frac{f(x)-f(-x)}{2}=\frac{4x^3-8x}{2}=2x^3-4x

Add them back and you recover 2x3−3x2−4x+42x^3-3x^2-4x+4. For polynomials the shortcut is to group the even-power terms and the odd-power terms, which gives the same result. The same split turns exe^x into cosh⁡x\cosh x (even) plus sinh⁡x\sinh x (odd).

Even degree is not an even function

The x2+xx^2+x has even degree, so its end behavior points the same way on both sides, but it is neither even nor odd. Only the leading term sets the ends, while every term sets the symmetry.

Do even and odd functions have inverses?

An odd function that is one-to-one has an odd inverse. If f(a)=bf(a)=b, then f(−a)=−bf(-a)=-b, which reads backwards as f−1(−b)=−a=−f−1(b)f^{-1}(-b)=-a=-f^{-1}(b). The graph of ff is symmetric about the origin, and reflecting across y=xy=x keeps that symmetry.

An even function is the opposite case. Since f(a)=f(−a)f(a)=f(-a) for inputs a≠−aa\neq -a, two different inputs give the same output, so the function fails the horizontal line test and is not one-to-one. To get an inverse you must restrict the domain, usually to x≥0x\ge 0, and that restriction destroys the evenness. This is the whole reason x2x^2 needs a restricted domain before the inverse of a quadratic function exists as x\sqrt{x}.

Quick check

An odd function ff is one-to-one and f(2)=5f(2)=5. Find f−1(−5)f^{-1}(-5).

Where are even and odd functions used?

Parity saves work in integration. Over an interval symmetric about zero, an odd function integrates to zero, and an even function doubles the half-interval:

∫−aaf(x) dx=0 (odd)∫−aaf(x) dx=2∫0af(x) dx (even)\int_{-a}^{a} f(x)\,dx=0 \ \text{(odd)}\qquad \int_{-a}^{a} f(x)\,dx=2\int_{0}^{a} f(x)\,dx \ \text{(even)}

So ∫−22(x3+x) dx=0\int_{-2}^{2}(x^3+x)\,dx=0 with no antiderivative needed, because the positive area on one side cancels the negative area on the other.

The same split shows up well beyond calculus:

  • Taylor series: even functions contain only even powers, as in cos⁡x=1−x22+⋯\cos x=1-\frac{x^2}{2}+\cdots, and odd functions only odd powers.
  • Fourier series: even signals need only cosines, and odd signals only sines.
  • Physics: a symmetric potential such as V=kx2V=kx^2 is even, and that symmetry decides which quantum states are possible.

The skill you are building here, spotting a symmetry before doing any computation, is one of the most reusable habits in higher math.

Practice problems

0 of 5 solved

  1. Classify f(x)=x6−4x2f(x)=x^6-4x^2 as even, odd or neither.

  2. Classify g(x)=x3−7xg(x)=x^3-7x as even, odd or neither.

  3. Classify h(x)=x3x2−4h(x)=\dfrac{x^3}{x^2-4} as even, odd or neither.

  4. Classify f(x)=(x+1)2f(x)=(x+1)^2 as even, odd or neither.

  5. Find the even part of f(x)=x3+2x2−5x+7f(x)=x^3+2x^2-5x+7.

Common questions

Can a function be both even and odd?

Only the zero function f(x)=0f(x)=0 (on a domain symmetric about 00). If f(x)=f(−x)f(x)=f(-x) and f(−x)=−f(x)f(-x)=-f(x), then f(x)=−f(x)f(x)=-f(x), so 2f(x)=02f(x)=0 and f(x)=0f(x)=0 everywhere.

Is a constant function even or odd?

A nonzero constant such as f(x)=5f(x)=5 is even, because f(−x)=f(x)f(-x)=f(x). It is not odd, since −f(x)-f(x) is a different constant. The constant 00 is the one exception: it is both.

Is x2+xx^2+x even, odd or neither?

Neither. f(−x)=x2−xf(-x)=x^2-x, which is not f(x)f(x) and not −f(x)=−x2−x-f(x)=-x^2-x. Mixing an even-power term with an odd-power term always breaks both symmetries.

How can you tell from a graph whether a function is even or odd?

Fold the graph along the yy-axis: if the halves land on each other, it is even. Turn the page half a turn about the origin: if the graph looks unchanged, it is odd. If neither works, it is neither.

Why is cosine even and sine odd?

On the unit circle, the angle −θ-\theta is the reflection of θ\theta across the xx-axis. That keeps the xx-coordinate and flips the sign of the yy-coordinate, so cos⁡(−θ)=cos⁡θ\cos(-\theta)=\cos\theta and sin⁡(−θ)=−sin⁡θ\sin(-\theta)=-\sin\theta.

Is the sum of an even function and an odd function ever even or odd?

Not unless one of them is the zero function. In general the sum is neither, which is why x2+xx^2+x and x3+5x^3+5 both fail the test.

Up next