### Video Transcript

In this lesson, weβll learn how to
identify, write, and evaluate a piecewise function given both the function equation
and the graph of the function.

Letβs begin with a definition. A piecewise function is a function
thatβs made up from pieces of more than one different function. And each part of the function is
defined on a given interval. For example, letβs imagine we have
the function π of π₯, and itβs a piecewise function defined by π₯ plus one when π₯
is less than three and two π₯ minus two if π₯ is greater than or equal to three. In other words, for all values of
π₯ up to but not including π₯ equals three, we would use the function π of π₯
equals π₯ plus one. Then, when π₯ is equal to and
greater than three, we use the function two π₯ minus two. And then if we wanted to evaluate
the function at a specific value of π₯, we need to be careful to follow these
rules.

We can also sketch the graph of
this piecewise function. Up to but not including π₯ equals
three, we use the function π of π₯ equals π₯ plus one. The graph of this function looks as
shown. Notice that Iβve included an empty
dot at π₯ equals three, and thatβs because the function isnβt defined by π of π₯
equals π₯ plus one here. It is, however, defined at π₯
equals three but by the function two π₯ minus two. And so the graph could look a
little something like this. We could also include a solid dot
at π₯ equals three to show that the function is defined here if we chose. Letβs have a look at an example of
how to evaluate a piecewise function at a given value of π₯.

Given that the function π of π₯ is
equal to six π₯ minus two if π₯ is less than negative six, negative nine π₯ squared
minus one if π₯ is greater than or equal to negative six and less than or equal to
eight, and negative five π₯ cubed plus four if π₯ is greater than eight, find the
value of π of four.

We see that π of π₯ is a piecewise
function, and itβs defined by three separate functions. When π₯ is less than negative six,
weβre going to use the function π of π₯ equals six π₯ minus two. When π₯ is between negative six and
eight and including those values, we use the function negative nine π₯ squared minus
one. And when π₯ is greater than eight,
we use the function π of π₯ is negative five π₯ cubed plus four. Now we want to find the value of π
of four. And so we need to make sure that we
correctly select the function that we need to use when π₯ is equal to four. Well, four is between negative six
and eight. So weβre going to use this part of
the function: π of π₯ is negative nine π₯ squared minus one.

And so, π of four is found by
substituting π₯ equals four into this function. Itβs negative nine times four
squared minus one. Now, of course, the order of
operations, which is sometimes abbreviated to PEMDAS or BIDMAS, tells us to begin by
working out the value of the number being raised to some exponent. So in this case, we begin by
working out four squared. Thatβs four times four which is
16. And so our calculation becomes
negative nine times 16 minus one. We then perform the multiplication
part of this calculation, remembering that a negative multiplied by a positive is a
negative. We get negative 144 minus one. Negative 144 minus one is negative
145. And so, given the piecewise
function π of π₯, we see that π of four is negative 145.

Weβre now going to look at how to
apply this process but when working with composite functions based off of an
individual piecewise function.

Consider the function π of π₯ is
equal to π₯ plus four if π₯ is greater than four, two π₯ if π₯ is greater than or
equal to negative one and less than or equal to four, and negative three if π₯ is
less than negative one. Find π of π of two.

π of π of two is a composite
function. Itβs a function of a function. Weβre going to begin by looking at
the inner function first, so weβre going to begin by thinking about π of two. Now, our π of π₯ is a piecewise
function, and itβs defined by different functions on different intervals of π₯. Weβre told that when π₯ is greater
than four to use the function π₯ plus four. When π₯ is between and including
negative one and four, we use the function two π₯. And when π₯ is less than negative
one, we use the function π of π₯ equals negative three. Two, of course, lies between
negative one and four, and so weβre going to use the second part of our
function. That is, when π₯ is equal to two,
π of π₯ is equal to the function two π₯.

And so, π of two is found by
substituting two into this equation. We get two times two, which is
four. So we found π of two; itβs
four. If we replace π of two with its
value of four, we see that we now need to evaluate π of four. And we need to be really careful
here. Weβre actually still using this
second part of the function. And this is because we only use the
first part of the function when π₯ is strictly greater than four. When itβs less than or equal to
four, we use the function two π₯. And so once again, we substitute
our value of π₯ into the function π of π₯ equals two π₯, so itβs two times four
which is equal to eight. Given our piecewise function, π of
π of two is eight.

In our next example, weβll see how
to complete a table of values for a piecewise function.

Find the missing table values for
the piecewise function π of π₯, which is equal to two to the power of π₯ if π₯ is
less than negative two, three to the power of π₯ if π₯ is greater than or equal to
negative two and less than three, or two to the power of π₯ if π₯ is greater than or
equal to three. And then we have a table with the
values of π₯, negative three, zero, and three.

Remember, when we have a function
defined by different functions depending on its value of π₯, we call it a piecewise
function. And according to our table, weβre
looking to find the value of π of π₯ when π₯ is negative three. So thatβs π of negative three. We also want to find π of zero and
π of three. And so we need to pay extra careful
attention to the part of the function weβre going to use for each value of π₯. Letβs begin with π of negative
three. Here, π₯ is equal to negative
three. And so, since negative three is
less than negative two, we need to use the first part of our function, that is, two
to the power of π₯.

And so to find π of negative
three, weβre going to substitute π₯ equals negative three into that part of the
function. And we get π of negative three is
two to the power of negative three. And at this stage, we might recall
that a negative power tells us to find the reciprocal. So π to the power of negative π,
for instance, is one over π to the power of π. And this means then that two to the
power of negative three is one over two cubed, which is equal to one over eight. And so the first value in our table
is one-eighth. Letβs repeat this process for π₯
equals zero.

This time zero is between negative
two and three, so weβre going to use the second part of our function. And so, π of zero is found by
substituting π₯ equals zero into the function π of π₯ equals three to the power of
π₯. So thatβs three to the power of
zero. Now, of course, at this stage, we
might recall that anything to the power of zero is equal to one, so π to the power
of zero is simply equal to one. And thatβs the second value in our
table. Letβs repeat this process for the
third and final column in our table.

The third part of our piecewise
function is used when π₯ is greater than or equal to three. So weβre going to use this value
when π₯ is equal to three. And this means that π of three is
two cubed, which is simply equal to eight. And so we pop eight in the final
part of our table. The missing table values for our
piecewise function π of π₯ are one-eighth, one, and eight.

Weβre now going to look at a couple
of examples on evaluating a function at a point given its graph.

Determine π(0) using the graph.

Letβs look at the graph of our
function. It must be a piecewise function,
and this is because itβs made up of pieces of graphs of various functions over
various intervals on π₯. For instance, letβs take the first
portion of graph here. This portion is defined by a
specific function over the interval from negative 10 to eight. In fact, we could even define this
as the left-closed, right-open interval. And thatβs because the solid dot
tells us that itβs defined at π₯ equals negative 10 but not defined by this part of
the function at π₯ equals negative eight. Then, the second part of the
function allows us to define π of π₯ at π₯ equals negative eight with the solid dot
here.

But when π₯ is equal to zero, we
canβt use this part of the graph to determine π of zero. The empty dot tells us itβs not
defined by this part of our function. So, how are we going to determine
π of zero? Well, when π₯ is zero, weβre
looking for a part of the function that lies on the π¦-axis. Weβve already seen this canβt be
defined by this function here, but we do have a solid dot here. And so, the function is actually
defined when π₯ is equal to zero. This point has coordinates zero,
four. So we see that π of zero must be
equal to four.

Letβs consider one further example
of this type.

Determine π of one.

Here we see the function π of π₯
is a piecewise function. We know this because itβs made up
of the graphs of two different functions. The first part of the graph is
defined over the interval from negative two to one. But of course, this empty circle
tells us that itβs not defined by this graph at this point. Then the second part of the
function is defined over the interval from one to eight. Once again, the empty dot tells us
that itβs not defined at π₯ equals one by this portion of the graph.

And so, how are we going to
determine π of one? Well, we canβt. π of one is totally undefined
according to our graph. There are plenty of values that we
can find. For example, π of five is equal to
one, as is π of negative one. But π of one is completely
undefined according to our graph.

In this video, we learned that a
piecewise function is a function made up from pieces of more than one different
function. We saw that each function is
defined on some given interval. Finally, we saw that we can
evaluate a piecewise function using the graph or its individual function parts, but
we must be careful to ensure the function is actually defined at that point.