TOPIC

Graphing piecewise non-linear functions

MY PROGRESS

Pug Score

0%

Study Points

+0

Overview

Watch

Read

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Read

Not viewed


Study Points

+0

Read

Graphing Piecewise Non-Linear Functions

This lesson shows how to graph piecewise functions whose pieces are curves, such as a piecewise quadratic function, rather than lines. Split the domain, check whether boundary points are open or closed, and sketch each curved piece within its own restricted domain, with two fully worked examples.

What Is a Piecewise Non-Linear Function?

A piecewise function is really several different function rules stitched together, with each rule applying only to a specific part of the domain. In graphing piecewise linear functions, every piece is a straight line, so you only need slope and a starting point. A piecewise non-linear function is built the same way, except one or more pieces are curves, such as a parabola, a square root function, or an exponential function. That means graphing it correctly means combining several different curve-sketching skills, each restricted to its own slice of the domain.

For example, a piecewise quadratic function might look like this:

\( f(x) = \begin{cases} x^2 & \)if \( x \le 1 \)
\( \sqrt{x} & \)if \( x > 1 \end{cases} \)

To graph it, you cannot just draw one continuous curve. You have to graph \(x^2\) but only keep the part where \(x \le 1\), then graph \(\sqrt{x}\) but only keep the part where \(x > 1\), then join the two pieces together.

Steps for Graphing a Piecewise Non-Linear Function

  1. Write down the domain restriction attached to each piece, the same way you would when you write domain and range for a single function.
  2. Identify what kind of curve each piece is: a parabola, a square root, an exponential curve, or something else.
  3. Substitute the boundary x-value into each piece that includes it to find the exact point where the pieces meet.
  4. Decide whether each boundary point is open (not included, drawn as a hollow circle) or closed (included, drawn as a solid circle).
  5. Sketch each curve as if it covered the whole number line, then erase or ignore the portion outside its assigned domain.
  6. Draw the remaining pieces together on the same axes to form the full graph.
Open circle: point is not included Closed circle: point is included
Open versus closed boundary points on a piecewise graph

Example 1: A Continuous Piecewise Quadratic Function

Graph \( f(x) = \begin{cases} x^2 & \)if \( x \le 1 \)
\( \sqrt{x} & \)if \( x > 1 \end{cases} \).

Both pieces meet at \(x = 1\). Substituting gives \(f(1) = 1^2 = 1\) from the first rule, since \(x \le 1\) includes 1, so this point is closed. The second rule only starts just after \(x = 1\), so its point at \((1, 1)\) is technically open, but since it lands on the exact same spot as the closed point from the first piece, the graph looks perfectly connected there.

Graph the parabola \(x^2\), the same way you would in graphing parabolas for given quadratic functions, but keep only the part with \(x \le 1\):

Graph of y equals x squared, restricted to x less than or equal to 1 Plot of y = x**2 for x in [-3, 1] -3 -2 -1 0 1 0 2 4 6 8 10 x f(x) closed point (1, 1)
The parabola piece of f(x), shown only for x less than or equal to 1

Then graph the square root piece, keeping only the part with \(x > 1\):

Graph of y equals the square root of x, restricted to x greater than 1 Plot of y = sqrt(x) for x in [1, 4] 1 1.5 2 2.5 3 3.5 4 1 1.2 1.4 1.6 1.8 2 x f(x) open point (1, 1) (4, 2)
The square root piece of f(x), shown only for x greater than 1

Placing both pieces on the same axes gives the full graph of \(f(x)\): a rising parabola arc up to \((1, 1)\), which then flows into a slower-rising square root curve.

Example 2: A Piecewise Function with a Jump Discontinuity

Graph \( g(x) = \begin{cases} -x^2 + 4 & \)if \( x < 0 \)
\( 2^x & \)if \( x \ge 0 \end{cases} \).

Check the boundary at \(x = 0\) in both pieces. The first piece gives \(-0^2 + 4 = 4\), but since its domain is \(x < 0\), the point \((0, 4)\) is not actually reached, so it gets an open circle. The second piece gives \(2^0 = 1\), and since its domain is \(x \ge 0\), the point \((0, 1)\) is included, so it gets a closed circle. Because \(4 \ne 1\), the graph jumps at \(x = 0\) instead of connecting smoothly.

Graph of y equals negative x squared plus 4, restricted to x less than 0 Plot of y = -x**2+4 for x in [-3, 0] -3 -2.5 -2 -1.5 -1 -0.5 0 -6 -4 -2 0 2 4 x g(x) open point (0, 4)
The downward parabola piece of g(x), shown only for x less than 0

The second piece is an exponential curve. Graph it the same way you would for any exponential function, using the same techniques as in graphing exponential functions, then keep only \(x \ge 0\):

Graph of y equals 2 to the power of x, restricted to x greater than or equal to 0 Plot of y = 2**x for x in [0, 3] 0 0.5 1 1.5 2 2.5 3 2 4 6 8 x g(x) closed point (0, 1)
The exponential piece of g(x), shown only for x greater than or equal to 0

Combining both sketches shows a downward-curving parabola ending in an open circle at \((0, 4)\), with a separate exponential curve starting at a closed circle at \((0, 1)\) and rising slowly to the right. This visible gap is called a jump discontinuity.

Common Mistakes to Avoid

  • Do not draw a whole curve first and trim it later without checking the domain restriction carefully; it is easy to keep the wrong side of the boundary.
  • Do not assume the pieces always connect. Always plug the boundary value into both pieces separately to see if the graph is continuous or has a jump.
  • Do not forget which piece owns the boundary point. Only one rule can be evaluated at that exact x-value, and that rule decides whether the circle is open or closed.
  • Do not mix up the shapes of different curve families. A square root curve, a parabola, and an exponential curve each have distinctly different growth patterns.

Related lessons