For any real number \(x\), \([x]\) denotes the greatest integer not exceeding \(x\); e.g. \([3.6] = 3\), \([2] = 2\), \([-1.4] = -2\), etc. Functions \(f\) and \(g\) are defined on the domain of all real numbers as follows: \[\begin{equation*} f \colon x \to [x]; \quad g \colon x \to x - [x]. \end{equation*}\]

Find the ranges of \(f\) and \(g\), and sketch the graph of \(g\).

The function \([x]\) defined here is known as the floor function.

From the definition of the floor function, the output value of \(f\) will always be an integer. Since the input \(x\) can be any real number the range of \(f\) is all the integers, \(\mathbb{Z}\).

The function \(g(x)=x-[x]\) which means it subtracts the whole number part, leaving only the fractional part of the input value \(x\).

For integer values of \(x\), \([x]=x\) which means that \(g(x)=0\). So the graph of the function looks like this.

Sketch of the graph of g

The range is \(0\leq g(x)<1\).

Determine the solution sets of the equations

  1. \(f(x) = g(x)\)
We want to find for which values of \(x\), \[\begin{equation*} f(x) = g(x) \iff [x] = x - [x]. \end{equation*}\]

The left-hand side is always an integer, while the only integer value that the right-hand side can take is zero, which occurs whenever \(x\) is an integer.

The solution set is therefore \(x=0\).

  1. \(fg(x) = g\,f(x)\)
Since the range of \(g\) is \(0\leq g(x)<1\) we have that \[\begin{equation*} fg(x) = [g(x)] = 0. \end{equation*}\] We also have that \[\begin{equation*} g\,f(x) = g([x]) = [x] - [[x]] = 0. \end{equation*}\]

The equation is therefore satisfied regardless of the value of \(x\). The solution set is the real numbers, \(\mathbb{R}\).