Piecewise Functions

LESSON 9 OF 27See the unit map ↗

Choose the correct branch when evaluating a piecewise function.

The bigger question: What does a function tell us—and what can it hide?

On this page

Idea

A piecewise definition uses different formulas on different parts of the domain. It is still one function, provided its cases assign exactly one consistent output to every allowed input.

Visual guide

VISUAL GUIDEThe endpoint belongs to one branch
This example uses f(x) = x + 1 for x < 0 and f(x) = x² for x ≥ 0. The open circle at (0, 1) excludes that value; the filled circle at (0, 0) gives f(0).-3-2-1.5-0.2501.51.53.2535xy
  • x + 1, x < 0
  • x², x ≥ 0
This example uses f(x) = x + 1 for x < 0 and f(x) = x² for x ≥ 0. The open circle at (0, 1) excludes that value; the filled circle at (0, 0) gives f(0).

Method

To evaluate, first decide which condition the input satisfies, then use only that formula. At a boundary, inspect strict and non-strict inequality signs to determine endpoint inclusion.

Worked example

Let f(x)=x+2f(x)=x+2 for x<0x<0 and f(x)=x2f(x)=x^2 for x≥0x\ge0. Then f(−1)=1f(-1)=1, f(0)=0f(0)=0, and f(2)=4f(2)=4. The left branch approaches 22 near zero, while the value at zero is determined by the second branch. This is a jump, despite both formulas being individually continuous.

PAUSE & THINKA quick check, not a grade

Try it yourself.

Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.

Let f(x)=x² for x<0 and f(x)=x+1 for x≥0. What is f(0)?

Hint 1 · Find a starting point

Use the condition that includes the input exactly.

Hint 2 · Take the next step

The second branch includes equality at zero.

Show the reasoning

Answer: 1

At x=0 the rule is x+1, so f(0)=1.

Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.

Common mistake

Using both formulas at a boundary without checking the case conditions can assign two incompatible outputs.

Check your understanding

For the worked function, calculate f(−2)+f(1)f(-2)+f(1).

Show answer

0+1=10+1=1.

MAKE IT YOURS

Pause before the next idea.

Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.

Optional marks, not a grade. Saved in this browser only. Open notebook →