Back to homeMathematics · 4th ESO A · Change subject
Start for free
Notes

Exercises: Piecewise functions

Practice★☆☆
When defining the modulus function $f(x) = |2x - 6|$ as a piecewise function, a student writes that $f(x) = 2x - 6$ for $x > 0$ and $f(x) = -2x + 6$ for $x \le 0$.…

When defining the modulus function $f(x) = |2x - 6|$ as a piecewise function, a student writes that $f(x) = 2x - 6$ for $x > 0$ and $f(x) = -2x + 6$ for $x \le 0$. Identify the error made in the interval conditions and write the correct piecewise definition.

Solve
Practice★☆☆
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★☆☆
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★☆☆
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★☆☆
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★☆☆
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
Practice★☆☆
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★☆☆
Look at the following graph of a piecewise function and write its algebraic expression. Pay attention to the points where the function changes branch.

Look at the following graph of a piecewise function and write its algebraic expression. Pay attention to the points where the function changes branch.

X Y 1 1
Solve
Practice★☆☆
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
Practice★☆☆
An eco-friendly bicycle courier company calculates the delivery fee $C(x)$ (in euros) based on the package weight $x$ (in kilograms) using the piecewise function:…

An eco-friendly bicycle courier company calculates the delivery fee $C(x)$ (in euros) based on the package weight $x$ (in kilograms) using the piecewise function:

$C(x) = \begin{cases} 4 & \text{if } 0 < x \le 2 \\ 4 + 1,50 \cdot (x - 2) & \text{if } 2 < x \le 5 \end{cases}$

  1. a) Before doing the exact calculation, reasonably estimate whether sending a $4,8\text{ kg}$ package will cost more or less than $9\text{ \euro}$. Explain the approximate mental calculation you did.
  2. b) Calculate the exact cost $C(4,8)$ and check whether your initial estimation was correct.
  3. c) Check whether the function is continuous at $x = 2$. Why is it commercially desirable that there is no jump in the price precisely at that weight?
Solve
Practice★☆☆
In a local fruit shop, the price of oranges per kilogram is calculated using the following piecewise function depending on the quantity $x$ (in kg) that a customer buys:…

In a local fruit shop, the price of oranges per kilogram is calculated using the following piecewise function depending on the quantity $x$ (in kg) that a customer buys:

$P(x) = \begin{cases} 1,60 \cdot x & \text{if } 0 \le x < 5 \\ 7,50 + 1,10 \cdot (x - 5) & \text{if } 5 \le x \le 15 \end{cases}$

Marcos wants to calculate the price he will pay for $5\text{ kg}$ and for $3\text{ kg}$, and writes the following:

"For $x = 5\text{ kg}$, I use the first formula because I see the number 5 in its condition: $P(5) = 1,60 \cdot 5 = 8\text{ \euro}$. For $x = 3\text{ kg}$, since it is already a regular purchase, I use the second formula: $P(3) = 7,50 + 1,10 \cdot (3 - 5) = 7,50 - 2,20 = 5,30\text{ \euro}$".

  1. a) Point out the two conceptual errors Marcos makes regarding the use of the symbols $<$ and $\le$ and the choice of the appropriate piece.
  2. b) Correct his work: determine in which piece each case must be calculated and find the correct amounts.
  3. c) Does the function have a jump at $x = 5$ or is it continuous? Justify your answer by calculating the value given by each piece at the boundary.
Solve
Practice★★☆
When asked to plot the function $f(x) = |x^2 - 4|$, a student submits the following graph, arguing that "since the numbers are squared, the result is already positive…

When asked to plot the function $f(x) = |x^2 - 4|$, a student submits the following graph, arguing that "since the numbers are squared, the result is already positive and the modulus changes nothing in the parabola".

X Y Student's answer

Identify the student's conceptual error, state in which exact interval of $x$ the drawn graph is incorrect, and explain what the actual graph of the function should look like.

Solve
Practice★★☆
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
Practice★★☆
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
Practice★★☆
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★★☆
Find the value of the parameter $k$ so that the following function is continuous throughout its domain:…

Find the value of the parameter $k$ so that the following function is continuous throughout its domain:

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

Solve
Practice★★☆
Draw the graph of the piecewise function formed by a parabola and a line: $f(x) = \begin{cases} x^2 - 4 & \text{if } x \le 1 \\ -2x - 1 & \text{if } x > 1 \end{cases}$…

Draw the graph of the piecewise function formed by a parabola and a line:

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

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

Solve
Practice★★☆
From the following graph, determine the algebraic expression of the piecewise function $f(x)$. Look carefully at the coordinates of the vertices and the axis intercepts.

From the following graph, determine the algebraic expression of the piecewise function $f(x)$. Look carefully at the coordinates of the vertices and the axis intercepts.

X Y −2 2 2 −2
Solve
Practice★★☆
An electricity company bills its residential customers based on the energy consumed $x$ (in kWh) per month. The monthly cost $C(x)$ is calculated as follows: A standing…

An electricity company bills its residential customers based on the energy consumed $x$ (in kWh) per month. The monthly cost $C(x)$ is calculated as follows:

  • A standing charge of $10$ euros.

  • The first $100\text{ kWh}$ cost $0{,}15$ euros each.

  • Any consumption exceeding $100\text{ kWh}$ costs $0{,}20$ euros each.

Write the algebraic expression of the piecewise function $C(x)$ and calculate how much a family that consumed $140\text{ kWh}$ will pay.

The graph represents this tariff:

0 20 40 60 80 100 kWh 120 140 160 10 € Consumption (kWh) Cost (€)
Solve
Practice★★☆
Given the piecewise function: $f(x) = \begin{cases} 2x + 6 & \text{if } x < -1 \\ x^2 - 4 & \text{if } -1 \le x \le 3 \\ -x + 8 & \text{if } x > 3 \end{cases}$ Solve the…

Given the piecewise function:

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

Solve the equation $f(x) = 0$, checking in each case whether the solution obtained belongs to the domain of the corresponding branch.

Solve
Practice★★☆
In a Spanish city, the bi-monthly domestic water bill is charged in consumption blocks to penalise waste, according to the function $C(x)$ (in euros), where $x$ is the…

In a Spanish city, the bi-monthly domestic water bill is charged in consumption blocks to penalise waste, according to the function $C(x)$ (in euros), where $x$ is the volume of water consumed in cubic metres ($\text{m}^3$):

$C(x) = \begin{cases} 10 + 0,80 \cdot x & \text{if } 0 \le x \le 15 \\ 22 + 1,60 \cdot (x - 15) & \text{if } 15 < x \le 30 \\ 46 + 2,50 \cdot (x - 30) & \text{if } x > 30 \end{cases}$

  1. a) One household uses exactly $15\text{ m}^3$ and a neighbouring one uses $15,1\text{ m}^3$. Calculate the amount of both bills and explain whether the transition from one bracket to the next happens smoothly or with a sharp penalty.
  2. b) Formally prove whether the cost function $C(x)$ is continuous at the bracket transition points ($x = 15$ and $x = 30$).
  3. c) If a family receives a water bill for an exact amount of $34\text{ \euro}$, reasonably determine which consumption bracket they are in and calculate how many cubic metres they consumed in that two-month period.
Solve
Practice★★☆
Your local sports centre offers tennis court rentals. During the first 4 hours per month, they charge a base rate of $6\text{ \euro/hour}$ (with no membership fee). To…

Your local sports centre offers tennis court rentals. During the first 4 hours per month, they charge a base rate of $6\text{ \euro/hour}$ (with no membership fee). To encourage sport after the fourth hour ($x > 4$), the management wishes to lower the price to $4\text{ \euro}$ for each additional hour. Two mathematical models are being debated for the second bracket:

  • Model 1: $f(x) = 4 \cdot x$ if $x > 4$.

  • Model 2: $f(x) = k + 4 \cdot (x - 4)$ if $x > 4$.

  1. a) Analyse Model 1 by calculating the cost for $x = 4\text{ hours}$ and for $x = 4,1\text{ hours}$. Explain why this model makes no sense from a business and continuity perspective.
  2. b) Find the value of the parameter $k$ in Model 2 so that the function is continuous at $x = 4$ and no jump occurs.
  3. c) Write the final piecewise function using Model 2 with the found value of $k$ and calculate how much a person who plays 11 hours in a month will pay.
Solve
Practice★★★
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
Practice★★★
Express the quadratic modulus function $f(x) = |x^2 - 2x - 8|$ as a piecewise function without using the modulus symbol. Then, draw its graph, indicating its axis…

Express the quadratic modulus function $f(x) = |x^2 - 2x - 8|$ as a piecewise function without using the modulus symbol. Then, draw its graph, indicating its axis intercepts and the coordinates of its vertex.

Solve
Practice★★★
The velocity $v$ (in $\text{m/s}$) of a train as a function of time $t$ (in seconds) is given by the following graph: it accelerates uniformly from rest until reaching…

The velocity $v$ (in $\text{m/s}$) of a train as a function of time $t$ (in seconds) is given by the following graph: it accelerates uniformly from rest until reaching $30\text{ m/s}$ in $10\text{ s}$. It maintains that velocity for $40\text{ s}$. Finally, it decelerates uniformly until coming to a complete stop in $5\text{ s}$.

Graph of train velocity as a function of time t (s) v (m/s) 10 20 30 0 10 20 30 40 50 55
  1. a) Find the analytical expression of the piecewise function $v(t)$.
  2. b) State its domain.
Solve
Practice★★★
Write the function $f(x) = |x + 3| + |x - 1|$ as a piecewise function. To do this, study the sign of the expressions inside the modulus signs across the different…

Write the function $f(x) = |x + 3| + |x - 1|$ as a piecewise function. To do this, study the sign of the expressions inside the modulus signs across the different intervals of the number line.

Solve
Practice★★★
Consider the function: $f(x) = \begin{cases} \frac{2}{x} & \text{if } x < -1 \\ -x^2 + 3 & \text{if } -1 \le x \le 2 \\ 2x - 5 & \text{if } x > 2 \end{cases}$ Study its…

Consider the function:

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

Study its domain, continuity, axis intercepts, and local extrema. Sketch its graph.

Solve
Practice★★★
Determine the algebraic expression of the piecewise function shown in the following graph. Note that the first section is a parabola and the second is a straight line.

Determine the algebraic expression of the piecewise function shown in the following graph. Note that the first section is a parabola and the second is a straight line.

X Y 2 −2 4
Solve
Practice★★★
A telecommunications company offers a mobile data plan under the following conditions: For a fixed fee of $15$ euros, the customer gets $10\text{ GB}$ at maximum speed.…

A telecommunications company offers a mobile data plan under the following conditions:

  • For a fixed fee of $15$ euros, the customer gets $10\text{ GB}$ at maximum speed.

  • If they exceed $10\text{ GB}$, the speed is reduced and they are charged $2$ euros for each additional gigabyte used, up to a maximum total billable amount of $20\text{ GB}$.

  • Beyond $20\text{ GB}$, data service is cut off and nothing further is billed.

Determine the algebraic expression of the piecewise function $P(x)$ that represents the monthly bill price as a function of the gigabytes $x$ consumed.

Solve
Practice★★★
Find the algebraic expression of a piecewise function $f(x)$ consisting exclusively of two linear sections that simultaneously satisfies all the following conditions:…

Find the algebraic expression of a piecewise function $f(x)$ consisting exclusively of two linear sections that simultaneously satisfies all the following conditions:

  • Its domain is the interval $[-4, 5]$.

  • It has a finite jump discontinuity at $x = 1$.

  • It is strictly increasing on the interval $[-4, 1)$ and strictly decreasing on the interval $(1, 5]$.

  • It passes through the point $(-4, -2)$.

  • The left-hand limit at $x = 1$ is $4$, and the right-hand limit is $2$.

  • It has a root (intersects the x-axis) at $x = 3$.

Solve
Practice★★★
On a section of a Spanish motorway signposted at $120\text{ km/h}$, a speed camera measures the speed $v$ of vehicles in $\text{km/h}$. The absolute deviation from the…

On a section of a Spanish motorway signposted at $120\text{ km/h}$, a speed camera measures the speed $v$ of vehicles in $\text{km/h}$. The absolute deviation from the legal limit is defined as $D(v) = |v - 120|$. To find out which vehicles travel with a deviation greater than $15\text{ km/h}$ (that is, those going at less than $105\text{ km/h}$ or more than $135\text{ km/h}$), two students propose two different solving methods:

  • Method A (Geometric): Interpret $|v - 120|$ as the distance on the number line between the speed $v$ and $120$, looking for points whose distance to the centre is greater than $15$.

  • Method B (Piecewise algebraic): Write $D(v)$ as a piecewise function by removing the absolute value bars depending on whether $v \ge 120$ or $v < 120$, and solve an independent inequality on each branch.

  1. a) Fully develop both methods and verify that the same solution is reached.
  2. b) Compare the two approaches: which one is faster and more intuitive for this problem? In which more complex cases (for example, if the function were $g(v) = |2v - 100| + v$) does Method A cease to be useful and Method B becomes essential?
  3. c) The DGT only fines for speeding, not for moderate underspeeding. Write the analytical expression of a piecewise function $M(v)$ that returns $0$ if no infraction is committed ($v \le 120$) and the number of punishable $\text{km/h}$ if the limit is exceeded ($v > 120$). Justify whether $M(v)$ is continuous at $v = 120$.
Solve
Practice★★★
In Spain, IRPF (personal income tax) is settled by progressive marginal brackets and not by applying a single percentage to the total salary. Consider the following…

In Spain, IRPF (personal income tax) is settled by progressive marginal brackets and not by applying a single percentage to the total salary. Consider the following simplified scale on the taxable base $x$ (in gross euros per year):

  • Bracket 1 (up to $12.450\text{ \euro}$): taxed at $19\%$.

  • Bracket 2 (from $12.450\text{ \euro}$ to $20.200\text{ \euro}$): the first $12.450\text{ \euro}$ are taxed at $19\%$ and the rest at $24\%$.

  • Bracket 3 (from $20.200\text{ \euro}$ to $35.200\text{ \euro}$): the first $20.200\text{ \euro}$ accumulate a fixed fee of $4.225,50\text{ \euro}$ and the excess is taxed at $30\%$.

  1. a) Write the complete analytical expression of the piecewise function $I(x)$ that calculates the tax to pay according to the gross annual salary $x$ for $0 \le x \le 35.200$.
  2. b) Mathematically prove that the function $I(x)$ is continuous at the bracket boundaries $x = 12.450$ and $x = 20.200$.
  3. c) A worker who earns $20.200\text{ \euro}$ per year receives an offer for a raise of $600\text{ \euro}$ gross per year. Her colleague warns her: "You shouldn't accept, because by exceeding $20.200\text{ \euro}$ you enter the $30\%$ bracket and you will end up taking home less net salary (take-home pay) than before". Calculate the net salary (gross minus taxes) before and after the raise. Explain why the colleague's argument is false and how the continuity of the piecewise function protects workers from that supposed harm.
Solve
Practice★★★
Topic challenge. How can you optimize the electricity bill in your home? Become an energy consultant and write a mathematical report using real data. 1. Data collection:…

Topic challenge. How can you optimize the electricity bill in your home? Become an energy consultant and write a mathematical report using real data.

  1. Data collection: Check the Red Eléctrica de España (REE) website or a household bill for the price per kWh in the peak, standard (off-peak shoulder) and valley periods (each period has a different price), along with the fixed power charge.

  2. Digital modeling: In GeoGebra or a spreadsheet:

  3. Model the consumption cost with a piecewise function according to the time slots.

  4. Represent the average unit cost using an inverse proportionality function $f(x)=\frac{k}{x}+b$.

  5. Model the electric current intensity using the linear function $I(P)=\frac{P}{230}$ (with $U=230$ V) or simulate the extra cost for excess consumption with a radical function, a parabola or an exponential.

  6. Report and critical analysis: Submit a well-reasoned proposal of $1$ or $2$ pages. Highlight the key ideas: real domains, growth and asymptotes. Point out typical mistakes to avoid, such as forgetting the domain restriction $x>0$ or confusing asymptotes with intercepts with the axes. Suggest two saving measures supported by your graphs.

You will be assessed on:

  • Accuracy in setting up and fitting the functions (piecewise, inverse, linear or radical, and quadratic/exponential).

  • Rigorous analysis of mathematical properties and explicit prevention of common mistakes.

  • Quality of the energy-saving proposal based on the real REE data.

Solve