Piecewise Function

Accueil » Piecewise Function
Piecewise Function: meaning, method and solved example (Algebra 1) – Maths PDF


In short: Piecewise function describes a function built from two or more separate rules, each one applying only on its own interval of x-values.

Algebra 1Functions and GraphsF-IF.C.7b

What is Piecewise Function?

A parking garage might charge a flat fee for the first two hours and a rate per hour after that, so one price formula cannot cover both, and a piecewise function glues the pieces together, naming the rule for each stretch of input values.

Each piece has its own condition, such as “for x less than 2” or “for x at least 2”. On the graph, a piece that excludes its endpoint gets an open circle and one that includes it gets a closed circle. At the boundary the graph may jump.

How to spot it

  • A story changes its rule at a cutoff: a flat fee then a rate, a tax bracket, a shipping tier.
  • A piecewise function is written with two or more lines of rules, each followed by a condition on x.
  • A graph consists of separate segments, often with open and closed dots at the break.
  • A question asks for an output and you must first choose which rule matches the input.

The method

  1. Read the conditions and find the interval that contains your input.
  2. Use only the rule that belongs to that interval and substitute the input.
  3. At a boundary value, check which piece includes it (at least or at most) before choosing.
  4. To graph, draw each rule on its own interval, using an open circle for excluded ends and a closed circle for included ends.
open at (2, 3)closed at (2, 4)x + 1 when x is below 26 − x when x is 2 or more
Two rules meet at x = 2, and the graph jumps from the open circle at height 3 to the closed circle at height 4.

Piecewise Function: solved example

Problem

A garage charges $5 for any stay up to 2 hours. After 2 hours it adds $3 per extra hour. Write the rule and find the cost for 1.5 hours, 4 hours and 6 hours.

Solution

For \(0 < h \le 2\) the cost is \(C(h) = 5\). For \(h > 2\) the cost is \(C(h) = 5 + 3(h – 2)\).

At 1.5 hours the first rule applies: $5. At 4 hours: \(5 + 3(2) = 11\). At 6 hours: \(5 + 3(4) = 17\). The costs are $5, $11 and $17.

Try it

Question 1

Let \(f(x) = x + 1\) when x is below 2, and \(f(x) = 6 – x\) when x is 2 or more. Find \(f(2)\), \(f(-3)\) and \(f(5)\).

Show the answer

\(f(2) = 6 – 2 = 4\), \(f(-3) = -3 + 1 = -2\), and \(f(5) = 6 – 5 = 1\).

Question 2

Write \(|x|\) as two separate rules.

Show the answer

It equals x when x is 0 or more, and equals \(-x\) when x is below 0.

Piecewise Function vs. Absolute Value Function

The V-shaped rule is one particular case that can be split into two pieces. This family is much wider: any collection of rules on different intervals, including flat steps, lines, curves and even jumps. Think of the first as a single recipe and the second as a recipe book.

Absolute Value Function

Keep going

Lessons

Worksheets and quizzes

Related words

Whole dictionary: A–Z · Algebra 1 · Functions and Graphs

Voter.. page