A kosarad üres
The integral part, the fractional part and the algebraic sign function
(higher level courseware)
The fare table found in the book of timetable of a railway is also a function. It assigns the fare to the \latex{ kilometres } travelled by train. If we wanted to sketch the graph of this function, then we would get an interesting graph which consists of straight line segments. For example below \latex{10} \latex{ kilometres } one should pay the same amount for a ticket even if one travels \latex{5} \latex{ kilometres } or \latex{8} \latex{ kilometres } by train. If for example we travel from town \latex{ A } to town \latex{ B }, i.e. \latex{85} \latex{ km } by train, we still have to pay for \latex{90} \latex{ km }. Up to \latex{100} \latex{ kilometres } the fare “jumps” at every \latex{10} \latex{ kilometres }. Above \latex{100} \latex{ kilometres } up to \latex{300} \latex{ km } it jumps at every \latex{20} \latex{ kilometres }, and above that at every \latex{50} \latex{ kilometres }.
We are going to interpret a function on all real numbers which is somewhat similar to the train fares.
DEFINITION: To every real number \latex{x} we assign the integral part of \latex{x}, i.e. the greatest integer which is not greater than \latex{x}. This function is called integral (or integer) part function and its notation is as follows: \latex{\lbrack{x}\rbrack} (integral part of \latex{x}).
E.g. \latex{\lbrack{2.1}\rbrack=2}; \latex{\lbrack{0.33}\rbrack=0}; \latex{\lbrack{-0.33}\rbrack=-1}; \latex{\lbrack{0}\rbrack=0}; \latex{\lbrack{-2.2}\rbrack=-3}; \latex{\lbrack{10}\rbrack=10}.
Let us first represent the function \latex{{f}: {\R \to \R}}, \latex{f\left(x\right)=\left[x\right]} defined this way so that we plot the mapping given by the function on two parallel number lines. (Figure 70)

Figure 70
\latex{ -4 }
\latex{ -4 }
\latex{ -3 }
\latex{ -3 }
\latex{ -2 }
\latex{ -2 }
\latex{ -1 }
\latex{ -1 }
\latex{ 0 }
\latex{ 0 }
\latex{ 1 }
\latex{ 1 }
\latex{ 2 }
\latex{ 2 }
\latex{ 3 }
\latex{ 3 }
\latex{ 4 }
\latex{ 4 }
\latex{ 5 }
\latex{ 5 }
\latex{ 6 }
\latex{ 6 }
Let us sketch the graph of and characterise function \latex{{f}: {\R \to \R}}, \latex{f\left(x\right)=\left[x\right]} as usual in the Cartesian coordinate system. (Figure 71)
The function is constant on intervals, if \latex{n} is an integer, then for numbers \latex{{n}\, \,{\leq{x}\lt{n}+1}} it has a functional value of \latex{n}. The left end-points always belong to the one-unit long line segments which make up the graph of the function, while the right end-points do not. We can show it in figure by placing a “filled circle” at the left end-point of the line segments and an “empty circle” at the right end-point of the line segments.
The function is increasing on its whole domain, but not strictly, i.e. if \latex{{{x_1}}{\lt{x_2}}}, then \latex{{f}{(x_1)}\leq{{f}(x_2)}}. It can also be formulated as the function is not decreasing.
Example 1
Let us plot the graphs of and characterise the following \latex{\R \to \R} functions:
\latex{f\left(x\right)=x-\left[x\right]};
\latex{g\left(x\right)=\left[2x\right]};
\latex{h\left(x\right)=2\left[x\right]}.
Solution
The function \latex{f} has an own name too.
DEFINITION: If from a number we subtract its integral part, then its “fractional part” is left, so the function \latex{f\left(x\right)=x-\left[x\right]}; is also called the fractional part function. We sometimes use the following notation for it: \latex{x-\lbrack{x}\rbrack=\{x\}}.
The graph of the function \latex{f} is shown in Figure 72.

\latex{y=x-\lbrack{x}\rbrack=\{x\}}
Figure 72
\latex{ -4 }
\latex{ -3 }
\latex{ -2 }
\latex{ -1 }
\latex{ 0 }
\latex{ 1 }
\latex{ 2 }
\latex{ 3 }
\latex{ x }
\latex{ y }
\latex{ 1 }
An obvious property of this function is that it is periodic. It means that the functional value at any place will be the same as at a place \latex{1} greater (or any integer greater): \latex{f(x + 1) = f(x)}. The graph of the function can also be derived graphically by “slicing up” straight line \latex{y=x} with straight lines parallel with the \latex{x-}axis and being one unit away from each other and then by translating the resulting pieces towards the \latex{y-}axis so that their left end-points lie on the \latex{x-}axis. This method can be used in other cases too.
The graph of function \latex{g} “is similar to” the image of function \latex{x \mapsto [x]} with the difference that it takes the same values at places half of the original places. For example \latex{g} takes the same value at \latex{1} as \latex{x \mapsto [x]} at \latex{2}; at \latex{\frac{3}{2}} does \latex{g} take the same value as \latex{x \mapsto [x]} at \latex{3}; or it takes the same value also at \latex{–1} as \latex{x \mapsto [x]} at \latex{–2}. It means that the graph of \latex{x \mapsto [x]} should be shrunk to its “half” perpendicular to the \latex{y-}axis. (Figure 73)
The graph of function \latex{h} can also be derived from the graph of \latex{x \mapsto [x]}. The value of \latex{h} at every \latex{x} will be exactly twice the value of \latex{x \mapsto [x]}, thus the graph of \latex{x \mapsto [x]} should be stretched to its double perpendicular to the \latex{x-}axis. (Figure 74)
Example 2
Let us plot the graphs of and characterise the following functions:
\latex{{f}:{\R \to \R}}, \latex{f\left(x\right)=x\left[x\right]};
\latex{g: (\R \setminus \{0\}) \to \R, \quad g(x) = \frac{1}{x} - \left\lbrack \frac{1}{x} \right\rbrack};
\latex{h: (\R \setminus \{0\}) \to \R, \quad h(x) = x \left\lbrack \frac{1}{x} \right\rbrack} .
Solution
The image of function \latex{f} consists of straight line segments. If \latex{0\leq{x}\lt{1}}, then \latex{f(x) = 0}, if \latex{1\leq{x}\lt{2}}, then \latex{f(x) = x}, if \latex{2\leq{x}\lt{3}}, then \latex{f(x)=2x}, and so on. For negative places \latex{x}: if \latex{-1\leq{x}\lt{0}}, then \latex{f (x)=–x}, if \latex{-2\leq{x}\lt{-1}}, then \latex{f (x) = –2x}, in general if \latex{n} is any integer, then for \latex{n\leq{x}\lt{n}+1} \latex{f (x) = nx}. Based on this the graph of \latex{f} is shown in Figure 75.
It is worth observing that the left end-point of the line segments making up the graph, i.e. the filled circles lie on parabola \latex{x^2} \latex{(}since for integer \latex{n} the functional value is \latex{n^2)}. The right end-points, i.e. the empty circles lie on the image of \latex{x \mapsto x^2-x=\left(x-\frac{1}{2}\right)^2-\frac{1}{4}} which is also a parabola.
To draw the image of function \latex{g} we can apply the “slicing up” method. We “slice up” the curve of function \latex{{x \mapsto}{\frac{1}{x}}}, \latex{{x}\not =0}, with straight lines parallel with the \latex{x-}axis and being one unit away from each other, and then we translate each curve part perpendicular to the \latex{x-}axis so that their right end-points (if exist) lie on the \latex{x-}axis. (Figure 76)
All the pieces of the graph lie in the bar between \latex{0} and \latex{1}. The function can also be denoted as follows: \latex{{x\mapsto}{\left\{\frac{1}{x} \right\}}}, \latex{{x}\not =0}, i.e. fractional part of \latex{\frac{1}{x}}. The range of the function is the half-closed interval \latex{\left[0;1\right[}, it does not take the value of \latex{1} anywhere, but it does take any non-negative value less than \latex{1}. So it does not have a largest value.
The image of function \latex{h} also consists of straight pieces. To draw it we only have to observe that if \latex{\frac{1}{n+1}\lt{x}\leq\frac{1}{n}}, \latex{{n}\gt{0}} is an integer, then \latex{{n}\leq\frac{1}{x}\lt{n+1}} thus \latex{\left[\frac{1}{x}\right]=n}. Similarly if for example \latex{-1\leq{x}\lt{0}}, then \latex{\frac{1}{x}\geq-1 } thus \latex{\left[\frac{1}{x}\right]=-1},

\latex{{y}=\left\{\frac{1}{x} \right\}}
Figure 76
\latex{ -1 }
\latex{ -\frac{1}{2} }
\latex{ -\frac{1}{3} }
\latex{ \frac{1}{4} }
\latex{ \frac{1}{3} }
\latex{ \frac{1}{2} }
\latex{ 1 }
\latex{ 1 }
\latex{ y }
\latex{ x }

\latex{{y}=x\left[\frac{1}{x}\right]}
Figure 77
\latex{ -1 }
\latex{ 1 }
\latex{ 1 }
\latex{ y }
\latex{ x }
if \latex{-1\leq{x}\lt-\frac{1}{2}}, then \latex{-2\leq\frac{1}{x}\lt-1}, thus \latex{\left[\frac{1}{x}\right]=-2}, in general if \latex{{n}\gt{1}} is an integer and \latex{-\frac{1}{n-1}\lt{x}\leq-\frac{1}{n}}, then \latex{-n\leq\frac{1}{x}\lt-(n-1)}, thus \latex{\left[\frac{1}{x}\right]=-n}. (Figure 77)
The right end-points (filled circles) of the line segments, rays making up the graph lie on straight line \latex{y = 1}, and the left end-points (empty circles) lie on straight line \latex{y = –x + 1}. The range of the function is the set of non-negative real numbers; it has a minimum in a wider sense on the set of real numbers greater than \latex{1}.
⯁ ⯁ ⯁
It is worth getting to know the algebraic sign function; its notation is sgn. Its definition is as follows:
\latex{\text{sgn}(x) = \begin{cases}\,\,\,\,1,\;\text{if}\; x\gt0, \\ \,\,\,\,0\:\text{, if } x=0,\\-1\:\text{, if }x\lt0.\end{cases}}
Thus the graph of the function is shown in Figure 78.
It can be seen from the definition and also from the graph that the algebraic sign function is an odd function.

Exercises
{{exercise_number}}. Let us plot the graphs of and characterise the following \latex{{\R \to \R}} functions.
- \latex{k(x)=\left[x\right]+2}
- \latex{f(x)=\left[x-2\right]}
- \latex{g(x)=\left[2x-1\right]}
- \latex{h(x)=\left[-x+1\right]}
- \latex{l(x)=2\left\{x\right\} }
- \latex{m(x)=\left\{x\right\}+2 }
- \latex{n(x)=\left\{x-3\right\}}
{{exercise_number}}. Plot the graphs of and characterise the following functions.
- \latex{{{f}: {\R \to \R}}, {f\left(x\right)=\left[x\right]^2}}
- \latex{{g:\R \to \R}, {g\left(x\right)=\left[x^{2} \right]}}
- \latex{{k:\left(\R\setminus\left[0;1\right[ \right)\to\R }, k\left(x\right) = \frac{1}{\left[x\right]}}
- \latex{{h:\left(\R\setminus\left\{3\right\} \right)\to\R }, {h\left(x\right)=\left|\left[\frac{x-2}{x-3} \right] \right|}}
{{exercise_number}}. Plot the graphs of and characterise the following functions.
- \latex{{f:\R\to\R}, {f\left(x\right)=\text{sgn}(x)+1}}
- \latex{{{g}: {\R \to \R}}, {g\left(x\right)=\text{sgn}}\left(x-1\right)}
- \latex{{f:\R\to\R},{h\left(x\right)=-\text{sgn}\left(2x\right) }}
- \latex{{{k}: {\R \to \R}}, {k\left(x\right)=2\text{sgn}}\left(2x-1\right)}
{{exercise_number}}. Plot the graphs of the following functions.
- \latex{{f:\R\to\R}{f\left(x\right)=\text{sgn}\left({x^2}-4x\right) }}
- \latex{{g:\left(\R\setminus\left\{2\right\} \right)\to\R }, {g\left(x\right)=\text{sgn}\left(\frac{x-3}{x-2} \right) }}
- \latex{{h:\R\to\R}, {h\left(x\right)=\text{sgn}\left(x-\left[x\right]-\frac{1}{2} \right) }}





