Resources For Teachers For Tutors For Students & Parents Pricing
Year 11 Methods (Unit 1 & 2) Functions, Relations And Transformations

Piecewise-Devined Functions

20 practice questions 1 video lesson Theory + worked examples

Understand piecewise-defined functions for Queensland Year 11 Mathematical Methods (QCAA). A piecewise function joins several sub-functions into one, each defined on its own restricted domain, so the branch you use depends on the input.

You will learn to choose and evaluate the correct branch at a boundary, handle open and closed endpoints, state the domain and range, and judge whether the pieces join smoothly — continuity at a join.

Practice 20 questions
Practice questions

Every question with a fully worked solution.

Start practising
Watch 1 video(s)
  • Piecewise-Devined Functions - Video - Piecewise functions Watch
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

In Year 11 Mathematical Methods (QCAA, Unit 1) a piecewise-defined function is built from several sub-functions, each on its own restricted domain. This page shows how to evaluate a piecewise function by choosing the correct branch (including exactly at a boundary), how open and closed endpoints work, how to state the domain and range, and how to test continuity at a join.

A piecewise-defined function (or hybrid function) applies a different rule on each part of its domain. Each rule holds only on its restricted domain, and together those pieces must not overlap.

To evaluate \(f(a)\), first decide which restricted domain contains \(a\), then use that branch. At a boundary the inequality decides: \(\le\) or \(\ge\) (inclusive) means the branch owns that point (a closed dot), while \(<\) or \(>\) (strict) means it does not (an open dot).

The function is continuous at a join if the two branches meet there — the value from the left equals the value from the right, with no jump. Choosing a parameter for continuity means setting those two values equal.

The boundary belongs to exactly one branch. Read the inequalities: the branch with \(\le\) or \(\ge\) at the boundary is the one to use, and it carries the closed dot.
Open and closed endpoints at a joinA branch ending in a closed dot at the point 1 comma 2 and another beginning at an open dot at 1 comma 4. x y
At the join, a closed dot includes the point and an open dot excludes it; here the branches do not meet, so there is a jump.
A continuous joinTwo straight branches meeting at the point 2 comma 0 with no gap, so the function is continuous. x y
When the two branches meet at the join with no gap, the piecewise function is continuous there.

A two-branch piecewise function is written with a brace:

\[f(x)=\begin{cases}g(x), & x\le a\\[2pt] h(x), & x>a\end{cases}\]
f(x)={g,h}

Continuity at the join \(x=a\) requires the two rules to agree there:

\[g(a)=h(a)\]
g(a)=h(a)
Inclusive vs strict: \(x\le a\) puts the boundary in that branch (closed dot); \(x>a\) leaves it out (open dot). Exactly one branch may own the boundary.

How to evaluate and analyse a piecewise function

  1. Locate: to find \(f(a)\), decide which restricted domain contains \(a\) by checking each inequality, watching the boundary carefully.
  2. Substitute: put \(a\) into that branch's rule only.
  3. Analyse: for domain, union the restricted domains; for range, find each branch's outputs (with open/closed ends); for continuity, test whether the branches agree at each join.
Example 1 — Evaluate across the branches
For \(f(x)=\begin{cases}2x+1, & x<1\\ 5-x, & x\ge1\end{cases}\) find \(f(-2)\), \(f(1)\) and \(f(3)\).
Solution

\(f(-2)\) — here \(-2<1\), so use \(2x+1\):

\(f(-2)\)\(=\)\(2(-2)+1\)
\(=\)\(-3\)

\(f(1)\) — the boundary: \(1\ge1\) is inclusive, so use \(5-x\):

\(f(1)\)\(=\)\(5-(1)\)
\(=\)\(4\)

\(f(3)\) — here \(3\ge1\), so use \(5-x\):

\(f(3)\)\(=\)\(5-(3)\)
\(=\)\(2\)

\(f(-2)=-3\), \(f(1)=4\), \(f(3)=2\).

Piecewise function with a jump at x equals 1Line 2x plus 1 up to an open dot at 1 comma 3, then line 5 minus x from a closed dot at 1 comma 4. x y
f(1)=4
Example 2 — Continuity at a join
Is \(g(x)=\begin{cases}x^2, & x\le2\\ x+3, & x>2\end{cases}\) continuous at \(x=2\)?
Solution

Value from the left branch at \(x=2\) (inclusive):

\(g(2)\)\(=\)\((2)^2\)
\(=\)\(4\)

Value the right branch approaches as \(x\to2\):

\(x+3\)\(\to\)\((2)+3\)
\(=\)\(5\)

The left gives \(4\) but the right approaches \(5\), so the graph jumps.

Not continuous at \(x=2\) — there is a jump from \(4\) to \(5\).

Deciding continuity at x equals 2Parabola ending in a closed dot at 2 comma 4 and a line starting at an open dot at 2 comma 5, a jump. x y
45
Example 3 — Domain and range
State the domain and range of \(h(x)=\begin{cases}x+4, & -4\le x\le0\\ 4-x, & 0<x\le3\end{cases}\).
Solution

Domain — join the two restricted domains:

\(\text{dom}\)\(=\)\([-4,0]\cup(0,3]\)
\(=\)\([-4,\,3]\)

Branch outputs — \(x+4\) on \([-4,0]\) rises from \(0\) to \(4\):

\(h(-4)\)\(=\)\(-4+4=0\)
\(h(0)\)\(=\)\(0+4=4\)

\(4-x\) on \((0,3]\) falls from \(4\) to \(1\):

\(h(3)\)\(=\)\(4-3=1\)

Combine the outputs:

\(\text{ran}\)\(=\)\([0,\,4]\)

Domain \([-4,3]\); range \([0,4]\).

Domain and range of a piecewise functionA tent shape from a closed dot at minus 4 comma 0 up to 0 comma 4 then down to 3 comma 1. x y
[-4,3]
Example 4 — Parameter for continuity
Find \(k\) so that \(f(x)=\begin{cases}2x+k, & x<3\\ x^2-4, & x\ge3\end{cases}\) is continuous at \(x=3\).
Solution

Set the two branches equal at the join \(x=3\):

\(2(3)+k\)\(=\)\((3)^2-4\)

Solve for \(k\):

\(6+k\)\(=\)\(9-4\)
\(6+k\)\(=\)\(5\)
\(k\)\(=\)\(-1\)

\(k=-1\) makes \(f\) continuous at \(x=3\).

Choosing a parameter for continuityWith k equal to minus 1 the line and the parabola meet at the point 3 comma 5 with no gap. x y
k=-1

Common pitfalls

Using the wrong branch at a boundary. Read the inequality: \(x\ge1\) means \(x=1\) uses that branch, \(x<1\) means it does not. Substituting into both is wrong.
Mixing up open and closed dots. A closed (filled) dot matches \(\le\) or \(\ge\); an open (hollow) dot matches \(<\) or \(>\).
Assuming a piecewise function is always continuous. The branches may not meet. Always compare the two values at the join before deciding.
Double-counting the boundary in the domain. The restricted domains must not overlap, so exactly one branch may include each boundary point.

Frequently asked questions

What is a piecewise-defined function?

A function built from several sub-functions, each applying on its own restricted part of the domain, joined together with a brace.

How do you evaluate a piecewise function at a point?

Decide which restricted domain contains the input by checking the inequalities, then substitute the input into that branch's rule only.

Which branch do you use exactly at the boundary?

The one whose inequality is inclusive there: \(x\le a\) or \(x\ge a\) owns the boundary (closed dot), while \(x<a\) or \(x>a\) does not (open dot).

What do open and closed dots mean at a join?

A closed (filled) dot means that branch includes the boundary point; an open (hollow) dot means it excludes it. Exactly one branch owns each boundary.

How do you check if a piecewise function is continuous at a join?

Find the value each branch gives at the join. If they are equal the graph meets with no jump and it is continuous there; if not, it is discontinuous.

How do you find a value that makes a piecewise function continuous?

Set the two branch rules equal at the join and solve for the unknown, for example \(2(3)+k=(3)^2-4\) gives \(k=-1\).