Practice Piecewise Function in Math

Use these practice problems to test your method after reviewing the concept explanation and worked examples.

Quick Recap

A piecewise function is defined by different formulas on different non-overlapping intervals of its domain, with the applicable formula determined by the input value.

A piecewise function is like a rulebook: look up which rule applies to your input value, then use only that rule to compute the output.

Showing a random 20 of 50 problems.

Example 1

hard
For f(x)={2x+1x<0x2โˆ’3xโ‰ฅ0f(x) = \begin{cases} 2x + 1 & x < 0 \\ x^2 - 3 & x \ge 0 \end{cases}, find the range on [โˆ’2,2][-2, 2].

Example 2

hard
The greatest integer (floor) function is โŒŠxโŒ‹\lfloor x \rfloor. Express โŒŠxโŒ‹\lfloor x \rfloor on [0,3)[0, 3) as a piecewise function.

Example 3

medium
For f(x)={2xx<1x+1xโ‰ฅ1f(x)=\begin{cases}2x & x<1\\ x+1 & x\ge 1\end{cases}, is ff continuous at x=1x=1?

Example 4

medium
For f(x)={โˆ’xx<0x2xโ‰ฅ0f(x) = \begin{cases} -x & x < 0 \\ x^2 & x \ge 0 \end{cases}, find the range on [โˆ’3,2][-3, 2].

Example 5

easy
Should the intervals of a piecewise function overlap?

Example 6

easy
In the absolute value โˆฃxโˆฃ={xxโ‰ฅ0โˆ’xx<0|x|=\begin{cases}x & x\ge 0\\ -x & x<0\end{cases}, find โˆฃโˆ’5โˆฃ|-5|.

Example 7

challenge
For f(x)={x2x<12xโˆ’1xโ‰ฅ1f(x)=\begin{cases}x^2 & x<1\\ 2x-1 & x\ge 1\end{cases}, find all xx with f(x)=1f(x)=1.

Example 8

easy
For f(x)={xx<0x+1xโ‰ฅ0f(x)=\begin{cases}x & x<0\\ x+1 & x\ge 0\end{cases}, find f(โˆ’2)f(-2).

Example 9

medium
Find the value of aa that makes f(x)={ax+1xโ‰ค2x2โˆ’1x>2f(x) = \begin{cases} ax + 1 & x \le 2 \\ x^2 - 1 & x > 2 \end{cases} continuous at x=2x = 2.

Example 10

easy
For the same ff, find f(3)f(3).

Example 11

easy
Evaluate f(x)={x2x<02x+1xโ‰ฅ0f(x) = \begin{cases} x^2 & x < 0 \\ 2x + 1 & x \geq 0 \end{cases} at x=โˆ’3x = -3, x=0x = 0, and x=4x = 4.

Example 12

easy
For the same ff, find f(4)f(4).

Example 13

easy
Write the absolute value โˆฃxโˆฃ|x| as a piecewise function.

Example 14

easy
How many pieces does sgn(x)={1x>00x=0โˆ’1x<0\text{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases} have?

Example 15

medium
Determine whether f(x)={x+1x<23x=22xโˆ’1x>2f(x) = \begin{cases} x + 1 & x < 2 \\ 3 & x = 2 \\ 2x - 1 & x > 2 \end{cases} is continuous at x=2x = 2.

Example 16

medium
Solve f(x)=4f(x) = 4 for f(x)={2x+6x<0x2xโ‰ฅ0f(x) = \begin{cases} 2x + 6 & x < 0 \\ x^2 & x \ge 0 \end{cases}.

Example 17

medium
For f(x)={โˆ’xx<0x20โ‰คxโ‰ค24x>2f(x)=\begin{cases}-x & x<0\\ x^2 & 0\le x\le 2\\ 4 & x>2\end{cases}, find f(0)f(0) and f(2)f(2).

Example 18

hard
Find the value of cc so that f(x)={cx+1xโ‰ค3x2โˆ’2x>3f(x) = \begin{cases} cx + 1 & x \leq 3 \\ x^2 - 2 & x > 3 \end{cases} is continuous at x=3x = 3.

Example 19

medium
Does f(x)={1xโ‰ค0x+1x>0f(x)=\begin{cases}1 & x\le 0\\ x+1 & x>0\end{cases} have a jump at x=0x=0?

Example 20

easy
For f(x)={5xโ‰ค12xx>1f(x)=\begin{cases}5 & x\le 1\\ 2x & x>1\end{cases}, find f(1)f(1).