topic badge
AustraliaVIC
VCE 11 General 2023

3.06 Piecewise and step graphs

Lesson

Piecewise linear graphs

Sometimes more than one linear equation is needed to create a linear model for a given situation. Piecewise graphs are formed by two or more graphs. When a piecewise linear graph has no gaps or breaks, where all the lines are connected to one another, it creates a continuous piecewise function.

A domain is given for each individual graph in a piecewise function. For continuous piecewise functions, each domain gives you information on where the graphs intersect.

Exploration

Consider the following two linear graphs that form a piecewise linear graph.

Line $1$1: $y=3x+3,x\le1$y=3x+3,x1

Line $2$2: $y=-x+7,x>1$y=x+7,x>1

Line $1$1 is drawn for $x$x-values less than and including $x=1$x=1 and line $2$2 is only drawn for $x$x-values larger than $1$1. Together they intersect at $x=1$x=1 and form a piecewise linear function.

If the domain wasn't given for each graph, the point of intersection would need to be found by letting equation $1$1 equal equation $2$2 and solving for $x$x.

$3x+3$3x+3 $=$= $-x+7$x+7
$4x$4x $=$= $4$4
$x$x $=$= $1$1

Therefore, since both lines intersect when $x=1$x=1, this means line $1$1 has the domain $x\le1$x1 and line $2$2 has the domain $x>1$x>1.

Practice questions

Question 1

Consider the following piecewise relationship.

$y$y $=$= $2$2 when $x<0$x<0
$x+2$x+2 when $x>0$x>0
  1. Draw the piecewise graph.

    Loading Graph...

QUESTION 2

What is the function definition of the graph?

Loading Graph...

  1. $y$y $=$= $\frac{3}{2}x+3$32x+3 if $x\le0$x0
    $3-x$3x if $00<x$\le$$3$3
    $2x-6$2x6 if $33<x$<$<$5$5
    A
    $y$y $=$= $\frac{3}{2}x+3$32x+3 if $x\le0$x0
    $3-x$3x if $00<x$\le$$3$3
    $2x-6$2x6 if $x>3$x>3
    B
    $y$y $=$= $\frac{3}{2}x+3$32x+3 if $-5\le x$5x$\le$$0$0
    $3-x$3x if $00<x$\le$$3$3
    $2x-6$2x6 if $33<x$\le$$5$5
    C
    $y$y $=$= $\frac{3}{2}x+3$32x+3 if $-5\le x$5x$\le$$0$0
    $3-x$3x if $00<x$\le$$3$3
    $2x-6$2x6 if $x>3$x>3
    D

 

Step graphs

A step graph is formed by two or more horizontal lines. A step graph is a type of piecewise graph where the lines do not join one another, as parallel lines never intersect one another. So when moving from left to right along a horizontal line, the graph will either step up or step down to a different horizontal line.

Exploration

Consider the following step graph, defined by the equations:

$y=-1,x\le0$y=1,x0

$y=1,x>0$y=1,x>0

For negative values of $x$x, the graph follows the horizontal line $y=-1$y=1. The step occurs when $x=0$x=0. So moving from left to right along the $x$x-axis, the graphs steps up when $x=0$x=0 and then graph follows the horizontal line $y=1$y=1 for increasing, positive values of $x$x.

What is the value of $y$y when $x=0$x=0? Will it be $-1$1, $1$1, or perhaps some value in between? The answer lies in the given domains. The graph of $y=-1$y=1 has the domain $x\le0$x0, which means that $x$x is less than or equal to $0$0. So this domain includes $x=0$x=0. The graph of $y=1$y=1 has the domain $x>0$x>0, which means that $x$x is greater than $0$0. This domain does not include $x=0$x=0.

Therefore when $x=0$x=0, $y$y is equal to $-1$1 and not $1$1.

 

Practice questions

Question 3

Consider the following piecewise graph.

Loading Graph...

  1. State the equation of the line for $x>3$x>3.

    Enter an equation, with $y$y as the subject.

  2. State the equation of the line for $x\le3$x3.

    Enter an equation, with $y$y as the subject.

 

Modelling using piecewise functions and step graphs

Sometimes when attempting to create a linear model that describes a relationship between two variables, one linear model is not enough. As one (independent) variable changes, it's relationship to the other (dependent) variable may also change. When this occurs, piecewise functions and step graphs can be used, so that multiple linear models can be applied to the one real-life scenario.

Exploration

Sketch the piecewise linear function that describes the following:

Consider a runner who is running for exercise. Their exercise regime is to jog as a warm up, then start running, and then end their workout at rest. They begin jogging at a constant pace of $150$150 m/min for the first $2$2 minutes. After $2$2 minutes they start to run at $300$300 m/min. They continue at this speed for another $2$2 minutes before finally stopping and resting for the final $2$2 minutes of their workout.

Let $y$y equal the distance covered by the runner, measured in metres and let $t$t equal the amount of time that the runner has been running, measured in minutes.

The person is moving at a constant speed in all parts of their workout, so we can represent each section with a linear graph. Assuming that no distance has been covered until the timer starts, this means that $y=0$y=0 when $t=0$t=0. So the first line will have a $y$y-axis intercept of $0$0 and a slope of $150$150 metres per minute. The piecewise function follows this behaviour for $0\le t\le2$0t2.

At the $2$2 minute mark, the runner will have covered a distance of $2\times150=300$2×150=300 metres. Their speed now increases, which means the slope of the line also increases. The slope of this second line would be $300$300 metres per minute, the speed at which the runner is now running. So the second line with this slope can now be drawn between $2\le t\le4$2t4, connecting to the previous line when $t=2$t=2.

At the $4$4 minute mark, since the runner's pace has been $300$300 metres per minute, they will have covered $2\times300=600$2×300=600 metres in the $2$2 minutes that they have been running at this pace, covering a total of $300+600=900$300+600=900 metres.

For the final $2$2 minutes of the workout, so for $4\le t\le6$4t6, the runner is resting and is therefore not covering any distance during this time. So a horizontal line can be drawn from the previous line at $t=4$t=4 until $t=6$t=6.

The graph is now complete and represents the given scenario. The equations could also be defined to create the following piecewise function.

$y=150t,0\le t<2$y=150t,0t<2

$y=300t-300,2\le t<4$y=300t300,2t<4

$y=900,4\le t\le6$y=900,4t6

Practice questions

Question 4

The line graph shows the amount of petrol in a car’s tank.

  1. How much petrol was initially in the tank?

    $\editable{}$ litres.

  2. What happened at $9$9am and $1$1pm?

    The driver filled the tank.

    A

    The amount of petrol being used increased.

    B

    The car was travelling at a fast speed.

    C
  3. How much petrol was used between $1$1pm and $5$5pm?

  4. To the nearest hour, when did the petrol in the tank first fall below $18$18 litres?

    Approximately $\editable{}$$:$:$00$00

Question 5

The graph shows the cost of sending parcels of various weight overseas.

  1. Find the cost of sending a letter weighing $100$100 grams.

    $\$4$$4

    A

    $\$1.50$$1.50

    B

    $\$2$$2

    C

    $\$1$$1

    D
  2. Find the cost of sending a letter weighing $150$150 grams.

    $\$2$$2

    A

    $\$4$$4

    B

    $\$1$$1

    C

    $\$2.50$$2.50

    D
  3. What is the heaviest letter that can be sent for $\$4$$4?

    $350$350 grams

    A

    $100$100 grams

    B

    $250$250 grams

    C

    $150$150 grams

    D

Outcomes

U1.AoS4.4

situations that can be modelled by piecewise linear graphs

U1.AoS4.9

use piecewise linear graphs to model and analyse practical situations

What is Mathspace

About Mathspace