👋

Still comparing SAT prep?

Preview our questions first, or start the 3-day trial and use all 45 question banks before you pay. None of our tests are AI slop.

Start 3-Day Trial
A S M 45 Digital SAT question banks from 2023–2026, including international exams.
No thanks, just browsing

Desmos Piecewise Functions: Syntax, Shortcuts and an SAT Example

See more TTA in Google Search:

Quick Answer

In Desmos, write a piecewise function inside curly braces with condition: formula pairs separated by commas, for example f(x) = {x < 0: -x, x >= 0: x^2}. A last piece with no condition acts as the default. This works in the Desmos calculator built into the digital SAT.

Short answer: to graph a piecewise function in Desmos, put the pieces inside curly braces, with each condition followed by a colon and the formula: f(x) = {x < 0: -x, x ≥ 0: x^2}. Separate the pieces with commas. This works in the Desmos calculator built into the digital SAT.

The syntax, step by step

  1. Open curly braces: type {.
  2. Write the condition first: an inequality in x, like x < 2. Type <= to get ≤.
  3. Add a colon, then the formula for that piece: x < 2: 3x + 1.
  4. Add a comma, then the next piece: , x ≥ 2: 7.
  5. Close the braces: }.

Full example: f(x) = {x < 2: 3x + 1, x ≥ 2: 7}. Both pieces meet at (2, 7), because 3(2) + 1 = 7.

Three shortcuts worth knowing

  • Default piece: leave the last piece without a condition and it applies everywhere else: {x < 0: -x, x}. That graphs the same thing as |x|.
  • Restrict one equation: to show only part of a graph, put the condition after it: y = x^2 {-2 < x < 2}.
  • Evaluate a value: after defining f(x), type f(5) on a new line and Desmos shows the answer. This is the fastest way to check a piecewise question on test day.

Worked example: evaluating a piecewise function

Suppose g(x) = {x ≤ -1: -4, -1 < x ≤ 3: x^2 + 2, x > 3: 4x - 1}. What is g(3) + g(4)?

  • g(3): 3 fits the middle piece (−1 < 3 ≤ 3), so g(3) = 32 + 2 = 11.
  • g(4): 4 fits the last piece (4 > 3), so g(4) = 4(4) − 1 = 15.
  • Answer: 11 + 15 = 26.

The trap is the boundary. At x = 3 you must use the piece whose condition includes 3 (≤), not the one that starts after 3. In Desmos, typing g(3) + g(4) gives 26 right away.

Where piecewise shows up on the SAT

The most common case is absolute value. |x − a| is really a piecewise function: x − a when x ≥ a, and a − x when x < a. Hard SAT questions use this when they ask how many solutions an absolute value equation has. Two hard examples, fully solved, are in our hard SAT math practice test.

Practice more Desmos skills

Practice with Desmos the way you will use it on test day.

Take a free full-length practice test with every math answer explained.

Take a free practice test

Frequently asked questions

How do you write a piecewise function in Desmos?

Use curly braces with condition: formula pairs separated by commas, like {x < 0: -x, x ≥ 0: x^2}.

How do I type ≤ in Desmos?

Type <= and Desmos turns it into ≤.

📚
Create a free account to keep studying Save progress, take free mocks/drills, and track the weak spots behind your score.
Create Free Account Maybe later

Can I use Desmos on the SAT?

Yes. The Desmos graphing calculator is built into Bluebook for the whole Math section.

Explore every SAT hub

Sources

Frequently Asked Questions

How do you write a piecewise function in Desmos?

Use curly braces with condition: formula pairs separated by commas.

How do I type less than or equal to in Desmos?

Type <= and Desmos converts it.

Can I use Desmos on the SAT?

Yes, it is built into Bluebook for the whole Math section.

Related Concepts

SAT College Board Scholastic Aptitude Test Scholastic Assessment Test SAT Reasoning Test Digital SAT The Test Advantage

Sources and Citation Targets