To draw a piecewise function you plot each piece only on its own interval, paying attention to the junction points.

Example — Construction

f(x)={x+2x1x21<x<24x2f(x)=\begin{cases} x+2 & x\le -1 \\ x^2 & -1<x<2 \\ 4 & x\ge 2\end{cases} Domain: all of R\mathbb{R} (the three pieces cover (,1](1,2)[2,+)=R(-\infty,-1]\cup(-1,2)\cup[2,+\infty)=\mathbb{R}). Pieces: line, parabola, constant. At the junction points x=1x=-1 and x=2x=2 the pieces have the same height (11 and 44 respectively): the function is continuous on all of R\mathbb{R}.

Graph of ff: the linear piece x+2x+2 for x1x\le -1, the arc of parabola x2x^2 for 1<x<2-1<x<2 and the constant 44 for x2x\ge 2 join up without jumps.

Topics: Functions and properties
Concepts: Continuity · Piecewise function
Skills: Plotting a graph