Algebra Technology

You Asked For Piecewise Functions, I Give You Piecewise Functions!

NEW: After popular demand from this post, I have created a tutorial on domain restrictions and piecewise functions.  Enjoy!

UPDATE: Many of my Desmos files are avilable on this page: Desmos File Cabinet Enjoy!

Let is never be said that mathcoachblog doesn’t listen to the needs of its followers!  One of the neat things about having a blog is checking out the routes people take to get to the blog. What search caused them to arrive here?  What countries are my visitors from?  What search phrases cause them to reach the blog?

Every day, without fail, there is a theme which appears in the search terms of blog visitors.  Here is a sampling of terms from just the last week:

  • Online piecewise graphing calculator
  • Graph a piecewise function online calculator
  • Piecewise function calculator online
  • Graphing piecewise functions calculator online
  • Piecewise functions online grapher
  • Online graphing calculator piecewise functions
  • How to do a piecewise function on Desmos

OK, folks I get it.  We want to graph piecewise functions.  So, let’s light this candle.


The Desmos knowledge base provides instructions for graphing a piecewise function, and a neat video tutorial.  But I’ll provide a few examples here, and some teaching tips.  Let’s say we want to graph this piecewise function:

In the Desmos calculator, colons are used to separate domain restrictions from their functions.  And commas are used to have multiple function rules in one command.  So, the piecewise function above would be entered as:

Piecewise Entry

The function then appears quite nicely:


Sliders can be used to have students explore the continuity of a piecewise function.  Consider this problem:

For what value(s) of x is the piecewise function below continuous?

In Desmos, start by defining a slider for the parameter “a”.  For mine, I chose to limit the domain to between -10 and 10, and have step counts of .5.  Then, a can be used in the piecewise function.  Click the icon below to play with the document online.  The sharing features are another aspect of Desmos which have improved greatly in the past year.


OK, smart guy, yes…yes, I have kinda avoided the equals parts of the domain restrictions.  Something neat (odd, goofy) happens when an equals is used in the domain restrictions.  Let’s graph this function:

Click this link to find out what happened when I tried to enter this function on Desmos.  The Desmos folks tend to monitor these things, so let’s see if they have a suggestion here.

Down the road, I want to take a deeper look at the new table feature, and will report out.  But my early impression is that it is a addition which works seamlessly with the existing, awesome, calculator.

Also, while I’m in a sharing mood, here is a quick file I created to use in an absolute value inequality unit.  Click below to check it out.  Would enjoy your input!

And finally, I started this post by sharing some of the search terms which cause people to find my blog.  Most of the time, I can explain those terms, and why people would end up here.  But this….well….this, I got nothing…..

search terms


By Bob Lochel

HS Math Teacher. Hatboro-Horsham School District, Horsham, PA.

One reply on “You Asked For Piecewise Functions, I Give You Piecewise Functions!”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s