how to do piecewise functions in desmos

Mastering Piecewise Functions: A Step-by-Step Desmos Tutorial

By Brian Taylor
AD

Hello, mathematicians! Today, we're going to unlock the power of Desmos in creating and understanding piecewise functions. Piecewise functions, a part of the greater piecewise storytelling, help us define complex functions over different intervals. Let's dive in!

Desmos, a wonderful drag-and-drop algebra system, makes dealing with piecewise functions a breeze. So, grab your cursor, and let's construct, analyze, and learn!

Introducing Piecewise Functions in Desmos

The first step is recognizing Desmos's built-in expression editor and libraries. For piecewise functions, we primarily use the 'f(x)' expression library. Let's create our first piecewise function, y = {1, x if x < 0, 3 - x if x >= 0}.

AD
Piecewise Function Practice
Piecewise Function Practice
Piecewise Functions INB Pages
Piecewise Functions INB Pages
Piecewise Functions and Restrictions on Desmos
Piecewise Functions and Restrictions on Desmos

We begin with 'f(x) = ' and then '{' and '}'. Inside, we list the functions for x in each interval, separated by commas.

Defining Intervals

To define intervals, we use inequalities like 'x < 0' or 'x >= 0'. The order of intervals matters. Desmos reads from left to right, so ensure you cover all real numbers.

Desmos and Piecewise Functions
Desmos and Piecewise Functions
Piecewise Functions...
Piecewise Functions...

In our example, 'x < 0' covers the left real numbers, while 'x >= 0' covers the non-negative real numbers, creating a complete story.

Writing Function Values

To write the function value for each interval, simply use an expression like '1' or '3 - x'. Keep these concise and easy to read.

AD

After typing our function, press 'Enter' to see it graph. The final expression will look like 'y = {1, x if x < 0, 3 - x if x >= 0}'.

Analyzing and Exploring Piecewise Functions

Now that our function is graphed, let's analyze and explore its behavior.

Try changing the function by updating the expression. For instance, modify '1' to '2' or '3 - x' to '-x'. See how the graph changes?

AD

Finding Points of Discontinuity

Desmos makes finding points of discontinuity easy. For our function, the point where 'x = 0' causes a sudden change in the function's direction. This is our discontinuity.

Scroll your mouse over this point to see the function values jump (1 to 3, or vice-versa). Clicking this point highlights it.

Calculating maximum, minimum, and asymptote values

For continuous functions, Desmos can calculate extreme values (max, min), but for piecewise functions, we typically find these ourselves. Using sustituions or test points can help.

AD

For asymptotes, they occur as 'x' approaches infinites. Try manually identifying these."

AD