Home » Blog » Draw the graphs of some step functions

Draw the graphs of some step functions

For all x \in \mathbb{R} define

    \[ f(x) = [x], \qquad g(x) = [2x] \]

where [x] denotes the greatest integer less than or equal to x. Draw the function h(x) for each of the following on the interval [-1,2]:

  1. h(x) = f(x) + g(x).
  2. h(x) = f(x) + g\left(\frac{x}{2} \right).
  3. h(x) = f(x) g(x).
  4. h(x) = \frac{1}{4} f(x) g(x).

    1. Graph of h(x) = f(x) + g(x) = [x]+[2x].

      Rendered by QuickLaTeX.com

    2. Graph of h(x) = f(x) + g\left(\frac{x}{2}\right) = [x] + [x] = 2[x].

      Rendered by QuickLaTeX.com

    3. The graph of h(x) = f(x)g(x) = [x]\cdot[2x].

      Rendered by QuickLaTeX.com

    4. The graph of h(x) = \frac{1}{4}f(x)g(x) = \frac{1}{4}[x][2x].

      Rendered by QuickLaTeX.com

4 comments

  1. Artemii says:

    a) is wrong. For example h(-0.5) = [-0.5] + [-1] = 0 – 1 = -1.
    In reality, the drawing will be like this:
    h( -1 ) = -3;
    h( (-1, 0.5] ) = -1;
    h( (-0.5, 0] ) = 0;
    h( (0, 0.5] ) = 2;
    h( (0.5, 1] ) = 3;
    h( (1, 1.5] ) = 5;
    h( (1.5, 2] ) = 6.
    (I hope such a record does not create difficulties)

  2. Artem says:

    There is a mistake: the interval is closed on the right: you should also include the point at x=2 in the plots

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):