Back to homeMathematics · 4th ESO A · Change subject
Start for free
ESO Y4A · Mathematics
functions · Other types of functions

Piecewise-defined functions

A car park charges one price for the first hour and a different one for each extra hour. A mobile data plan changes its price after a certain amount of usage. These situations cannot be written with a single formula valid for every $x$: they need several formulas, each with its own interval. They are called piecewise-defined functions.

Before you start, make sure you know: Linear and affine functions (3rd ESO)
Before you start, make sure you know: The concept of a function (3rd ESO)

What a piecewise function is

Graph with three pieces of a function on consecutive intervals separated by dashed vertical lines at the switching points. piece 1 piece 2 piece 3

Each piece only "exists" within its own interval: outside it, that expression is not used. That is why every formula in the brace always needs its condition.

Practice★☆☆Not started
Determine the domain and range of the piecewise function whose algebraic expression is:…

Determine the domain and range of the piecewise function whose algebraic expression is:

$f(x) = \begin{cases} -1 & \text{if } -3 \le x < 0 \\ 1 & \text{if } 0 \le x \le 3 \end{cases}$

Solve

Calculating values: choose the piece first

To calculate $f(a)$, the first step is always to look at which piece $a$ falls in, and only then substitute into the corresponding formula.

Graph of a piecewise function showing the image at the switching point, with a filled dot where the inequality includes the endpoint and an open dot where it does not. x < −1 −1 ≤ x ≤ 2 x > 2
Practice★☆☆Not started
Given the following piecewise function: $f(x) = \begin{cases} 2x + 5 & \text{if } x < -1 \\ 3 & \text{if } -1 \le x \le 2 \\ -x + 4 & \text{if } x > 2 \end{cases}$…

Given the following piecewise function:

$f(x) = \begin{cases} 2x + 5 & \text{if } x < -1 \\ 3 & \text{if } -1 \le x \le 2 \\ -x + 4 & \text{if } x > 2 \end{cases}$

Calculate the value of the function at the points $x = -3$, $x = -1$, $x = 0$, $x = 2$ and $x = 5$.

Solve
Practice★☆☆Not started
Find the axis intercepts of the piecewise function: $f(x) = \begin{cases} x + 3 & \text{if } x < 0 \\ 2x - 4 & \text{if } x \ge 0 \end{cases}$

Find the axis intercepts of the piecewise function:

$f(x) = \begin{cases} x + 3 & \text{if } x < 0 \\ 2x - 4 & \text{if } x \ge 0 \end{cases}$

Solve

Graphing and studying continuity

To graph a piecewise function, draw each piece only within its interval, marking with a filled dot the endpoint that belongs to the piece (the one with $\leq$ or $\geq$) and with an open dot the one that does not.

Graph of a discontinuous function with a vertical jump at $x = 1$, with a filled dot on the lower branch and an open dot on the upper one. jump: discontinuous at x=1
Practice★☆☆Not started
Draw the graph of the following piecewise function in your exercise book: $f(x) = \begin{cases} x + 2 & \text{if } x \le 1 \\ 3 & \text{if } x > 1 \end{cases}$ State…

Draw the graph of the following piecewise function in your exercise book:

$f(x) = \begin{cases} x + 2 & \text{if } x \le 1 \\ 3 & \text{if } x > 1 \end{cases}$

State whether the function is continuous at $x = 1$.

You can do it on paper and send a photo with your answer.

Solve
Practice★☆☆Not started
Draw the graph of the function defined by: $f(x) = \begin{cases} -2 & \text{if } x < -2 \\ x & \text{if } -2 \le x \le 2 \\ 2 & \text{if } x > 2 \end{cases}$ You can do…

Draw the graph of the function defined by:

$f(x) = \begin{cases} -2 & \text{if } x < -2 \\ x & \text{if } -2 \le x \le 2 \\ 2 & \text{if } x > 2 \end{cases}$

You can do it on paper and send a photo with your answer.

Solve
Practice★★☆Not started
Draw the graph of the following function and classify its points of discontinuity, if any:…

Draw the graph of the following function and classify its points of discontinuity, if any:

$f(x) = \begin{cases} -2x - 4 & \text{if } x < -1 \\ 2 & \text{if } -1 \le x < 2 \\ x - 1 & \text{if } x \ge 2 \end{cases}$

You can do it on paper and send a photo with your answer.

Solve

The absolute value as a piecewise function

Practice★☆☆Not started
Express the modulus function $f(x) = |x - 4|$ as a piecewise function, removing the modulus bars.

Express the modulus function $f(x) = |x - 4|$ as a piecewise function, removing the modulus bars.

Solve
Practice★★☆Not started
Express the function $f(x) = |2x + 6| - 3$ as a piecewise function and draw its graph. Find the coordinates of its vertex (the point where the slope changes).

Express the function $f(x) = |2x + 6| - 3$ as a piecewise function and draw its graph. Find the coordinates of its vertex (the point where the slope changes).

Solve

Tiered tariffs

Piecewise functions are the natural model for any tariff whose price changes after a certain amount of usage or time.

Graph illustrating the common mistake of extending the line of one piece beyond its assigned interval, bounded by dashed vertical lines. 2 € C(t) = t+1 t (hours)
Practice★☆☆Not started
A public car park charges the following rates: $2$ euros for the first hour (or part thereof) and $1$ euro for each additional hour thereafter. Write the algebraic…

A public car park charges the following rates: $2$ euros for the first hour (or part thereof) and $1$ euro for each additional hour thereafter. Write the algebraic expression of the function $C(t)$ determining the cost in euros in terms of the time $t$ in hours, up to a maximum parking time of $3$ hours.

Solve
Practice★★☆Not started
The temperature $T$ (in $^\circ\text{C}$) of an industrial ceramics kiln varies depending on the time $t$ (in hours) since it is switched on. During the first $2$ hours,…

The temperature $T$ (in $^\circ\text{C}$) of an industrial ceramics kiln varies depending on the time $t$ (in hours) since it is switched on. During the first $2$ hours, the temperature rises from $20^\circ\text{C}$ at a constant rate of $400^\circ\text{C}$ per hour. Then, it remains constant for $3$ hours. Finally, it is turned off and the temperature decreases at a constant rate of $200^\circ\text{C}$ per hour until returning to $20^\circ\text{C}$.

Write the algebraic expression of the piecewise function $T(t)$.

The graph summarises the behaviour of the kiln:

t (h) T (°C) 20 0 2 5
Solve
Practice★★★Not started
Calculate the value of the parameters $a$ and $b$ so that the following function is continuous on the set of all real numbers $\mathbb{R}$:…

Calculate the value of the parameters $a$ and $b$ so that the following function is continuous on the set of all real numbers $\mathbb{R}$:

$f(x) = \begin{cases} ax + b & \text{if } x < -1 \\ x^2 - 2x & \text{if } -1 \le x < 2 \\ \frac{a}{x} + b & \text{if } x \ge 2 \end{cases}$

Solve

Back to the start: If a car park charges 2 € for the first hour and 1{,}50 € for each extra hour, the total price depending on the time $t$ (in hours) is the piecewise function $P(t) = 2$ if $0 < t \le 1$, and $P(t) = 2 + 1{,}50(t - 1)$ if $t > 1$.

Summary

See all the exercises in this section