Tutorials › Calculus I › Graphing Piecewise Functions with Endpoint Conventions

Function Notation and Representations · Tutorial 22 of 1495

Graphing Piecewise Functions with Endpoint Conventions

Learn how interval conditions control which parts of each formula appear on a piecewise graph and how to mark or represent the endpoints.

Beginner 11 min read

What You'll Learn

  • Restrict each formula to the interval assigned to its piece.
  • Match open and closed interval endpoints to open circles and solid dots.
  • Plot finite excluded endpoints at the branch’s limiting height.
  • Recognize when an excluded endpoint has no finite height to mark.
  • Check that the pieces cover the function’s domain without assigning conflicting values.

Why Endpoint Conventions Matter

A piecewise function uses different rules on different parts of its domain. To graph it correctly, you must do more than graph each formula: you must keep only the part of each formula whose inputs satisfy that rule’s condition. The interval endpoints matter because they tell you whether the graph includes the point at an endpoint or merely approaches it.

For a branch with a finite endpoint height, a solid dot marks a point that belongs to the graph, while an open circle marks a finite location that the branch approaches but does not include. But an open circle is not appropriate in every case: if the branch grows without bound near an excluded endpoint, there is no finite height at which to place one.

Key idea: Graph each formula only on its assigned interval. At an included endpoint, plot the branch’s defined value with a solid dot. At an excluded endpoint, use an open circle only if the branch approaches a finite height; otherwise show the branch’s behavior, such as unbounded growth near a vertical asymptote.

Intervals Determine Which Parts to Draw

Suppose a piecewise function has a branch \(y=g(x)\) for inputs in an interval \(I\). The branch contributes exactly the points \((x,g(x))\) for which \(x\) belongs to \(I\) and \(g(x)\) is defined. Do not draw the entire graph of \(g\) unless the interval actually includes all of its inputs.

For example, the rule \(y=x^2\) on \(-2\le x<0\) gives only the portion of the parabola over that interval. It does not include the parabola for positive \(x\), and it does not include the point at \(x=0\) from this branch.

Definition: The graph of a function \(f\) is the set of points \((x,f(x))\) for all inputs \(x\) in its domain. For a piecewise function, each rule contributes only the graph points whose inputs satisfy that rule’s interval condition.

This description explains why endpoint markers matter: the endpoint point is either among the points contributed by a branch or it is not. An interval such as \(x\le c\) includes \(c\), while \(x<c\) excludes it. On a graph, that membership is shown by a solid dot or, when there is a finite endpoint height, an open circle.

A Reliable Graphing Process

1
Read each condition.
Identify the inputs assigned to each rule, including whether each endpoint is included.
2
Graph only the assigned portion.
Use familiar points and the shape of the formula, but omit all inputs outside its interval.
3
Handle each endpoint.
For an included endpoint where the rule is defined, plot its value with a solid dot. For an excluded endpoint, use an open circle only if the branch approaches a finite height.
4
Check the complete graph.
Confirm that the pieces show the function on its domain and that no input is assigned conflicting output values.

At an excluded endpoint, the branch’s endpoint height is determined by its behavior as inputs approach the endpoint from within the branch’s interval. If the \(y\)-values approach a finite number, that number gives the height of an open circle. For a continuous formula whose value is defined at the endpoint, substituting the endpoint gives that height. If the \(y\)-values do not approach any finite number, there is no finite point to mark with an open circle.

Worked Example: Two Linear Branches

Worked Example: Two Linear Branches

Graph the piecewise function

$$ f(x)= \begin{cases} x+2, & x<-1,\\ -x+2, & x\ge -1. \end{cases} $$

Step 1: Read the intervals. The first rule applies for \(x<-1\), so its endpoint at \(x=-1\) is excluded. The second applies for \(x\ge -1\), so its endpoint at \(x=-1\) is included.

Step 2: Graph the first rule on its interval. The line is \(y=x+2\). At the excluded endpoint, substitution gives \((-1)+2=1\), so the branch approaches \((-1,1)\). Mark an open circle there. For a point to the left, choose \(x=-2\): \(y=-2+2=0\), giving \((-2,0)\). Draw the line \(y=x+2\) only for \(x<-1\).

Step 3: Graph the second rule on its interval. The line is \(y=-x+2\). At the included endpoint, \(y=-(-1)+2=1+2=3\), so plot a solid dot at \((-1,3)\). For \(x=0\), \(y=-0+2=2\), giving \((0,2)\). Draw this line only for \(x\ge -1\).

Check: At \(x=-1\), only the second condition applies, and the function value is \(f(-1)=3\). Thus the solid dot \((-1,3)\) is the function’s value there. The open circle \((-1,1)\) records where the first branch would end, but that point is not included. The intervals \(x<-1\) and \(x\ge-1\) cover all real inputs without overlap.

Why the Endpoint Markers Work

For a branch \(y=g(x)\) assigned to an interval \(I\), its graph consists precisely of the pairs \((x,g(x))\) with \(x\in I\). If the interval includes an endpoint \(c\), and \(g(c)\) is defined, then \((c,g(c))\) is one of those pairs. It belongs to the graph, so it is marked with a solid dot.

If \(c\) is excluded, then \((c,g(c))\) is not contributed by that branch, even if the formula happens to be defined at \(c\). When the branch’s \(y\)-values approach a finite height \(L\) as \(x\) approaches \(c\) from within \(I\), an open circle at \((c,L)\) shows the finite location the branch approaches without including it. If there is no finite height, there is no endpoint coordinate for an open circle. This is why endpoint notation and the branch’s behavior must both be checked.

Important condition: A solid dot at \(x=c\) requires that the branch’s interval includes \(c\) and its rule is defined there. An open circle represents a finite approached location that the branch excludes; it does not represent every excluded endpoint.

Worked Example: A Parabola Segment and a Constant Segment

Worked Example: A Parabola Segment and a Constant Segment

Graph

$$ g(x)= \begin{cases} x^2, & -2\le x<0,\\ 1, & 0\le x\le 2. \end{cases} $$

Step 1: Graph the quadratic branch. Its interval is \([-2,0)\). At \(x=-2\), the rule is included and gives \(g(-2)=(-2)^2=4\), so plot a solid dot at \((-2,4)\). At \(x=-1\), \(g(-1)=(-1)^2=1\), giving \((-1,1)\). At the excluded endpoint \(x=0\), the formula gives \(0^2=0\), and the branch approaches that finite height. Mark an open circle at \((0,0)\). Draw the parabola only from \(x=-2\) up to, but not including, \(x=0\).

Step 2: Graph the constant branch. Its interval is \([0,2]\), and its rule is \(y=1\). At \(x=0\), \(g(0)=1\), so plot a solid dot at \((0,1)\). At \(x=2\), \(g(2)=1\), so plot a solid dot at \((2,1)\). Draw the horizontal segment \(y=1\) between these included endpoints.

Check: The first branch excludes \(x=0\), while the second includes it, so the function has one value there: \(g(0)=1\). The open circle at \((0,0)\) belongs to the endpoint behavior of the first branch, not to the function’s value at \(0\). The interval pieces together cover \([-2,2]\).

When an Open Circle Is Not the Right Marker

An excluded endpoint does not always have a finite endpoint height. Consider a branch \(y=1/x\) assigned to \(x>0\). As \(x\) approaches \(0\) through positive values, \(1/x\) increases without bound. It does not approach a finite \(y\)-coordinate, so placing an open circle at \(x=0\) would be misleading. The graph instead rises without bound near the vertical line \(x=0\), which is a vertical asymptote for this branch.

This distinction also explains why blindly substituting an excluded endpoint can fail. The expression \(1/x\) is undefined at \(x=0\), and there is no finite value to mark there. For a branch such as \(y=x^2\) on \(x<0\), substitution at \(0\) does give the finite height \(0\), and the branch approaches that height, so an open circle at \((0,0)\) is appropriate.

Worked Example: A Finite Value on One Branch and Unbounded Growth on Another

Graph

$$ h(x)= \begin{cases} x+1, & x\le 0,\\ \dfrac{1}{x}, & x>0. \end{cases} $$

Step 1: Graph the left branch. The rule \(x+1\) applies for \(x\le0\). At the included endpoint, \(h(0)=0+1=1\), so plot a solid dot at \((0,1)\). For \(x=-1\), \(y=-1+1=0\), giving \((-1,0)\). Draw the line \(y=x+1\) only for \(x\le0\).

Step 2: Graph the right branch. The rule \(1/x\) applies only for \(x>0\). Useful points are \(x=1\), giving \(y=1/1=1\) and \((1,1)\); \(x=2\), giving \(y=1/2\) and \((2,1/2)\); and \(x=1/2\), giving \(y=1/(1/2)=2\) and \((1/2,2)\). Draw the reciprocal curve through these points on the positive-\(x\) side only.

Step 3: Show the endpoint behavior. The right branch excludes \(x=0\), and \(1/0\) is undefined. As positive \(x\) gets closer to \(0\), \(1/x\) grows without bound. Therefore, draw the branch rising near the vertical asymptote \(x=0\); do not add an open circle at a finite height for this branch. The solid point \((0,1)\) comes from the left branch and is the function value at \(0\).

Check: At \(x=0\), the condition \(x\le0\) applies and gives \(h(0)=1\). At \(x=1\), the condition \(x>0\) applies and gives \(h(1)=1\). The two branches have no conflicting assignment at \(0\), and the right-hand branch is not defined there.

Common Mistake: Drawing Every Formula Everywhere

A frequent error is to graph each formula on its full natural domain and then treat the result as the piecewise graph. For instance, in the preceding example, drawing the entire line \(y=x+1\) and the entire reciprocal graph \(y=1/x\) would add points that the piecewise definition never assigns. The line is only used for \(x\le0\), and the reciprocal rule is only used for \(x>0\).

A related mistake is to put an open circle at a guessed endpoint height without checking the branch. For \(y=1/x\) on \(x>0\), writing “open circle at \((0,1/0)\)” is invalid because \(1/0\) is undefined. Nor does choosing a nearby point, such as \((1,1)\), give the endpoint’s height. The branch has no finite endpoint height; show its unbounded behavior instead.

Correction: First restrict each formula to its assigned interval. Then check endpoint inclusion and the branch’s behavior near every excluded endpoint. Use an open circle only when the branch approaches a finite coordinate that is not included.

Why This Skill Matters

A graph is a visual representation of the function’s actual input-output assignments, not merely a collection of formula shapes. Endpoint markers communicate which inputs are included and which are not. This is essential for reading a function’s value at a boundary, identifying its domain from its graph, and checking that a piecewise definition has been represented accurately.

When you finish a sketch, ask three questions: Did I draw each formula only on its assigned interval? Did I mark every included finite endpoint with a solid dot? At each excluded endpoint, did I distinguish a finite approached height from behavior with no finite endpoint height? These checks catch many graphing errors before they affect later reasoning.

Check Your Understanding

For each question, pay attention to both the interval condition and the branch’s behavior at its endpoints.

  1. For \(f(x)=x-1\) when \(x<2\), should the endpoint at \(x=2\) be shown with a solid dot or an open circle, and at what height?
  2. For \(g(x)=x^2\) when \(-1\le x<1\), which endpoint points are included, and which finite endpoint location is open?
  3. If a branch is \(y=1/x\) for \(x>0\), why is an open circle at a finite height on \(x=0\) inappropriate?
  4. For a branch defined by \(y=3\) on \(0<x\le4\), identify its endpoint markers and their coordinates.
  5. What two checks ensure that a piecewise graph represents the stated function rather than unrestricted versions of its formulas?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon