topic badge

2.025 Piecewise functions

Lesson

Piecewise functions

Finally, functions don't need to be defined by just one equation. A piecewise function specifies different function rules based on certain intervals of $x$x values. These functions may have gaps on their graphs - we call these discontinuous functions - but as long as there is only one $f(x)$f(x) value for any given $x$x value, it is still a function! The image below shows a piecewise function that we can write as:

 

$f(x)$f(x) $=$= $x^2$x2 if $x\ge-1$x1
$x+2$x+2 if $x<-1$x<1

 

 

We could use either the graph or the equations to evaluate function values, but let's practice using the equations by choosing an $x$x value that isn't shown in the sketch.

For example, let's find $f(5)$f(5). This requires an $x$x value greater than $-1$1, so we choose the top equation in the piecewise set. So, $f(5)=x^2=25$f(5)=x2=25

 

Practice Questions

Question 1

Consider the function graphed below.

Loading Graph...

  1. What is the value of the function at $x=-1$x=1?

  2. Is the graph continuous or discontinuous at $x=-1$x=1?

    Continuous

    A

    Discontinuous

    B
  3. What is the value of the function at $x=0$x=0?

  4. Is the graph continuous or discontinuous at $x=0$x=0?

    Continuous

    A

    Discontinuous

    B
  5. What is the value of the function at $x=2$x=2?

  6. Is the graph continuous or discontinuous at $x=2$x=2?

    Continuous

    A

    Discontinuous

    B

Question 2

A function is defined as

$f(x)$f(x) $=$= $x^2-2$x22 if $x\ge3$x3
$4$4 if $00<x<3
$4x$4x if $x\le0$x0
  1. Evaluate $f\left(4\right)$f(4).

  2. Evaluate $f\left(0.5\right)$f(0.5).

  3. Evaluate $f\left(-3\right)$f(3).

  4. Evaluate $f\left(a\right)$f(a) if $a$a is a negative value.

Outcomes

MA11-1

uses algebraic and graphical techniques to solve, and where appropriate, compare alternative solutions to problems

What is Mathspace

About Mathspace