Defining rule for a function

Defining rule for a function

IB Year 5 | Grade 11

Let \(\mathbb{Z}\) denote the set of all integers and defined \(f\) as follows:
\[ \begin{align*} f(n ) = \begin{cases} \frac{n}{2} & \text{ if}\hspace{0.5em} n \text{ is even}; \\ 3n+1 & \text{ if}\hspace{0.5em} n \text{ is odd.} \end{cases} \end{align*} \]

Notice that the rule that defines \(f\) is not a single algebraic expression, but nevertheless, gives a unique value for the oupt \(f(n)\) for each inout \(n\) taken from the domain \(\mathbb{Z}\).

This example is also very interesting in that is is not so direct to obtain the range of \(f\) by sketching the graph of \(y= f(n)\). Indeed, you don't even get a continuous curve. Instead, you get a set of dots \((n, f(n))\), where \(n\) ranges over all the integers.

One wonders whether every integer \(m\) is the image of some integer \(n\) under the function \(f\)? But this question is not difficult to answer.

Take any random integer \(m\). Then based on the fact that \(n = 2m\) is even and the definition of \(f\), we can be certain that
\[ f(n) = f(2m) = \frac{2m}{2} = m. \]

Create a free account to practise similar questions.

Need help? Join our JC Math tuition classes.

Learn more