chalk

Evaluating piecewise functions

You will be able to find the value of a function that switches formula, even right at the switch. A tax with one rate on the first part of your pay and another on the rest works this way.

Core idea

Take a function with two formulas. One is used for small inputs, the other for big ones:

Each formula is a piece. The input is where the rule changes, so we call it the break point.

Pick one piece, then calculate

Try . It is less than , so the first piece is in force. That gives .

Now try . It is not less than , so the second piece is in force. That gives .

Every input uses exactly one piece. Compare the input with the break point first, and calculate after that.

The break point has an owner

Now try the break point itself. The first piece says , which leaves out . The second says , which includes it.

So the second piece owns the break point, and . On a graph, the piece that owns the endpoint gets a solid dot. The other piece gets a hollow ring.

A piece can be a plain number

Say the second piece were just instead of . There is no in it to replace.

Then every input from upwards gives . So , and as well.

Three pieces need two checks

A third piece could take over from . The middle piece then holds only for .

Check the input against both break points. The input is at least and below , so the middle piece still gives .

Most people put the break point into the first piece out of habit. The sign in the second piece is why that is wrong.

Worked example

Let

Find .

The input is . It is at least , so the second piece is in force.

the second piece, since
multiply first
then add

The first piece would have given , a different number. The side of the break that the input is on decides which one you get.

Problems

1Basics

Let

Find .

Hint

Compare the input with the break point first. The input is negative and the break point is not.

Sign in to see the solution
2Easy

Let

Find , the value at the break point.

Hint

Look at the two signs: one includes the break point and the other leaves it out.

Sign in to see the solution
3Easy

Let

Find .

Hint

Compare the input with the break point, then read off the piece that is in force.

Sign in to see the solution
4Medium

Let

Find .

Hint

Check the input against both break points to find the piece it falls in.

Sign in to see the solution

What's next