Geometry Solver
Home › Functions and graphs

How to sketch the graph of a piecewise function

The recipe: one piece at a time, then mind the dots

A piecewise function is several ordinary functions, each living on its own stretch of the axis. Draw them one by one and simply ignore whatever happens outside the interval written next to the formula. The only place the pieces interact is the boundary. There the inequality decides the dot: a or means the endpoint belongs to that piece and gets a filled dot, a strict or means it does not and gets a hollow one. If the two pieces give different values at the boundary, the graph has a visible jump - that is correct, not a mistake.

Problem

Sketch the graph of the function

xy-3-1132-3(0, 2)(0, -1)(-2, 0)(2, -3)
The finished graph: the filled dot at (0, 2) belongs to the left piece, the open dot at (0, −1) shows the right piece never reaches x = 0.

Answer

Two rays: to the left of the -axis ending at with a filled dot, and to the right starting at with an open dot - a jump of units at .
Checked by hand: slopes, sample points and both dots are correct.

Step-by-step solution

1. The left piece

For the rule is - a straight line with slope . Only the part to the left of the -axis is drawn. Two points are enough: at we get , and at the boundary we get . The inequality is , so the point belongs to the graph - a filled dot.

2. The right piece

For the rule is - a straight line with slope , drawn only to the right of the -axis. At we get . Towards the boundary the line approaches the height , but is excluded by the strict inequality, so gets an open dot.

3. Put the pieces together

The left ray comes from the lower left, passes through and stops at the filled dot . The right ray starts at the open dot , passes through and continues down to the right. At the graph jumps from down to : a gap of units. The function is defined at and its value there is - the height the filled dot sits at.

Add to Chrome - solve your own

Screenshot any problem on your screen and get the steps. Chrome on a computer; free.