krit.club logo

Functions - Piecewise functions

Grade 11IB_AI

Review the key concepts, formulae, and examples before starting your quiz.

🔑Concepts

•

A piecewise function is a function defined by multiple sub-functions, each applying to a specific interval of the main function's domain. The general form is f(x)={f1(x)x∈D1f2(x)x∈D2f(x) = \begin{cases} f_1(x) & x \in D_1 \\ f_2(x) & x \in D_2 \end{cases}.

•

The domain of the entire piecewise function is the union of all the individual sub-domains. It is critical to check whether endpoints are included (using ≤\leq or ≥\geq) or excluded (using << or >>).

A piecewise function graph showing a linear segment for x less than or equal to 1 and a constant segment for x greater than 1.
•

A piecewise function is continuous at a boundary point x=ax = a if the values of the functions from the left and right approach the same value, and that value equals the function's value at aa. Visually, the graph has no 'jumps' or 'holes'.

•

Real-world applications often involve step functions (like postage costs) or graduated rates (like income tax or utility billing), where the rate of change shifts at specific thresholds.

📐Formulae

f(x)={f1(x),x∈Domain1f2(x),x∈Domain2f(x) = \begin{cases} f_1(x), & x \in \text{Domain}_1 \\ f_2(x), & x \in \text{Domain}_2 \end{cases}

Domain=D1∪D2∪...∪Dn\text{Domain} = D_1 \cup D_2 \cup ... \cup D_n

Linear Piece: f(x)=mx+c\text{Linear Piece: } f(x) = mx + c

Condition for continuity at x=a:lim⁡x→a−f(x)=lim⁡x→a+f(x)=f(a)\text{Condition for continuity at } x = a: \lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = f(a)

💡Examples

Problem 1:

Given the function f(x)={2x+3x<2x2−1x≥2f(x) = \begin{cases} 2x + 3 & x < 2 \\ x^2 - 1 & x \geq 2 \end{cases}, evaluate f(0)f(0) and f(2)f(2).

Solution:

  1. To find f(0)f(0), observe that 0<20 < 2. Thus, we use the first rule: f(0)=2(0)+3=3f(0) = 2(0) + 3 = 3
  2. To find f(2)f(2), observe that 2≥22 \geq 2. Thus, we use the second rule: f(2)=(2)2−1=4−1=3f(2) = (2)^2 - 1 = 4 - 1 = 3

Explanation:

We identify which domain interval the input falls into and substitute the value into the corresponding expression.

Problem 2:

A car rental company charges a flat fee of Rs 40 for the first 100 km100 \text{ km} driven. For every kilometer driven beyond 100 km100 \text{ km}, they charge an additional Rs 0.50 per kilometer. Write a piecewise function C(d)C(d) for the total cost where dd is the distance in kilometers.

Solution:

For 0≤d≤1000 \leq d \leq 100, the cost is constant: C(d)=40C(d) = 40. For d>100d > 100, the cost is the initial Rs 40 plus Rs 0.50 for the distance exceeding 100 km100 \text{ km}, which is (d−100)(d - 100). C(d)={400≤d≤10040+0.5(d−100)d>100C(d) = \begin{cases} 40 & 0 \leq d \leq 100 \\ 40 + 0.5(d - 100) & d > 100 \end{cases}

Explanation:

This is a common modeling problem where the rate changes after a threshold. The second part of the function calculates the 'extra' distance by subtracting the threshold from the total distance.

Problem 3:

Find the value of kk that makes the function g(x)g(x) continuous at x=3x = 3: g(x)={kx+1x≤3x2−2x>3g(x) = \begin{cases} kx + 1 & x \leq 3 \\ x^2 - 2 & x > 3 \end{cases}

Solution:

For the function to be continuous at x=3x = 3, the two pieces must meet at the same yy-value. Set the expressions equal to each other at x=3x = 3: k(3)+1=(3)2−2k(3) + 1 = (3)^2 - 2 3k+1=9−23k + 1 = 9 - 2 3k+1=73k + 1 = 7 3k=63k = 6 k=2k = 2

Explanation:

Continuity ensures there is no 'jump' in the graph. We substitute the boundary value into both expressions and solve for the unknown parameter.

Problem 4:

A mobile data plan costs 1010 USD for the first 22 GB of data. For every GB exceeding 22 GB, the cost is 55 USD per GB. Express the total cost CC as a function of data used xx (in GB) and find the cost for using 4.54.5 GB.

Graph of cost function showing a horizontal line at y=10 for x between 0 and 2, then a line with positive slope for x greater than 2.

Solution:

The function is defined in two parts:

  1. For 0≤x≤20 \leq x \leq 2, the cost is constant: C(x)=10C(x) = 10.
  2. For x>2x > 2, the cost is the base 1010 plus 55 for every unit over 22: C(x)=10+5(x−2)=5xC(x) = 10 + 5(x - 2) = 5x.

So, C(x)={100≤x≤25xx>2C(x) = \begin{cases} 10 & 0 \leq x \leq 2 \\ 5x & x > 2 \end{cases}.

For x=4.5x = 4.5: C(4.5)=5(4.5)=22.5C(4.5) = 5(4.5) = 22.5 USD.

Explanation:

Identify the threshold (22 GB). Below this, the rate is zero (constant cost). Above this, the rate is 55 per unit. We use the second part of the function because 4.5>24.5 > 2.

Problem 5:

Determine the value of aa such that f(x)f(x) is continuous at x=2x = 2: f(x)={x2+ax≤23x−1x>2f(x) = \begin{cases} x^2 + a & x \leq 2 \\ 3x - 1 & x > 2 \end{cases}

Graph of a continuous piecewise function showing a parabola segment meeting a linear segment at the point (2,5).

Solution:

For continuity at x=2x = 2, the limit from the left must equal the limit from the right:

Left side: f(2)=22+a=4+af(2) = 2^2 + a = 4 + a Right side: lim⁡x→2+(3x−1)=3(2)−1=5\lim_{x \to 2^+} (3x - 1) = 3(2) - 1 = 5

Set them equal: 4+a=54 + a = 5 a=1a = 1

Explanation:

We equate the expressions for the two pieces at the boundary x=2x=2 to ensure they meet at the same y-coordinate, eliminating any jump.