Piecewise Functions

Piecewise Functions

How to graph piecewise functions: examples and their solutions.

Example 1

Graph the given function. y = 2x + 1 (x < 0), x - 1 (x >= 0)

[Blue] x < 0:
Draw y = 2x + 1.
Draw an empty circle at x = 0.

Slope-intercept form

[Green] x ≥ 0:
Draw y = x - 1.
Draw a full circle at x = 0.

Example 2

Graph the given function. y = x^2 (x < 1), x (x >= 1)

[Blue] x < 1:
Draw y = x2.
Draw an empty circle at x = 1.

Quadratic function: vertex form

[Green] x ≥ 1:
Draw y = x.
Draw a full circle at x = 1.

Both graphs have the same y value at x = 1.
(12 = 1)

So it's okay to draw the graphs
without the circles at x = 1.

Example 3

Graph the given function. y = (x + 1)(x - 3) / (x - 3)  (x not= 3), -2 (x = 3)

Simplifying rational expressions

[Blue] x ≠ 3:
Draw y = x + 1.
Draw an empty circle at x = 3.

Excluded value (extraneous solution)

[Green] x = 3:
y = -2
Draw a full circle at (3, -2).