The function $f(x) = |x|$ is a piecewise function in disguise: $$|x| = \begin{cases} -x & \text{if } x < 0 \\ x & \text{if } x \ge 0 \end{cases}$$ Its graph is a V: the line $y = -x$ on the left, the line $y = x$ on the right, meeting at the vertex $(0, 0)$.
Por qué funciona
Idea clave
Worked examples
Ejemplo resuelto: Read the features
- Write it as $-2|x - (-1)| + 4$: $h = -1$ and $k = 4$, so the vertex is $(-1, 4)$.
- $a = -2 < 0$: it opens down, so $4$ is the maximum value.
- Each side has slope $\pm 2$: from the vertex, go $1$ right and $2$ down.
Respuesta: Vertex $(-1, 4)$, opens down, maximum $4$.
Ejemplo resuelto: Write it as two lines
- For $x \ge 3$, $x - 3 \ge 0$, so $|x - 3| = x - 3$ and $g(x) = x - 2$.
- For $x < 3$, $x - 3 < 0$, so $|x - 3| = 3 - x$ and $g(x) = 4 - x$.
Respuesta: $g(x) = x - 2$ for $x \ge 3$; $g(x) = 4 - x$ for $x < 3$.