Graph the piecewise function f(x) = -2 for -7 < x < 0 and (x - 2)^2 - 5 for 0 < x < 5

Check the final answer first, then review the worked steps.

Answer

\(f(x) = \begin{cases} -2 & -7 < x < 0 \\ (x - 2)^2 - 5 & 0 < x < 5 \end{cases}\)

Work

  1. Piece 1: $y = -2$ for $x \in (-7, 0)$, open circles at $(-7, -2)$ and $(0, -2)$.
  2. Piece 2: $y = (x - 2)^2 - 5$ for $x \in (0, 5)$, vertex $(2, -5)$, open circles at $(0, -1)$ and $(5, 4)$.

Step-by-step solution

  1. For the first piece, graph the horizontal line $y = -2$ on the interval $(-7, 0)$. Use open circles at $x = -7$ and $x = 0$ because the inequality is strict.
  2. For the second piece, graph the parabola $y = (x - 2)^2 - 5$ on the interval $(0, 5)$. The vertex is at $(2, -5)$.
  3. Calculate the endpoints for the parabola: at $x = 0$, $y = (0 - 2)^2 - 5 = -1$. At $x = 5$, $y = (5 - 2)^2 - 5 = 4$. Place open circles at $(0, -1)$ and $(5, 4)$.