分段函数

Before this, know绝对值方程式

Interactive · 2 questions

Split the equation into pieces

Before we go into solving absolute value as a piecewise function, let's first look at piecewise functions!

Piecewise functions are functions that have more than one piece to them. They follow different equations depending on what value of xx. For example, take a look at the following equation:

y={x+2    if    x≥−1−4x−2    if    x<−3y =\left\{\begin{matrix} x+2\,\,\,\,\text{if}\,\,\,\,x\geq-1\\-4x-2\,\,\,\,\text{if}\,\,\,\,x<-3\end{matrix}\right.

If you think about this function as a machine, you would have to sort your xx's before you dropped them in. If xx is less than −3-3, you have to drop it in the bucket that goes to the equation −4x−2-4x-2. If it's greater than or equal to −1-1, you have to drop it in the bucket that goes to x+2x + 2. A graph of this function looks like this:

Graph of the aforementioned piecewise-defined function; the segment for x < -3 is in red, and the segment for x >= -3 is in blue.

Graph courtesy of Desmos

These equations don't form one straight, continuous line, but they're all part of the same function.

Absolute value functions work the same way on a graph. In fact, their graphs are always the shape of a V. Take a look at the graph below:

Graph of f(x) = |2x + 6|

Graph courtesy of Desmos

This graph is for the function f(x)=∣2x+6∣f(x) = |2x + 6|. Notice that there seem to be two lines. One has a slope that climbs up, another slides down. We can find the equations for these two lines by going through the steps to solve absolute value functions.

First, separate the two options out. We can say that f(x)=∣2x+6∣f(x) = |2x + 6| is the same as

f(x)=2x+6    if    2x+6≥0andf(x)=−(2x+6)    if    2x+6<0f(x) = 2x + 6\,\,\,\,\text{if}\,\,\,\,2x + 6 \ge 0\\ \text{and}\\ f(x) = -(2x + 6)\,\,\,\,\text{if}\,\,\,\,2x + 6 < 0

When the value of 2x+62x + 6 dips below 00, the direction of the line changes. We can formalize those by just putting them into one equation:

y={2x+6    if    2x+6≥0−(2x+6)    if    2x+6<0y=\left\{\begin{matrix} 2x+6\,\,\,\,\text{if}\,\,\,\,2x+6\geq0\\-(2x+6)\,\,\,\,\text{if}\,\,\,\,2x+6<0\end{matrix}\right.

...and then simplifying the inequalities!

y={2x+6    if    x≥−3−2x−6    if    x<−3y=\left\{\begin{matrix} 2x+6\,\,\,\,\text{if}\,\,\,\,x\geq-3\\-2x-6\,\,\,\,\text{if}\,\,\,\,x<-3\end{matrix}\right.

Then, you can find the graph by just plugging the xx values into the equation that they go to! These easy steps will allow you to interpret absolute functions as piecewise.

Try it!

Take a look at the following function: f(x)=∣−x+5∣f(x) = |-x + 5|

What equation will it follow when −x+5-x + 5 is greater than or equal to 00?

Choose one answer

Video · + 1 min read

(Video) Writing an Absolute Value as a Piecewise Function

by Daniel Kopsas

This video by Daniel Kposas explains the connection between absolute values and piecewise functions.

Summary\large{\text{Summary}}

We can graph absolute value functions by translating them into piecewise functions. Piecewise functions are functions with more than one piece. Each piece follows different equations depending the value of xx. If you remember how to solve absolute value equations, they should look pretty similar.

Let's break down an absolute value.

y=∣x+2∣y=|x+2|

First, we set up the boundaries for the domain. These boundaries tell us which part of the function to use based on the xx-values we are using. To find the boundaries, we use the expression inside the absolute value sign. Remembering that absolute value gives distance from 00, we use 00 as the divider between the boundaries.

x+2≥0x+2<0\begin{align} x+2 \ge 0 \\ x+2<0 \end{align}

Second, we set up the rest of the function. Assign the expression inside the absolute value signs, x+2x+2, to the first boundary. And the opposite of the expression, −(x+2)-(x+2) to the second boundary.

y={x+2    if    x+2≥0−(x+2)    if    x+2<0 \begin{align} y&=\left\{\begin{matrix} x+2\,\,\,\,\text{if}\,\,\,\,x+2\geq0\\-(x+2)\,\,\,\,\text{if}\,\,\,\,x+2<0\end{matrix}\right.\\\ \end{align}

Now we can isolate xx in each inequality. This will give us the xx-value for the vertex.

x+2≥0x≥−2x+2<0x<−2\begin{align} x+2 &\geq 0\\ x&\geq -2\\ \\ x+2 &< 0\\ x &< -2 \end{align}

We can then apply these to our piecewise function.

y={x+2    if    x≥−2−x−2    if    x<−2y=\left\{ \begin{matrix} x+2\,\,\,\,\text{if}\,\,\,\,x\geq-2\\ -x-2\,\,\,\,\text{if}\,\,\,\,x<-2 \end{matrix}\right.

For more practice, and to make these functions a little bit more complex, try word problems with absolute value inequalities!

Illustrated · 1 min

Interpret Absolute Value Functions as Piecewise

When interpreting an absolute value function as a piecewise function (which could be helpful for graphing), it is important to remember that the expression within the absolute value could be negative OR non-negative. In other words, the expression within the absolute value could be <0<0 or ≥0.\ge 0. Use those two cases to split up the absolute value accordingly, and then simplify!

Interpret Absolute Value Functions as Piecewise: y = |x+7|. If x+7 ≥ 0, y = |x+7| = x+7. If x+7 < 0, y = −|x+7| = −(x+7). Put these together into piecewise function format to get y = {x+7 if x+7≥0, -(x+7) if x+7<0 --------->  y = {x+7 if x≥-7, -x-7 if x<-7

Image source: By Caroline Kulczycky

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems