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 first piece would have given , a different number. The side of the break that the input is on decides which one you get.
Problems
Let
Find .
Hint
Compare the input with the break point first. The input is negative and the break point is not.
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.
Let
Find .
Hint
Compare the input with the break point, then read off the piece that is in force.
Let
Find .
Hint
Check the input against both break points to find the piece it falls in.