9.5 Restricting the Domain; Even, Odd and Self-Inverse Functions

AHL 2.14

In this section you will learn
  • how to restrict the domain of a function so that it has an inverse, and how to find that inverse
  • what even and odd functions are, and how they look on a graph
  • how to show that a function is even or odd, using \(f(-x)\)
  • how to prove general facts about even and odd functions
  • what a self-inverse function is: \(f^{-1} = f\), or \((f \circ f)(x) = x\)

This whole section is HL only.

Restricting the domain

A function that is not one-to-one has no inverse. But if we restrict its domain to a part where it is one-to-one, the new function does have an inverse. For a quadratic, cut the parabola at its vertex.

Example 1 The function \(f\) is defined by \(f(x) = \dfrac{4}{x^2 + 2}\), \(x \in \mathbb{R}\).

(a) Explain why \(f\) is not one-to-one.

(b) Give a domain on which \(f\) is one-to-one, as large as possible.

(a) \(f(1) = \dfrac{4}{3}\) and \(f(-1) = \dfrac{4}{3}\). Two different inputs give the same output. (The graph is symmetric in the \(y\)-axis, so a horizontal line such as \(y = \frac{4}{3}\) meets it twice.)

(b) \(f\) has its maximum at \(x = 0\). It is increasing for \(x \leq 0\) and decreasing for \(x \geq 0\). So \(f\) is one-to-one on \(x \geq 0\) (or, equally, on \(x \leq 0\)).

Example 2 The function \(f\) is defined by \(f(x) = x^2 + 4x + 1\). Find an expression for \(f^{-1}(x)\) when the domain of \(f\) is

(a) \(x \geq -2\), \(\qquad\) (b) \(x \leq -2\).

Complete the square: \(f(x) = (x + 2)^2 - 3\). In both cases the range of \(f\) is \(f(x) \geq -3\).

\[ y = (x + 2)^2 - 3 \;\Rightarrow\; (x + 2)^2 = y + 3 \;\Rightarrow\; x + 2 = \pm\sqrt{y + 3} . \]

(a) \(x \geq -2\), so \(x + 2 \geq 0\): take the \(+\) sign. \(\;f^{-1}(x) = -2 + \sqrt{x + 3}\), \(\;x \geq -3\).

(b) \(x \leq -2\), so \(x + 2 \leq 0\): take the \(-\) sign. \(\;f^{-1}(x) = -2 - \sqrt{x + 3}\), \(\;x \geq -3\).

Example 3 The function \(f\) is defined by \(f(x) = 2 + 6x - x^2\), \(\;x \geq p\).

(a) Find the least value of \(p\) for which \(f^{-1}\) exists.

(b) For this value of \(p\), find \(f^{-1}(x)\) and state its domain.

(a) \(f(x) = -(x^2 - 6x) + 2 = 11 - (x - 3)^2\). The vertex is at \(x = 3\). For \(x \geq 3\) the function is decreasing, so it is one-to-one. If \(p < 3\), the domain contains points on both sides of the vertex, and \(f\) is not one-to-one. The least value is \(p = 3\).

(b) \(y = 11 - (x - 3)^2 \Rightarrow (x - 3)^2 = 11 - y \Rightarrow x - 3 = \sqrt{11 - y}\) (positive, since \(x \geq 3\)).

\[ f^{-1}(x) = 3 + \sqrt{11 - x} . \]

The range of \(f\) (for \(x \geq 3\)) is \(f(x) \leq 11\), so the domain of \(f^{-1}\) is \(x \leq 11\).

Graphs of \(f\) and \(f^{-1}\) after restricting the domain

As in 9.3, the graph of \(f^{-1}\) is the reflection of the graph of \(f\) in \(y = x\).

Example 4 The function \(g\) is defined by \(g(x) = (x + 1)^2 - 2\), \(\;x \geq -1\).

(a) Find \(g^{-1}(x)\) and its domain.

(b) Sketch \(y = g(x)\) and \(y = g^{-1}(x)\) on one diagram.

(c) Find the exact coordinates of the point where the two graphs meet.

(a) \(y = (x + 1)^2 - 2 \Rightarrow x + 1 = \sqrt{y + 2}\) (positive, as \(x \geq -1\)). \(\;g^{-1}(x) = -1 + \sqrt{x + 2}\), with domain \(x \geq -2\) (the range of \(g\)).

(b) \(g\) starts at its vertex \((-1, -2)\); \(g^{-1}\) starts at \((-2, -1)\). Each is the reflection of the other in \(y = x\).

(c) \(g\) is increasing, so they meet on \(y = x\). Solve \(g(x) = x\):

\[ (x + 1)^2 - 2 = x \;\Rightarrow\; x^2 + x - 1 = 0 \;\Rightarrow\; x = \frac{-1 \pm \sqrt{5}}{2} . \]

We need \(x \geq -1\), so \(x = \dfrac{-1 + \sqrt{5}}{2}\). The point is \(\left(\dfrac{-1 + \sqrt{5}}{2},\, \dfrac{-1 + \sqrt{5}}{2}\right)\).

Even functions

A curve is symmetric in the \(y\)-axis if, whenever \((x, y)\) is on the curve, \((-x, y)\) is on it too (Figure 1, left). For a function this means \(f(-x) = f(x)\): the inputs \(x\) and \(-x\) give the same output.

Figure 1: Left: an even function. Right: an odd function.

Even function Not in the formula booklet

\(f\) is even if \(\;f(-x) = f(x)\;\) for every \(x\) in the domain.

The graph is symmetric in the \(y\)-axis (a reflection in the \(y\)-axis leaves it unchanged).

Examples: \(x^2\), \(x^4\), \(|x|\), \(\cos x\), and any constant function.

Example 5 Show that \(f(x) = 3x^4 - \dfrac{5}{x^2}\), \(x \neq 0\), is an even function.

\[ f(-x) = 3(-x)^4 - \frac{5}{(-x)^2} = 3x^4 - \frac{5}{x^2} = f(x) . \]

So \(f(-x) = f(x)\) for all \(x \neq 0\), and \(f\) is even.

Odd functions

A curve is symmetric about the origin if, whenever \((x, y)\) is on the curve, \((-x, -y)\) is on it too (Figure 1, right). It looks the same after a rotation of \(180°\) about \(O\).

Odd function Not in the formula booklet

\(f\) is odd if \(\;f(-x) = -f(x)\;\) for every \(x\) in the domain.

The graph has rotational symmetry of order 2 about the origin. If \(0\) is in the domain, then \(f(0) = 0\).

Examples: \(x\), \(x^3\), \(\dfrac{1}{x}\), \(\sin x\), \(\tan x\).

The trigonometric functions are periodic, and they follow the same rules: \(\cos(-x) = \cos x\) (even) and \(\sin(-x) = -\sin x\) (odd). You will meet them in Unit 14.

Most functions are neither even nor odd. For example, \(g(x) = x^2 + x\) gives \(g(-x) = x^2 - x\), which is neither \(g(x)\) nor \(-g(x)\).

Example 6 Decide whether each function is even, odd or neither.

(a) \(f(x) = x^5 - 4x^3\)

(b) \(g(x) = \dfrac{x}{x^2 + 1}\)

(c) \(h(x) = x^3 + 2\)

(d) \(k(x) = \mathrm{e}^{x} + \mathrm{e}^{-x}\)

(a) \(f(-x) = -x^5 + 4x^3 = -(x^5 - 4x^3) = -f(x)\): odd.

(b) \(g(-x) = \dfrac{-x}{x^2 + 1} = -g(x)\): odd.

(c) \(h(-x) = -x^3 + 2\). This is not \(h(x)\), and it is not \(-h(x) = -x^3 - 2\): neither. (Also \(h(0) = 2 \neq 0\), so it cannot be odd.)

(d) \(k(-x) = \mathrm{e}^{-x} + \mathrm{e}^{x} = k(x)\): even.

Proofs with even and odd functions

To prove a general fact, start from the definitions and work with \(f(-x)\).

Example 7 Prove that the product of two odd functions is an even function.

Let \(f\) and \(g\) be odd, so \(f(-x) = -f(x)\) and \(g(-x) = -g(x)\). Let \(p(x) = f(x)\,g(x)\). Then

\[ p(-x) = f(-x)\,g(-x) = \big(-f(x)\big)\big(-g(x)\big) = f(x)\,g(x) = p(x) . \]

So \(p\) is even. \(\blacksquare\)

Example 8 The function \(g(x) = (2x + 1)\left(\dfrac{3}{x} + b\right)\), \(x \neq 0\), is odd. Find the value of \(b\).

Expand: \(g(x) = 6 + 2bx + \dfrac{3}{x} + b = (6 + b) + 2bx + \dfrac{3}{x}\).

The terms \(2bx\) and \(\dfrac{3}{x}\) are odd. The constant \((6 + b)\) is even, so it must be zero for \(g\) to be odd.

\[ 6 + b = 0 \;\Longrightarrow\; b = -6 . \]

Check: \(g(x) = -12x + \dfrac{3}{x}\), and \(g(-x) = 12x - \dfrac{3}{x} = -g(x)\) ✓.

Example 9 (a) Suppose \(f\) and \(g\) are both odd functions. Is \(f \circ g\) even, odd or neither?

(b) Suppose \(f\) is odd and \(g\) is even. Is \(f \circ g\) even, odd or neither?

(a) \((f \circ g)(-x) = f\big(g(-x)\big) = f\big(-g(x)\big) = -f\big(g(x)\big) = -(f \circ g)(x)\). So \(f \circ g\) is odd.

(b) \((f \circ g)(-x) = f\big(g(-x)\big) = f\big(g(x)\big) = (f \circ g)(x)\). So \(f \circ g\) is even.

(In fact, if the inner function \(g\) is even, \(f \circ g\) is always even, whatever \(f\) is.)

Self-inverse functions

Some functions are their own inverse. For example, \(f(x) = \dfrac{1}{x}\): taking the reciprocal twice gives back \(x\).

Self-inverse function Not in the formula booklet

\(f\) is self-inverse if \(\;f^{-1}(x) = f(x)\). Equivalently, \(\;(f \circ f)(x) = x\;\) for every \(x\) in the domain.

The graph of a self-inverse function is symmetric in the line \(y = x\).

Examples: \(f(x) = \dfrac{1}{x}\), \(\;f(x) = c - x\), \(\;f(x) = \dfrac{k}{x}\), \(\;f(x) = \sqrt{a^2 - x^2}\) for \(0 \leq x \leq a\).

Example 10 Show that \(f(x) = \dfrac{3x + 2}{x - 3}\), \(x \neq 3\), is self-inverse.

Find \((f \circ f)(x)\):

\[ f\big(f(x)\big) = \frac{3 \cdot \dfrac{3x + 2}{x - 3} + 2}{\dfrac{3x + 2}{x - 3} - 3} = \frac{3(3x + 2) + 2(x - 3)}{(3x + 2) - 3(x - 3)} = \frac{11x}{11} = x . \]

(We multiplied the top and bottom by \(x - 3\).) So \(f\) is self-inverse. The graph (Figure 2) is symmetric in \(y = x\): the asymptotes \(x = 3\) and \(y = 3\) swap over when reflected.

Figure 2

Example 11 Find the value of \(k\) for which \(g(x) = \dfrac{2x + 5}{x + k}\), \(x \neq -k\), is self-inverse.

Find \(g^{-1}\): \(\;y(x + k) = 2x + 5 \Rightarrow xy - 2x = 5 - ky \Rightarrow x = \dfrac{5 - ky}{y - 2}\), so

\[ g^{-1}(x) = \frac{-kx + 5}{x - 2} . \]

For \(g^{-1} = g\) we need \(\dfrac{-kx + 5}{x - 2} = \dfrac{2x + 5}{x + k}\) for all \(x\). Comparing, \(-k = 2\) and \(k = -2\) both hold when \(k = -2\).

So \(k = -2\), and \(g(x) = \dfrac{2x + 5}{x - 2}\). (In general, \(\dfrac{ax + b}{cx + d}\) is self-inverse when \(d = -a\).)

Common errors

✗ Wrong ✓ Right Why
Domain of \(f^{-1}\) copied from the formula only Domain of \(f^{-1}\) = range of \(f\) e.g. in Example 3 the formula works for \(x \leq 11\), which matches the range of \(f\).
Testing one value, e.g. \(f(-2) = f(2)\), so “\(f\) is even” Show \(f(-x) = f(x)\) for all \(x\) One value is not a proof. (One value can show a function is not even.)
\((-x)^3 = x^3\) \((-x)^3 = -x^3\) Odd powers keep the minus sign.
“Not even, so it must be odd” It may be neither Most functions are neither.
\(x^3 + 2\) is odd because \(x^3\) is odd Neither Adding a constant destroys the symmetry about \(O\).
Self-inverse means \(f(x) = \dfrac{1}{f(x)}\) \(f\big(f(x)\big) = x\) Inverse, not reciprocal.

Exercises

1 Show that \(f(x) = x^2 - 3|x|\) is even.

\(f(-x) = (-x)^2 - 3|-x| = x^2 - 3|x| = f(x)\), so \(f\) is even.

2 Show that \(g(x) = 2x^3 + \dfrac{4}{x}\), \(x \neq 0\), is odd.

\(g(-x) = -2x^3 - \dfrac{4}{x} = -\left(2x^3 + \dfrac{4}{x}\right) = -g(x)\), so \(g\) is odd.

3 Decide whether each function is even, odd or neither:

(a) \(x^4 + x^2 - 1\)

(b) \(x^3 - x^2\)

(c) \(\dfrac{x^3}{x^2 + 4}\).

(a) even (only even powers).

(b) neither: \(f(-x) = -x^3 - x^2\).

(c) odd: \(f(-x) = \dfrac{-x^3}{x^2 + 4} = -f(x)\).

4 Prove that the sum of two even functions is even.

Let \(f(-x) = f(x)\) and \(g(-x) = g(x)\), and \(s(x) = f(x) + g(x)\). Then \(s(-x) = f(-x) + g(-x) = f(x) + g(x) = s(x)\), so \(s\) is even. \(\blacksquare\)

5 Prove that the product of an odd function and an even function is odd.

Let \(f\) be odd, \(g\) even, \(p(x) = f(x)g(x)\). \(p(-x) = f(-x)g(-x) = -f(x)g(x) = -p(x)\), so \(p\) is odd. \(\blacksquare\)

6 The function \(f(x) = x^3 + (a - 2)x^2 + 5x\) is odd. Find \(a\).

The \(x^2\) term is even, so its coefficient must be \(0\): \(a - 2 = 0\), \(a = 2\).

7 An odd function \(f\) satisfies \(f(3) = 7\), and an even function \(g\) satisfies \(g(-3) = -2\). Find \(f(-3) + g(3)\).

\(f(-3) = -f(3) = -7\) and \(g(3) = g(-3) = -2\). The sum is \(-9\).

8 Show that \(f(x) = 6 - x\) is self-inverse.

\(f\big(f(x)\big) = 6 - (6 - x) = x\), so \(f\) is self-inverse.

9 Show that \(h(x) = \dfrac{x + 7}{2x - 1}\), \(x \neq \dfrac{1}{2}\), is self-inverse.

\[ h\big(h(x)\big) = \frac{\dfrac{x + 7}{2x - 1} + 7}{2 \cdot \dfrac{x + 7}{2x - 1} - 1} = \frac{x + 7 + 7(2x - 1)}{2(x + 7) - (2x - 1)} = \frac{15x}{15} = x . \]

10 Find the value of \(c\) for which \(f(x) = \dfrac{cx - 4}{x - 5}\), \(x \neq 5\), is self-inverse.

\(y(x - 5) = cx - 4 \Rightarrow xy - cx = 5y - 4 \Rightarrow f^{-1}(x) = \dfrac{5x - 4}{x - c}\).

For \(f^{-1} = f\) we need \(\dfrac{5x - 4}{x - c} = \dfrac{cx - 4}{x - 5}\), so \(c = 5\).

(Check with the rule \(d = -a\): here \(a = c\) and \(d = -5\), so \(c = 5\) ✓.)

11 Let \(f(x) = x^2 - 6x + 10\), \(x \leq 3\). Find \(f^{-1}(x)\) and its domain.

\(f(x) = (x - 3)^2 + 1\), range \(f(x) \geq 1\). \(x - 3 = \pm\sqrt{y - 1}\), and \(x \leq 3\) needs the \(-\) sign.

\(f^{-1}(x) = 3 - \sqrt{x - 1}\), \(\;x \geq 1\).

12 The function \(g(x) = 2x^2 + 8x - 3\) has domain \(x \geq a\). Find the least value of \(a\) for which \(g^{-1}\) exists, and find \(g^{-1}(x)\).

\(g(x) = 2(x + 2)^2 - 11\). The vertex is at \(x = -2\), so the least value is \(a = -2\).

\(y = 2(x + 2)^2 - 11 \Rightarrow x + 2 = \sqrt{\dfrac{y + 11}{2}}\). \(\;g^{-1}(x) = -2 + \sqrt{\dfrac{x + 11}{2}}\), \(\;x \geq -11\).

13 Let \(f(x) = (x - 2)^2 + 1\), \(x \geq 2\).

(a) Find \(f^{-1}(x)\).

(b) Find the exact coordinates of the point where the graphs of \(f\) and \(f^{-1}\) meet.

(a) \(x - 2 = \sqrt{y - 1}\), so \(f^{-1}(x) = 2 + \sqrt{x - 1}\), \(x \geq 1\).

(b) \(f\) is increasing, so solve \(f(x) = x\): \(\;x^2 - 4x + 5 = x \Rightarrow x^2 - 5x + 5 = 0 \Rightarrow x = \dfrac{5 \pm \sqrt{5}}{2}\).

We need \(x \geq 2\): \(\dfrac{5 - \sqrt{5}}{2} = 1.38\) is too small, so \(x = \dfrac{5 + \sqrt{5}}{2}\). The point is \(\left(\dfrac{5 + \sqrt{5}}{2},\, \dfrac{5 + \sqrt{5}}{2}\right)\).