Let Find .
Understand what a piecewise definition asks of you. Three formulas are given, but only one applies at any given input. The first job is never to compute - it is to decide which condition the input satisfies.
Test x = 4 against each condition in turn. Is ? No. Is ? Yes. Is ? No. Exactly one condition holds, as it must for to be a well-defined function.
Select the matching rule. The middle condition applies, so on this interval The other two formulas are irrelevant here and must not be averaged or combined.
Substitute and evaluate.
Guard against the common mistakes. Using the first branch would give and the third - both wrong, because does not satisfy their conditions. Note also that the branch boundaries and are included in the middle piece, so and also come from .
Need to solve a different problem like this? Open the solver →