Piecewise-defined Functions (College Board AP® Precalculus): Revision Note

Roger B

Written by: Roger B

Reviewed by: Mark Curtis

Updated on

Piecewise-defined functions

What is a piecewise-defined function?

  • A piecewise-defined function consists of

    • a set of functions

      • each defined over its own nonoverlapping domain interval

    • On a graph this means the different pieces will not overlap as you move from left to right

  • Different "pieces" of the function apply to different intervals of the input values

  • Each piece may be a different type of function

    • e.g. one piece could be linear and another quadratic

  • A piecewise-defined function is still a single function

    • for each input value, exactly one of the pieces applies

      • giving exactly one output value

How is a piecewise-defined function written?

  • A piecewise-defined function can be written using bracket notation

    • This lists each piece alongside the domain interval over which it applies

  • E.g. a function that is linear for x < 2 and quadratic for x \geq 2

space f open parentheses x close parentheses equals open curly brackets table row cell 3 x plus 1 comma space space space x less than 2 end cell row cell x squared comma space space space space space space space space space space x greater or equal than 2 end cell end table close

  • To evaluate a piecewise function at a given input

    • first determine which interval the input falls in

    • then use the corresponding piece

  • E.g., for the function space f given above

    • space f left parenthesis 0 right parenthesis equals 3 left parenthesis 0 right parenthesis plus 1 equals 1

      • because 0 < 2, use the first piece

    • space f left parenthesis 3 right parenthesis equals 3 squared equals 9

      • because 3 \geq 2, use the second piece

    • space f left parenthesis 2 right parenthesis equals 2 squared equals 4

      • because 2 \geq 2, use the second piece

Why are piecewise-defined functions useful for modeling?

  • Many real-world scenarios demonstrate different characteristics over different intervals

    • A single function type (e.g. linear or quadratic) may not capture the behavior across the entire domain

    • A piecewise-defined function allows you to use the most appropriate function type for each interval

  • E.g. a delivery company might charge a flat rate for packages up to a certain weight, then a per-pound rate above that weight

    • the cost function would be constant on one interval

    • and linear on another

  • Or a population might grow at a roughly constant rate during one period, then slow down and level off during another

    • the model might start with a linear piece

    • followed by a different function type

Do the pieces always connect?

  • The pieces of a piecewise-defined function do not have to connect smoothly at the boundaries between intervals

    • The function may have a jump at the boundary

      • where the output value changes abruptly from one piece to the next

    • Or the pieces may connect at the boundary

      • meaning the output value is the same from both sides

  • In a modeling context, whether the pieces connect or not depends on the scenario

    • E.g. if a container is being filled with water at one rate and then the rate changes

      • The water level can't jump instantaneously, so the pieces connect

    • Or e.g. a company may have a pricing structure that jumps at a threshold

      • Here the pieces don't connect

Worked Example

A parking garage charges a flat rate of $5 for the first hour (or any part of the first hour). After the first hour, an additional charge of $3 per hour applies for each subsequent hour (or part thereof). Let C left parenthesis t right parenthesis represent the total cost, in dollars, of parking for t hours, where t greater than 0.

(a) Explain why a piecewise-defined function is an appropriate model for C(t).

Answer:

A piecewise-defined function is appropriate because the cost demonstrates different characteristics over different intervals of the domain. For the first hour the cost doesn't change, but after that it increases based on time.

(b) What type of function should be used for each piece? Give a reason for each.

Answer:

For the first piece (0 < t \leq 1), the price doesn't change so a constant function is appropriate

For the second piece (t > 1), the cost increases at a constant rate of $3 per hour, so a linear function is appropriate

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Roger B

Author: Roger B

Expertise: Maths Content Creator

Roger's teaching experience stretches all the way back to 1992, and in that time he has taught students at all levels between Year 7 and university undergraduate. Having conducted and published postgraduate research into the mathematical theory behind quantum computing, he is more than confident in dealing with mathematics at any level the exam boards might throw at you.

Mark Curtis

Reviewer: Mark Curtis

Expertise: Maths Content Creator

Mark graduated twice from the University of Oxford: once in 2009 with a First in Mathematics, then again in 2013 with a PhD (DPhil) in Mathematics. He has had nine successful years as a secondary school teacher, specialising in A-Level Further Maths and running extension classes for Oxbridge Maths applicants. Alongside his teaching, he has written five internal textbooks, introduced new spiralling school curriculums and trained other Maths teachers through outreach programmes.