You are on page 1of 6

Algebra 1

Section 6.1

Introduction to Piecewise Functions


Piecewise Functions

Functions can sometimes be limited in their ability to describe a system. For example, a particle
may move in a linear pattern initially and eventually move in an exponential pattern. There is no
single function weve that can model this system. However, by taking various functions at different
intervals of x, one can piece together these parts to make a larger piecewise function.

A piecewise function is not defined by the same equation for all values of x. Over different inter-
vals of x, the equation of a piecewise function changes. For example, consider the function below:

=
(
x x0
f (x) =
x2 0<x

This notation is used to describe a function that is linear when x is negative or 0 and quadratic
when x is positive. Thus, f (3) = 3, but f (3) = 32 = 9. Notice that this function is still connected,
because (0)= 0, so both pieces of the function are 0 at x = 0. Technically, however, there should only
be one piece where f (0) is defined. This is because according to the rules of being a function, there
cannot be more than one value of f (x) for a single value of x. That wouldnt be an issue with the
above equation, but piecewise functions are not always connected. Consider the function below.

(
x x0
f (x) =
3x 0<x

Notice that 30 = 1 6= 0, so the function is disconnected at x = 0. However, there is still only


a single value for f (0), since f (x) = 3x only when x > 0, not when x 0. Thus, f (0) = 0, since
f (x) = x for x 0.

Piecewise functions can have more than just two pieces, but it is important with multiple pieces
to make sure that at the boundary of an interval f (x) is only defined once. Consider the function below.


3
x 2
f (x) = x3 2 < x < 4
x
2 21

4x

Notice that at x = 2 and x = 4 the function is only defined once. f (2) = 3, f (1) = 13 = 1,
4
and f (4) = 2 21 = 16
2
= 18 .

A piecewise function can even have a unique equation at a single value of x.

1
Absolute Value Functions

The function f (x) = |x| is somewhat intuitive to evaluate. f (3) = | 3| = 3, f (5) = |5| = 5.
Every negative number is negated and every nonnegative number is unchanged by the absolute value
function. This different treatment of numbers depending on the interval to which they belong implies
a piecewise function. In fact, the absolute value function can be written as a piecewise function, and
this can make it easier to graph or translate.

(
x x < 0
f (x) = |x| =
x 0x

Notice that f (x) gives the same values. f (3) = (3) = 3, f (5) = 5.

This form of the function is easy to translate algebraically because it is in the form of two linear
equations. For example, f (x) = 3|x| + 1 can be written in the form below.

(
3x + 1 x < 0
f (x) = 3|x| + 1 =
3x + 1 0x

Terms can even be added inside the absolute value and translated into linear functions. The ab-
solute value bars become parentheses and the appropriate coefficient is multiplied to those parenthesis.
However, the intervals change when a term is added inside the absolute value. To find the point where
the interval switches, set the inside of the absolute value to 0 and solve for x. For example, consider
the function f (x) = 2|x + 1| 3. Let x + 1 = 0, implying x = 1 Thus, the point where the interval
switches is x = 1. The piecewise form of this function is given below.

(
(2)(x + 1) 3 = 2x + 2 3 = 2x 1 x < 1
f (x) = 2|x + 1| 3 =
2(x + 1) 3 = 2x 2 3 = 2x 5 1 x

2
Step Functions

Step functions are a special kind of piecewise function in which all of the equations are constant.
That means that as a graph, they are all flat lines. Every interval of a piecewise function is equal to
a single number, and if there are two or more pieces which equal different numbers, the function will
not be connected. Consider the example step function below.


3 x 1

f (x) = 0 1 < x < 1

3 1x

Notice that all of the equations in this function are constant. A step function can have as many
parts (there are even step functions with infinite pieces) as possible, as long as every equation for every
interval is a constant.

3
Examples

Here are a few examples to test the concepts provided in this section. Answers can be found on
the following pages.

1. Evaluate the following function f (x) at x = 2, x = 0, and x = 2.

(
x2 x0
f (x) =
4x 0<x

2. Rewrite the absolute value function f (x) = 3|2x 6| + 4 as a piecewise function involving two
linear equations.

3. Is the following function f (x) a step function?


3 x 4

f (x) = x2 4 < x 3

1 3<x

4
Solutions

These are the solutions to the questions on the previous page

1. At x = 2 and x = 0, f (x) is defined by the quadratic equation. At x = 2, f (x) is defined by


the exponential function. Thus, f (2) = (2)2 = 4, f (0) = 02 = 0, and f (2) = 4(2) = 16.

2. To find where the boundary point is, let the expression in the absolute value equal 0. 2x 6 = 0
implies 2x = 6 and x = 3. Thus, the boundary point is x = 3. Next, rewrite the absolute value
bars as parentheses, distribute the coefficient 3, and combine like terms. 3(2x6)+4 = 6x18+
4 = 6x18. Finally, negate the coefficient of the absolute value for the equation to the left of x = 3
and write the two equations in piecewise defined form. 3(2x6)+4 = 6x+18+4 = 6x+22.

(
6x + 22 x<3
f (x) =
6x 14 3x

Note that the two equations are equal at x = 3, so another right answer to this question is:

(
6x + 22 x3
f (x) =
6x 14 3<x

3. This is not a step function because not all of the equations composing the piecewise function are
constant. Although f (x) is constant at and to the left of x = 4 and to the right of x = 3, f (x)
is quadratic to the right of x = 4 until and including x = 3. A piecewise function must be
constant for all real values of x to be a step function, so f (x) is not a step function.

You might also like