Lesson 5 of 8 · 16 min

Modelling with piece-wise functions

Build piece-wise models for charges, tariffs and comparisons, then use them to answer questions in context, with and without technology.

What you will be able to do

  • Write a piece-wise rule from a description of a real situation, with a domain for each piece.
  • Use the model to calculate an output, and to find the input that gives a required output.
  • Check that answers lie in the right piece and make sense in context.
  • Compare a piece-wise model with another model, with and without technology.

Many real charges change at a threshold. Water and electricity are often billed in blocks — one price per unit up to a limit, a higher price beyond it. Parking, postage, phone data and income tax work the same way. Each block is a piece with its own rule, so the whole charge is a piece-wise function.

Building a piece-wise model

  1. Define the variables

    Name the input and output, with units: "Let CC be the charge in dollars for ww kL of water."

  2. Find the thresholds

    The values where the rule changes become the boundaries of the pieces' domains.

  3. Write the rule for each piece

    For a charge, a later piece is usually "the charge at the threshold, plus the new rate times the amount above the threshold".

  4. Check the boundaries

    Make sure every input belongs to exactly one piece, and check whether the pieces should join at each threshold.

  5. Answer in context

    Check each answer lies in the domain of the piece you used, then finish with a sentence, with units.

Worked example

Model a two-block water charge

  • Complex familiar

A council charges households for water each quarter. There is a fixed access charge of $60, plus $2.50 per kilolitre (kL) for the first 50 kL used and $4 per kL for any water used beyond 50 kL.

(a) Write a piece-wise rule for the quarterly charge CC dollars when ww kL of water is used. (b) Calculate the charge for 80 kL. (c) One household's charge is $365. How much water did it use?

7 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Define variables with units and find the thresholds.

  2. Later piece = value at the threshold + new rate × amount above the threshold.

  3. Compare a given output with the threshold values to choose the piece.

  4. Check the answer lies in that piece's domain, then answer in context.

Watch out for

  • Charging the higher rate on all the water: 60+4(80)=38060 + 4(80) = 380 instead of 305305.

  • Solving with the first piece: 60+2.5w=36560 + 2.5w = 365 gives w=122w = 122, which is not in 0≤w≤500 \le w \le 50.

The water charge model. The graph gets steeper at w=50w = 50, where the price per kilolitre rises from $2.50 to $4. Reading across from $365 meets the steeper piece at w=95w = 95.

Using the water charge model C(w)={60+2.5w,0≤w≤504w−15,w>50C(w) = \begin{cases} 60 + 2.5w, & 0 \le w \le 50 \\ 4w - 15, & w > 50 \end{cases}, calculate the charge, in dollars, for a household that uses 30 kL.

With the same water charge model, another household's charge is $245. How much water did it use?

in kL

Tip

Is the answer in the right piece?

An answer is only valid if it lies in the domain of the piece that produced it. If you don't know which piece to use, find the output at each threshold first, or try each piece and keep only the solutions that land in their own domain.

Without technology

Work out the output at each threshold, use it to decide which piece applies, then solve a linear equation. For linear pieces this is quick and exact.

With technology

Enter each piece with its domain restriction (most graphics calculators let you add a condition such as [0,50][0, 50] after a rule, or offer a piece-wise template). Graph the model with the horizontal line y=245y = 245 and use the intersect tool. This is useful for checking, and for pieces that are not linear.

The gradient of each piece is a rate: $2.50 per kL, then $4 per kL. This makes piece-wise models good for comparing plans. Where the graphs of two plans cross, they cost the same; between crossings, the lower graph is the cheaper plan. Because one plan has two pieces, you may need to compare the plans piece by piece.

Worked example

When is the flat-rate rideshare cheaper?

  • Complex unfamiliar

Two rideshare companies price trips differently.

  • Company A: a $3.60 booking fee, then $2.20 per km for the first 10 km and $1.50 per km for each km beyond that.
  • Company B: a $5 booking fee, then $2 per km.

For what lengths of trip is Company B cheaper?

6 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Write each pricing scheme as a function of distance, piece by piece.

  2. Compare the models separately on each piece's domain.

  3. Keep only the solutions that lie in each piece's domain, then combine them.

  4. Check one distance in each region, and answer in context.

Watch out for

  • Using $1.50 per km for the whole trip once it passes 10 km, instead of only for the kilometres beyond 10.

  • Comparing only the first pieces and concluding that B is cheaper for every trip over 7 km.

A plumber charges a $90 call-out fee, which covers the first 30 minutes, and then $2 per minute after that. Which rule gives the charge CC dollars for a job lasting tt minutes?

Choose one answer

Exam tip

Communicating a model

Define your variables with units, give the domain of every piece, and show which piece you used and why ("since 245>C(50)=185245 > C(50) = 185, use the second piece"). Finish with a sentence that answers the question in context. In Paper 2, a graph from your calculator is a good check, but write down the equation you solved.

Summary

  • Thresholds in a real situation become the boundaries of the pieces.

  • A later piece of a charge is often "charge at the threshold + rate × amount above the threshold".

  • To find an input from an output, compare the output with the values at the thresholds to pick the right piece.

  • Every answer must lie in the domain of the piece that produced it, and should be stated in context with units.

  • Where the graphs of two models cross, they give the same output; between crossings, the lower graph is cheaper.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 5 of 80% read

Save your progress with a free account