Knowledge Base/Using the Desmos graphing calculator/User Guide Topics

Restrictions (piecewise)

Team Desmos
posted this on November 21, 2012 19:23

To limit the domain or range (x or y values of a graph), you can add the restriction to the end of your equation in curly brackets {}. For example, y=2x{x>0} would graph the line y=2x for x values greater than 0.

To try it out in Desmos, click the Restrictions Tour in the help menu:

Screen_Shot_2013-12-29_at_9.31.26_PM.png

 

 

Comments

User photo
Nathan Solomon

 fsdgadsfgad

September 18, 2013 10:03
User photo
Brendon Hackett

that is very helpful, can you show us how to do a step peicewise?

December 12, 2013 11:46
User photo
Fabrice Neyret

More:

- you can cumulate conditions:    y = sin ( x/a )   { a > 0 } { 0 <= x <= a*pi }

- for parametrics curve, the condition must be *in* the parenthesis:  ( t,  sin ( t/a )   { a > 0 }  )

- you can also use the  "if elseif else" version :  y = { a <= 0 : 0 ,   0 <= x <= a*pi  : sin ( x/a )  , 0 )

  with any number of cond : expression terms, and the default (final) expression is not mandatory

January 08, 2014 21:28