how to create a piecewise function in desmos

Step-by-Step: Crafting a Piecewise Function on Desmos

By Brian Lewis
AD

Discovering Piecewise Functions with Desmos

Welcome to a comprehensive guide on how to create a piecewise function in Desmos. This user-friendly graphing calculator and online math tool offers an interactive learning experience, perfect for explorations into piecewise functions, which are crucial in mathematics.

With Desmos, you can create stunning visualizations of functions and equations, including piecewise functions, making complex mathematics easier to understand. Let's dive into how to create a piecewise function using Desmos.

Understanding Piecewise Functions Before You Start

Before we begin, let's quickly understand what a piecewise function is. A piecewise function is defined by pieces (sections), each corresponding to a different interval of the domain. Each piece of the function behaves differently, having its own definition.

AD
Piecewise Functions Project - Algebra and Beyond
Piecewise Functions Project - Algebra and Beyond
Piecewise Function
Piecewise Function
a piecewise function is shown in the form of a graph
a piecewise function is shown in the form of a graph

For instance, consider this piecewise function: f(x) = { 3x if x < 2; 10 - x if 2 ≤ x ≤ 4; 2x + 1 if x > 4 }. Here, the function has three pieces or cases.

Creating a Piecewise Function in Desmos: Getting Started

Now that you understand piecewise functions, let's learn how to create them in Desmos. Start by visiting Desmos and launch a new calculator.

Piecewise Functions
Piecewise Functions
Mrs. Hester's Classroom
Mrs. Hester's Classroom
Piecewise Functions
Piecewise Functions

In the expression bar at the top, you'll find a dropdown menu labeled "New". Click on it, and select "Expression". A new expression box will appear.

Defining Individual Pieces

Let's create the previously mentioned piecewise function. In the first expression box, enter "10 - x" (without the quotes). This is our first piece.

AD

Now, add a case to create our second piece. Click on the "+ case" button at the bottom of the expression box. This will add a new expression box where you can define your next piece. Enter "3x" for this box.

Piecewise Functions Practice
Piecewise Functions Practice
Piecewise Functions INB Pages
Piecewise Functions INB Pages
Piecewise Functions — Choose the Right Piece First
Piecewise Functions — Choose the Right Piece First
Piecewise Functions Maze and Matching
Piecewise Functions Maze and Matching
Piecewise Functions Cut-Out Puzzle
Piecewise Functions Cut-Out Puzzle
Math Worksheets - Piecewise Functions Worksheets
Math Worksheets - Piecewise Functions Worksheets

Defining the Domain

For each case, you can set the domain conditions using the dropdown menus that appear when you hover over the expression boxes. For the first case ("3x"), set the domain to "x > = 2". For the second case ("10 - x"), set the domain to "x < 2".

This configuration should create our piecewise function as defined earlier. Click on "Graph" to see it in action.

AD

Switching from Piecewise to Standard Notation and vice versa

Desmos allows you to switch easily between piecewise and standard notation. To access this feature, click on the three tiny squares (view options) at the top-right of the expression box.

Graphing Piecewise Functions Activity - Real World Project Based Learning
Graphing Piecewise Functions Activity - Real World Project Based Learning
Piecewise Functions Guided Notes Lesson
Piecewise Functions Guided Notes Lesson
Introduction to Piecewise Functions - Notes, Examples, & Assignment (Editable)
Introduction to Piecewise Functions - Notes, Examples, & Assignment (Editable)

Select "show in standard notation" to display the piecewise function as one continuous expression. To reverse, select "piecewise" under the same dropdown.

Modifying Pieces and Adding More Cases

You can easily modify each piece of the function by editing the expressions in the corresponding boxes. To add more cases, click on the "+ case" button as many times as needed. One critical aspect is ensuring that each interval in the domain of the function is covered by one of the cases.

AD

For instance, to add a third case (2x + 1 for x > 4), click "+ case", set the expression to "2x + 1", and set the domain to "x > 4".

Creating a piecewise function in Desmos is an excellent step in understanding and visualizing these complex mathematical concepts. As you continue exploring, remember that Desmos isn't just a tool for seeing functions; it's a whiteboard for exploring math. So, keep experimenting, and happy creating!

AD