Even and odd functions

For functions, we can determine their parity, that is, we can determine whether a function is even or odd. In the extreme case, it can be both even and odd at the same time, but most of the time it is neither even nor odd.

Evenness

A function is even if it satisfies a simple rule - if you put the element x into the function and then the inverse of −x, then the function must return the same resultant value. A typical even function is the function f(x) = x2. If you call it with the arguments 6 and −6, you get: f(6) = 36 and f(−6) = 36. The argument differs only in sign, so the result is the same.

A formal definition might look like this. If the function f is even, then it must satisfy

$$\forall x\in D(f): f(x)=f(-x)$$

For all x from the function definition scope, it must hold that even if we call the function with the inverse argument, i.e. −x, the function values must be equal.

How does an even function appear in the graph? If we put x and −x, then we get the same y in the function. So if we think about it: x and −x are equidistant from the origin on the x-axis and have the same y-coordinate. This means that the graph of the even function is symmetric along the y-axis. To illustrate, the graph of the function x2:

The graph of an even function f(x)=x^2

Among the classical functions, even functions are: cosine functions, functions of the form f(x) = xa, where a is an even number. An absolute value, for example f(x) = |x|, f(x) = |x3|, f(x) = |1/x|, will make us an even function from an originally odd function.

An odd function

An odd function must satisfy similar rules as an even function. So the function f is odd if it satisfies this rule:

$$\forall x\in D(f): f(-x)=-f(x)$$

In practice, this means that if the odd function belongs to the point [a, b], then it must also belong to the point with inverse coordinates, i.e. [−a, −b]. An example of an odd function is the function f(x) = x3. If we put a 2 after x, we get:

$$f(-x)=f(-2)=(-2)^3=-8$$

In the second expression, we would get

$$-f(x)=-f(2)=-(2^3)=-8$$

How does this show up in the graph? If the function has to belong to the point [a, b] and at the same time [−a, −b]? If you plot this, you will find that such a graph will be symmetric with the origin of the coordinate system, i.e. the point [0, 0]. The graph of the function f(x) = x3 is shown in the following figure.

The graph of an odd function f(x)=x^3

Among the classical functions, the following are odd functions: f(x) = xa, where a is odd, f(x) = ax, where a is an arbitrary real number (so it is a linear function without an absolute term). Then there is f(x) = a/x or sine.

Evenness check

How do we check if a function is even? We have to by definition. So, for example, the well-known function f(x) = x2. We check by definition. It tells us that f(x) = f(−x). If the function is even, it must satisfy:

$$x^2=(-x)^2$$

Minus x squared, we can break it down like this, according to the rules of counting with powers:

$$x^2=(-1)^2\cdot x^2$$

Minus one squared is one, so we only get back x2.

$$x^2=1\cdot x^2$$

Is the following function even?

$$f(x)=\left|\frac{1}{x}\right|$$

Let's add to the definition:

$$\left|\frac{1}{x}\right|=\left|\frac{1}{-x}\right|$$

We can rearrange these fractions by moving the absolute value to the numerator and denominator instead of the whole fraction.

$$\frac{|1|}{|x|}=\frac{|1|}{|-x|}$$

We modify the denominator of the second fraction, because surely |x| = |−x|, from the definition of absolute value, applies.

$$\frac{|1|}{|x|}=\frac{|1|}{|x|}$$

Now we get equality.

Graph the function f(x)=|1/x|

Checking the oddness

How do we check if a function is odd? We have to again by definition. It says that a function f is odd if

$$f(-x)=-f(x)$$

Let's start with the function f(x) = x3. Let's plug it into the definition:

$$(-x)^3=-x^3$$

We can break down the left-hand side as in the previous example:

$$(-1)^3\cdot x^3=-x^3$$

Minus one in three is minus one:

$$-1\cdot x^3=-x^3$$

So we have equality:

$$-x^3=-x^3$$

The function is odd.

Is the function odd?

$$f(x)=\frac{2}{x}$$

Let's add to the definition:

$$\frac{2}{-x}=-\frac{2}{x}$$

There's not much to modify here, we simply put the minus sign in the first fraction in front of the whole fraction, so we get equality:

$$-\frac{2}{x}=-\frac{2}{x}$$

The function is odd.

Graph the function f(x)=2/x

Neither even nor odd

The function need not be even or odd. There are probably most such functions. An example is the linear function f(x) = x + 1. let's try to fit it into the definition of evenness:

$$x+1=-x+1$$

Let's isolate x:

$$\begin{eqnarray} x+1&=&-x+1\\ 2x+1&=&1\\ 2x&=&0 \end{eqnarray}$$

equality does not hold for all x, but only for some, so the function is not even. Now oddness:

$$\begin{eqnarray} -x+1&=&-(x+1)\\ -x+1&=&-x-1\\ 0x&=&-2 \end{eqnarray}$$

This equation never even has a solution, so the function is not odd.

Graph the function f(x)=x+1

Even and odd

Is there a function that is both even and odd at the same time? Is there a graph of a function that would be symmetric along the y-axis and the origin at the same time? The answer is yes There is exactly one function that is both even and odd at the same time, and it is a constant function f(x) = 0. The graph of the function exactly follows the x axis.

Note that in fact there are infinitely many such functions, because we can define a function g(x), which will have the same prescription, just defined on a different definitional domain. For example, we can have a function g(x) = 0, which will have a definition scope of only natural numbers. This function is different from the function f(x), which is defined over the real numbers. However, the prescription will always be the same.

Compound functions

An interesting situation occurs if we have two functions that are odd or even and we try to add, multiply, etc. For example, adding two even functions will again result in an even function. There are lots of rules and combinations, you can see the summary table in my colleague's book (chapter compound functions).