Find tutor 🔎

How much tutoring
does your child need?

A piecewise function, you might have guessed it right, is one that’s cut into pieces! No, we don’t use a knife to make those ‘pieces’ 😉 Let’s dig in.

Learning Outcomes

By the time you finish reading this page, you should have a clear idea of the following portions of your year 11 maths curriculum:

  • Understand what a piecewise function is
  • Evaluate a piecewise function for a given value of the input
  • Graph a piecewise function given its equations
  • Understand how piecewise functions are applied in real-world contexts

What’s a Piecewise Function?

Do you remember the absolute value function? By definition, the absolute value of a number is its distance from zero on the number line. In other words, the absolute value of a number is its numerical part (disregarding the sign). As distance is never negative, the absolute value of a number can never be negative.

 

But how we define the absolute value function algebraically is of more interest right now.


\(f(x)=\begin{cases}
x & \text{ if } x\geq 0 \\
-x & \text{ if } x< 0
\end{cases}
\)

 

If you think of a function as a rule that determines how an input (x) is related to the output (y), the rules above state that if the input is non-negative, the output is the input. If the input is negative, the output is negative of the input. As the negative of a negative is positive, the output is positive either way.

 

Notice how the function rule is different for different values of x? We divided the domain into pieces. Recall that the domain of a function is the set of values that the input x can have. So, the pieces here are:

  • The input is less than zero.
  • The input is greater than or equal to zero.

Evaluating a Piecewise Function

As per the year 11 mathematics syllabus, you should know how to find the output of a piecewise-defined function. The first step is to figure out which part of the domain (or which piece) the given input belongs to. Once you find that out, use the equation specific to that part to find the output. Shall we see an example?

 

Find f(2) given:

\(f(x)=\begin{cases}
2x & \text{ if } x<0 \\
x+1 & \text{ if } 0\leq x<2 \\
x-1 & \text{ if } x\geq 2
\end{cases}
\)

 

The question is, which of the equations do we use here? Should we plug x = 2 into 2x, x+1, or x-1?

 

The idea is this: in the region on the graph where x < 0, we use the equation f(x) = 2x; in the region where 0 ≤ x < 2, we use the equation f(x) = x+1; and in the region where x ≥ 2, we use the equation f(x) = x-1.

 

Here’s what that graph would look like:


Notice the solid and hollow circles? Any idea what purpose they serve? Hint: it’s similar to graphing an inequality on the number line.

 

Contact us today for personalised help preparing for your Year 11 Piecewise Functions!

 

A Real-World Example

Before we wrap up, let’s look at a real-life example where the concept of piecewise functions can be used. Consider the following problem:


Problem:

An internet service provider charges its customers C dollars for g gigabytes of data usage based on the following function:

\(C(g)=\begin{cases}
24 & \text{ if } g\leq 2 \\
10g+4 & \text{ if } g>2
\end{cases}
\)

a) Draw a graph of the function.

b) How much does Allan pay if he uses 1.8 GB of data?


Solution:

a) The given function is piecewise, as different rates apply to different slabs of data usage. We can draw it as follows:


Notice how the graph is a flat line from g = 0 to g = 2? This is because the cost is fixed at $24 in that region (gigabytes of usage). Beyond g = 2, the graph follows the equation C = 10g+4.

 

b) As 1.8 GB falls in the slab g ≤ 2, we use the first equation or C(g) = 24. Therefore, Allan pays $24.

 

Wrap Up

By now, you must have a fair idea of what piecewise functions are and how they are used in real life. Are you confident you can evaluate a piecewise function given the equations? Can you now graph a piecewise function given its equations? When graphing, don’t forget about drawing the solid and hollow circles.

 

If you need more help with piecewise functions, remember that we are just a click away!