Piecewise functions are handy for writing real-world models with different rules on different intervals: tiered tariffs, deformation of a material before and after the elastic limit, the cost of a utility with a free allowance. Solving an equation f(x)=kf(x)=k or an inequality f(x)kf(x)\lessgtr k is done piece by piece, checking at the end the compatibility with the interval of each piece.

Example — Tiered tariff

A telephone company charges: 0,100{,}10 €/min for the first 100100 minutes of the month, 0,050{,}05 €/min beyond that. Total cost as a function of the minutes mm: C(m)={0,10m0m100,10+0,05(m100)m>100.C(m)=\begin{cases} 0{,}10\,m & 0\le m\le 100, \\ 10 + 0{,}05(m-100) & m>100.\end{cases} For how many minutes does one pay C=15C=15 euros? On 0m1000\le m\le 100: 0,10m=15    m=1500{,}10\,m=15 \iff m=150, outside the interval. On m>100m>100: 10+0,05(m100)=15    m100=100    m=20010+0{,}05(m-100)=15 \iff m-100=100 \iff m=200. Solution: m=200\boxed{m=200} minutes.

Topics: Functions and properties
Concepts: Piecewise function
Skills: Modelling · Solving equations
Exercise types: Modelling problem