Back to homeMathematics · 6th Year OL · Change subject
Start for free
Notes

Exercises: Piecewise functions

Practice★☆☆
Given the following piecewise function: $f(x) = \begin{cases} 2x+1 & \text{if } x < 0 \\ x^2-3 & \text{if } x \ge 0 \end{cases}$ Calculate the value of the function at…

Given the following piecewise function:

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

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

Solve
Practice★☆☆
Look at the graph of the function $f(x)$ and determine its domain and its range.

Look at the graph of the function $f(x)$ and determine its domain and its range.

X Y 0 3 −3 3 −2 f(x)
Solve
Practice★☆☆
Express the modulus function $f(x) = |3x - 6|$ as a piecewise function.

Express the modulus function $f(x) = |3x - 6|$ as a piecewise function.

Solve
Practice★☆☆
A central car park charges a fee of $2$ € for the first hour of stay (or fraction thereof). After the first hour, it charges at a rate of $1.50$ € for each additional…

A central car park charges a fee of $2$ € for the first hour of stay (or fraction thereof). After the first hour, it charges at a rate of $1.50$ € for each additional hour, billing the extra time proportionally to the exact minutes of stay. Write the piecewise function $C(x)$ representing the total cost in terms of the hours $x$ that the car stays in the car park.

Solve
Practice★☆☆
Find the boundary point of the following function and determine whether it is continuous at that point:…

Find the boundary point of the following function and determine whether it is continuous at that point:

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

Solve
Practice★☆☆
Match the following description with the structure of a piecewise function: "An oven is turned on and its temperature rises at a constant rate for 10 minutes until it…

Match the following description with the structure of a piecewise function: "An oven is turned on and its temperature rises at a constant rate for 10 minutes until it reaches 200ºC. It is kept at that temperature for 40 minutes to bake a pizza, and finally it is turned off, with its temperature dropping to room temperature (20ºC) at a constant rate over 30 minutes."

Write the time intervals that would define the three sections of the temperature function $T(t)$.

Solve
Practice★☆☆
Plot the graph of the following piecewise function in your notebook: $f(x) = \begin{cases} -2 & \text{if } x \le 1 \\ 2x-4 & \text{if } x > 1 \end{cases}$ You can do it…

Plot the graph of the following piecewise function in your notebook:

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

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

Solve
Practice★☆☆
From the graph of the function $g(x)$, determine its analytical expression knowing that it consists of two half-lines.

From the graph of the function $g(x)$, determine its analytical expression knowing that it consists of two half-lines.

X Y 0 2 4 g(x)
Solve
Practice★☆☆
To express the function $g(x) = |2x - 6| + 1$ as a piecewise-defined function, Cian writes on his exam: $$g(x) = \begin{cases} (2x - 6) + 1 = 2x - 5 & \text{if } x \ge 0…

To express the function $g(x) = |2x - 6| + 1$ as a piecewise-defined function, Cian writes on his exam:

$$g(x) = \begin{cases} (2x - 6) + 1 = 2x - 5 & \text{if } x \ge 0 \\ -(2x - 6) + 1 = -2x + 7 & \text{if } x < 0 \end{cases}$$

Cian argues that the change of interval always occurs at $x = 0$ because that is where numbers go from negative to positive.

  1. a) Explain with reasons Cian's conceptual error. Which expression is the one that really must change sign to separate the intervals of the absolute value, and at what value of $x$ does the change occur?
  2. b) Write the correct piecewise expression for $g(x)$ and verify, by calculating the one-sided limits at the transition point between intervals, that the function has no jump (it is continuous).
Solve
Practice★☆☆
An express courier company in Ireland charges for domestic shipments based on their weight $x$ (in kilograms) using the cost function $P(x)$ (in euros): $$P(x) =…

An express courier company in Ireland charges for domestic shipments based on their weight $x$ (in kilograms) using the cost function $P(x)$ (in euros):

$$P(x) = \begin{cases} 4 + 1.5x & \text{if } 0 < x \le 5 \\ 8 + 0.7x & \text{if } x > 5 \end{cases}$$
  1. a) Without performing exact numerical calculations, look carefully at the two branches: the fixed fee increases from $4$ € to $8$ €, but the cost per kilogram decreases from $1.5$ € to $0.7$ €. Estimate with reasons whether a customer sending a $5.1\text{ kg}$ parcel will pay much more, much less, or virtually the same amount as another customer sending a $4.9\text{ kg}$ parcel.
  2. b) Verify your estimate by calculating the exact costs $P(4,9)$ and $P(5,1)$. Then, calculate the one-sided limits $\lim_{x \to 5^-} P(x)$ and $\lim_{x \to 5^+} P(x)$ to determine whether there is an abrupt jump at the $5\text{ kg}$ threshold or whether the graph joins continuously. Is this result reasonable for the customer?
Solve
Practice★★☆
A mobile phone company offers a data tariff that works as follows: a monthly fixed line rental of $15$ € is paid, which includes the first $5$ GB of downloads. If that…

A mobile phone company offers a data tariff that works as follows: a monthly fixed line rental of $15$ € is paid, which includes the first $5$ GB of downloads. If that limit is exceeded, each additional gigabyte (or proportional fraction) is charged at $2$ €.

Write the function $C(x)$ representing the monthly cost in terms of the gigabytes $x$ consumed, and calculate how much a customer who consumed $3$ GB and another who consumed $8.5$ GB will pay.

Solve
Practice★★☆
Determine the value of the parameter $k$ so that the following piecewise function is continuous throughout its domain:…

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

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

Solve
Practice★★☆
Express the function $f(x) = |x - 2| + 3x$ as a piecewise function without using modulus signs, and calculate the values of $f(0)$ and $f(5)$.

Express the function $f(x) = |x - 2| + 3x$ as a piecewise function without using modulus signs, and calculate the values of $f(0)$ and $f(5)$.

Solve
Practice★★☆
A commuter train starts from a station and accelerates at a constant rate until it reaches a speed of $20$ m/s in $10$ seconds. It maintains that cruising speed for $30$…

A commuter train starts from a station and accelerates at a constant rate until it reaches a speed of $20$ m/s in $10$ seconds. It maintains that cruising speed for $30$ seconds and, finally, brakes uniformly until coming to a complete stop at the next station in $5$ seconds. Write the piecewise function $v(t)$ describing the speed of the train in terms of the time elapsed since starting.

Solve
Practice★★☆
From the graph of the function $h(x)$, which is made up of a parabolic arc and a half-line, find its analytical expression.

From the graph of the function $h(x)$, which is made up of a parabolic arc and a half-line, find its analytical expression.

X Y 0 2 −3 h(x)
Solve
Practice★★☆
An electricity bill for a home has a standing charge of $10$ € per month. In addition, the first $100$ kWh consumed are charged at $0.12$ €/kWh. If $100$ kWh is…

An electricity bill for a home has a standing charge of $10$ € per month. In addition, the first $100$ kWh consumed are charged at $0.12$ €/kWh. If $100$ kWh is exceeded, the excess consumption is charged at $0.15$ €/kWh. Write the function $F(x)$ giving the total bill amount in terms of the kWh $x$ consumed.

Solve
Practice★★☆
Given the piecewise function: $f(x) = \begin{cases} -x^2+4x & \text{if } x < 3 \\ x-2 & \text{if } x \ge 3 \end{cases}$ Plot its graph and determine its local maximums…

Given the piecewise function:

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

Plot its graph and determine its local maximums and minimums, if any.

Solve
Practice★★☆
In a fictional country, income tax is calculated as follows: for the first $10\,000$ € of income no tax is paid ($0$%). For the amount exceeding $10\,000$ € up to…

In a fictional country, income tax is calculated as follows: for the first $10\,000$ € of income no tax is paid ($0$%). For the amount exceeding $10\,000$ € up to $20\,000$ €, $10$% is paid. For the amount exceeding $20\,000$ €, $20$% is paid.

Write the piecewise function $I(x)$ calculating the tax payable in terms of income $x$.

Solve
Practice★★☆
In an Irish town, the two-monthly domestic water bill is divided into three consumption tiers to encourage water conservation: Tier 1 (basic consumption): up to…

In an Irish town, the two-monthly domestic water bill is divided into three consumption tiers to encourage water conservation:

  • Tier 1 (basic consumption): up to $15\text{ m}^3$, a fixed service fee of $6$ € is charged plus $0.50$ € for each cubic metre consumed.

  • Tier 2 (medium consumption): between $15\text{ m}^3$ and $30\text{ m}^3$, the first $15\text{ m}^3$ are paid according to tier 1, and the remaining volume exceeding $15\text{ m}^3$ is billed at $1.20$ € for each additional cubic metre.

  • Tier 3 (high consumption): for consumption over $30\text{ m}^3$, the first $30\text{ m}^3$ are paid according to the previous tiers, and each additional cubic metre over $30\text{ m}^3$ costs $2.50$ €.

  1. a) Model the bill by writing the function $C(x)$ (cost in euros) in terms of the volume $x$ of water consumed (in $\text{m}^3$), detailing the simplified algebraic expression for each of the three intervals: $[0, 15]$, $(15, 30]$, and $(30, +\infty)$.
  2. b) Check analytically using the corresponding one-sided limits whether the function $C(x)$ is continuous at the transition points between tiers ($x = 15$ and $x = 30$).
  3. c) What fairness problem would arise for users if the company directly billed the entire volume at $1.20$ €/$\text{m}^3$ as soon as consumption exceeded $15\text{ m}^3$?
Solve
Practice★★☆
The vertical profile of a skateboard ramp consisting of two sections that join at the horizontal coordinate $x = 2$ is to be designed: $$f(x) = \begin{cases} f_1(x) &…

The vertical profile of a skateboard ramp consisting of two sections that join at the horizontal coordinate $x = 2$ is to be designed:

$$f(x) = \begin{cases} f_1(x) & \text{if } x < 2 \\ f_2(x) & \text{if } x \ge 2 \end{cases}$$

The ramp must strictly satisfy the following design conditions:

  1. For $x < 2$, the section $f_1(x)$ is a linear function (straight line) whose graph passes through the point $(-1, 0)$.

  2. For $x \ge 2$, the section $f_2(x)$ is a quadratic function (parabola) whose vertex is located at the point $(4, 1)$.

  3. The track cannot have steps: the function must be continuous at $x = 2$, with the height at that junction point being exactly $f(2) = 5$.

  1. a) Find the algebraic expression of the parabola $f_2(x)$ using its vertex form, $y = a(x - x_v)^2 + y_v$, and the junction point $(2, 5)$.
  2. b) Find the algebraic expression of the line $f_1(x)$ by determining its slope from the points through which it must pass.
  3. c) Write the complete function $f(x)$ with its domains and formally verify, by calculating $\lim_{x \to 2^-} f(x)$ and $\lim_{x \to 2^+} f(x)$, that there is no discontinuity at $x = 2$.
Solve
Practice★★★
Determine the values of the parameters $a$ and $b$ so that the function $f(x)$ is continuous at $x=1$ and passes through the point $(4, 9)$.…

Determine the values of the parameters $a$ and $b$ so that the function $f(x)$ is continuous at $x=1$ and passes through the point $(4, 9)$.

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

Once $a$ and $b$ are found, check mathematically whether the function is also continuous at $x=3$.

Solve
Practice★★★
Express the function $f(x) = |x + 3| - |2x - 4|$ as a piecewise function, removing the modulus signs, and simplify the expression for each of the resulting sections.

Express the function $f(x) = |x + 3| - |2x - 4|$ as a piecewise function, removing the modulus signs, and simplify the expression for each of the resulting sections.

Solve
Practice★★★
A theatre offers a ticket price of $10$ € if up to a maximum of $50$ people attend. To encourage attendance by large groups, for each person exceeding $50$, the ticket…

A theatre offers a ticket price of $10$ € if up to a maximum of $50$ people attend. To encourage attendance by large groups, for each person exceeding $50$, the ticket price for all attendees is reduced by $0.10$ €.

Write the total revenue function of the theatre $I(x)$ in terms of the number of attendees $x$ (as a piecewise function) and determine how many people must attend for the theatre to obtain the maximum possible revenue.

Solve
Practice★★★
Look at the following graph of the function $p(x)$ and determine its complete analytical expression. From it, state its domain, its range and classify any…

Look at the following graph of the function $p(x)$ and determine its complete analytical expression. From it, state its domain, its range and classify any discontinuities it exhibits.

X Y 0 −3 3 4 p(x)
Solve
Practice★★★
A test rocket takes off vertically. During the first $10$ seconds, its height in meters is modeled by the linear function $h(t) = 5t$. At $10$ seconds, the engine shuts…

A test rocket takes off vertically. During the first $10$ seconds, its height in meters is modeled by the linear function $h(t) = 5t$. At $10$ seconds, the engine shuts off and the rocket follows a free-fall parabolic trajectory $h(t) = at^2 + bt + c$, such that the transition is continuous. Knowing that the rocket reaches its maximum height at $25$ seconds and hits the ground at $50$ seconds, find the expression of the parabola and determine the maximum height reached by the rocket.

Solve
Practice★★★
Given the piecewise function: $f(x) = \begin{cases} 2x & \text{if } 0 \le x \le 2 \\ k & \text{if } 2 < x \le 6 \end{cases}$ Calculate the value of the parameter $k$ so…

Given the piecewise function:

$f(x) = \begin{cases} 2x & \text{if } 0 \le x \le 2 \\ k & \text{if } 2 < x \le 6 \end{cases}$

Calculate the value of the parameter $k$ so that the total area of the geometric figure enclosed between the graph of the function and the x-axis ($X$-axis) is exactly $24$ square units.

Solve
Practice★★★
A water tank with a capacity of $6000$ litres is initially empty. A pump is switched on that pumps water at a constant rate of $50$ litres per minute. After $60$…

A water tank with a capacity of $6000$ litres is initially empty. A pump is switched on that pumps water at a constant rate of $50$ litres per minute. After $60$ minutes, a second auxiliary pump is switched on, adding an additional flow rate of $30$ litres per minute. Write the piecewise function $V(t)$ representing the volume of water in the tank in terms of time, and calculate how long in total it will take to fill the tank completely.

Solve
Practice★★★
Find analytically the points of intersection between the piecewise function $f(x) = \begin{cases} x^2 - 4 & \text{if } x < 0 \\ -2x + 4 & \text{if } x \ge 0 \end{cases}$…

Find analytically the points of intersection between the piecewise function $f(x) = \begin{cases} x^2 - 4 & \text{if } x < 0 \\ -2x + 4 & \text{if } x \ge 0 \end{cases}$ and the line $y = x + 2$.

Solve
Practice★★★
To solve the equation $|x - 1| + |x - 3| = 4$, two students propose different approaches: Method A (Analytical using a piecewise function): Define…

To solve the equation $|x - 1| + |x - 3| = 4$, two students propose different approaches:

  • Method A (Analytical using a piecewise function): Define $f(x) = |x - 1| + |x - 3|$ piecewise. To do this, study the sign of $x - 1$ and $x - 3$ by dividing the real number line into three intervals ($x < 1$, $1 \le x \le 3$, and $x > 3$), remove the bars accordingly, and solve a linear equation in each interval, checking whether each solution found belongs to its interval.

  • Method B (Geometric using distances): Interpret $|x - a|$ as the distance on the real number line between the value $x$ and the fixed point $a$. Thus, $|x - 1| + |x - 3|$ represents the sum of the distances from a point $x$ to $1$ and to $3$.

  1. a) Apply Method A: write $f(x)$ broken down into three simplified intervals and solve the equation, checking the validity of the solutions in each interval.
  2. b) Apply Method B: reason on the number line what the minimum possible distance between $x$ and the points $1$ and $3$ is (and in which interval of $x$ it is achieved). From this geometric analysis, deduce the solutions to $|x - 1| + |x - 3| = 4$ without resorting to piecewise algebra.
  3. c) Compare both methods and justify which one you would choose if the equation were $|2x - 1| + 3|x - 3| = 8$, and which one you would choose if you were asked to quickly justify why the equation $|x - 1| + |x - 3| = 1.5$ has no real solutions.
Solve
Practice★★★
The Oireachtas passes a reform of the personal income tax bracket for employment income $x$ (expressed in thousands of euros per year). The total tax $T(x)$ (also in…

The Oireachtas passes a reform of the personal income tax bracket for employment income $x$ (expressed in thousands of euros per year). The total tax $T(x)$ (also in thousands of euros) is modelled by a piecewise function:

$$T(x) = \begin{cases} 0.18x & \text{if } 0 \le x \le 20 \\ a\times x + b & \text{if } x > 20 \end{cases}$$

To ensure progressivity and avoid a "tax cliff" (where a taxpayer ends up with less net income after earning a slightly higher gross salary), the law imposes two requirements:

  1. The function $T(x)$ must be continuous on its entire domain, in particular at $x = 20$.

  2. From $20$ thousand euros onwards, the marginal tax rate is $28\,\%$ (that is, for each additional thousand euros over $20$, the tax increases by $0.28$ thousand euros, which determines the value of the slope $a$).

  1. a) Determine with reasons the values of $a$ and $b$ so that both legal requirements are met.
  2. b) Define the remaining net salary function piecewise, $S(x) = x - T(x)$, and calculate the net salary of a person earning $20\,000$ € per year ($x = 20$) and that of another person earning $20\,500$ € per year ($x = 20.5$). Check whether the person with the higher gross salary indeed retains a higher net salary.
  3. c) A TD (member of Dáil Éireann) proposed an alternative formula without an adjustment parameter: $T_{\text{alt}}(x) = 0.18x$ if $0 \le x \le 20$, and $T_{\text{alt}}(x) = 0.28x$ if $x > 20$ (applying the full $28\,\%$ to the entire salary as soon as it exceeds $20$ thousand euros). Calculate the jump $\lim_{x \to 20^+} T_{\text{alt}}(x) - \lim_{x \to 20^-} T_{\text{alt}}(x)$ and explain what economically absurd situation a worker would face if they received a pay raise from $20\,000$ € to $20\,100$ €.
Solve