I was trying to write an item for an assessment where I would give a student a graph of a piecewise function and ask them questions about the domain, range, and to evaluate the output value for a specific input value - for example, find f(-3). The purpose of this post isn't really to pit Geogebra and Desmos against one another; rather, I want to make note of some of the things I was thinking about as I tried to make a piecewise function graph in each program. (Disclaimer: I am not an expert at this. I have much more experience with Geogebra than with Desmos. I want to see what the differences are between the programs to figure out when to use each of these powerful tools to enhance my instruction in mathematics. I am sharing my thinking about this task.)
As I typed the function syntax into Desmos, I thought the editor was a little more user friendly than Geogebra. I typed <= and the editor automatically generated the less than or equal to signs for the restrictions on x. When I wasn't sure what to type, I browsed the examples of projects submitted by Desmos users found on the Desmos homepage. Ideally, I want to capture this graph and place it on an assessment. A photocopier may not pick up on the sections of the function on the graph given the lack of density (being able to make the segments and curves thicker). The way to make these curves denser was not immediately obvious to me. The circle centered at (1, 1/3) with radius 1/10 is my effort to place an open circle on the graph. To clean up the image, one thing I could try is modifying the restriction on x [for example, writing 1.2<=x<=4 instead of 1<=x<=4] so the user does not see the part of the function jutting into the circle shown at the left.
Here is the same graph I made using Geogebra:
After making the graph in Desmos, I assumed I could use similar syntax to make the graph in Geogebra. Using similar syntax, I had a problem with the restrictions in Geogebra. Each function has a default y-value of 0 for values of x outside the restriction. Pictures are, after all, worth a thousand words... here are the three functions shown individually. Take a look at the x-axis.
Here is the exact syntax I typed into the Geogebra input bar for each of the above pictures.
(1 / 4 (x - 1)² + 1) (-3 ≤ x ≤ -1)
(x - 2) (-1 < x < 1)
1 / 3 x (1 ≤ x ≤ 4)
I incorrectly assumed the syntax would be similar to that of Desmos. I knew from experience I could clean this issue up by using Condition to Show Object in the Object Properties menu if I had to, but I couldn't remember exactly how. I went to Youtube and found a video on graphing piecewise functions in Geogebra:
Below is an image of the corrected Geogebra graph using the appropriate If[ ] commands to define the rules f(x), g(x), and h(x).
Here is the corrected syntax I typed into the Input Bar to define f(x), g(x), and h(x):
If[-3 ≤ x ≤ -1,1 / 4 (x - 1)² + 1]
If[-1 < x < 1,x - 2]
If[1 ≤ x ≤ 4,1 / 3 x]
This approach eliminated the x-axis issues from the improper syntax I used at first. These graphs show some of the thinking I do day-to-day as a mathematics teacher trying to construct examples to display in class and problems to use in assessments. If somebody reading this has any advice that could help me become more effective with using Desmos or Geogebra for this purpose, please email me at email@example.com or find me on Twitter (@ShelbyAaberg). **Update! See below for additional support on Desmos use. Thanks to Eric Berger (@teachwithcode) and Desmos.com (@Desmos).
Here is the additional resource from @Desmos.