Domain and Range Restrictions

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{1<x<3} would graph the line y=2x for x values between 1 and 3.

 

You can also use restrictions on the range of a function and any defined parameter.

 

 
 
It's also possible to add multiple restrictions to the same expression line regardless of what parameter is being restricted.

 

 
 
Have more questions? Submit a request

62 Comments

  • 0
    Avatar
    Ahedman

    Ryan, 

    For some reason the desmos engine doesn't do mod(x,3)=0, perhaps it's graphing an "infinately" small point. If you allow the value of the modular function to be less than a small number, say, mod(x,3)<0.01, then you will see the points you expect. As for the second restriction, commas are interpreted as "or", so desmos is graphing values that the mod is zero OR x is between 0 and 6. To use an "and", you need to use a pair of brackets for each restriction. The fucntion below should give you what you're looking for.  

    f(x)=\left(x+1\right)\left\{\operatorname{mod}(x,3)<0.01\right\}\left\{0<x<6\right\}

    Edited by Ahedman
  • 0
    Avatar
    James Zickmantel

    Not sure if this does what you hoped. Let me know either way.
    https://www.desmos.com/calculator/ka09s97va1

    There is no infinity symbol though, so use the largest number as that is the limit of the systrm/language that it can calculate. It would nice but I guess it's not feasible at this time.

    Edited by James Zickmantel
  • 0
    Avatar
    Daniel Cheng

    The functions on lines 30 and 32 of the following graph show up up close, but when you zoom out, it just disappears.

    https://www.desmos.com/calculator/jr97a6dxvy

    Does anyone have a solution to this?

  • 0
    Avatar
    Dan Meyer

    How does it work though?

  • 0
    Avatar
    allegra brittain

    hi I have the line -300x\sin M+y\cos M\ =\left(\ x\cos M+y\sin M-N\right)^2+V\ \left\{y\le810.00\right\}, that i have restricted y of but I also want to restrict x, however, my line gets deleted every time I try to restrict x as well. How do i restrict it so that it works?

  • 0
    Avatar
    Kimberly Hager

    Jackson Smith, write it as y = ------ instead of f_18(x).  It works when you do that.

  • 0
    Avatar
    Noah Meyer

    How do you use unions with the restrictions? 

  • 0
    Avatar
    silver

    I have a circle that needs to have a restriction at 5 and -5 on the y axis and -10 on the x

    So far I have:

    (x-h)^2+(y-k)^2=r^2

    k=0

    r=5

    h=-10

    does any one have a solution?

     

  • 0
    Avatar
    Ahedman

    Kazi Abu Rousan, 

    Use the floor function, which rounds the argument down to the next integer.  "floor(x)" gives only the integral part of x. 

  • 0
    Avatar
    Bhavna Sivakumar

    Hi, I am graphing multiple conditional piece wise functions to see their correlation and trying to write its restrictions but when I use the {} brackets it is forming a line, how should I write the restrictions?

    Function: 95(.87)^t    ... Restriction: {0<x<3.5}

     

     

    Edited by Bhavna Sivakumar
  • 0
    Avatar
    O19 Dittgavi

    I used quite a bit of this information in my quest to create a halo 3 killjoy medal in desmos. Feel free to look for yourself! https://www.desmos.com/calculator/hn1ydbadfr

  • 0
    Avatar
    Kazi Abu Rousan

    Hello...I want to plot the graph of Traingular Numbers. I used the expression f(x)=(x+1)C2 {x>=1) but I have a problem, how can I use only the integral value of x. I mean can we define x such that it will not take integral value in the expression? Please help me

  • 0
    Avatar
    2023gerberi

    How do I simply make a line starting at 20 (y), ending at 15 (y) that the angle makes it go from -7 (x) to -4 (x)???????????

  • -1
    Avatar
    Carolina Kettles

    My equation is y=(4.4)/(x-0.34)+4000 and I'm trying to set the domain so that I have a line segment between y=6.6 and y=32.14 (using a linear equation would be much easier, but I need to use this equation for a project). When I try to set the domain it seems that I can only make it so that y>6.6 but not y<32.14 at the same time without the graph disappearing. Is there any way for me to set the domain to fulfill those requirements?

  • -1
    Avatar
    Mokdad Mokdad

    Hi,
    I'd like to plot a domain indexed by a parameter k that takes values -2,-1,0,1,2 , all at the sametime. For example I want to draw the squares k<x<k+1 {k<y<k+1} for all values of k at the sametime so I would have 5 squares on the graph. How can I do that without explicitly stating the five domains in separate lines.
    Thanks

  • -1
    Avatar
    Candace

    Hey! 

    I currently have no idea how to add a table onto an equation? I use Desmos all the time, and I'm having trouble with this. 

    This is what happens when I try to add a table onto an inequality. It doesn't give me the option to, and I still can't figure it out.

    I need the points on a table to be able to understand this more, but I'm restrained to otherwise.

    If anyone knows how to add a table onto an inequality like this, that'd be great. 

  • -1
    Avatar
    jman23bball

    I made this rough animation of pacman using domain and range restrictions.

    https://www.desmos.com/calculator/28ykwdijnt

     Press play on m to make his mouth move and slide the black dot below him to move pacman.

  • -1
    Avatar
    Jonathandavis

    Could you please implement not equal inequalities in the future. It would help a lot.

  • -1
    Avatar
    Atulac1

    How do you limit a parabola?

  • -2
    Avatar
    Ahedman

    Does desmos limit the domain? When I graph the function r\ =\ \sin \left(\frac{3\theta }{8}\right)\left\{0<\theta <12\pi \right\}, I see no changes to the graph when increasing the upper bound of the domain. I would like to plot this function over a larger domain than [0,12pi]. 

     

  • -2
    Avatar
    Eytan Melamud

    Hi. I tried to limit domain and range. Fine with {-10<x<10} but when adding {-10<y<10} it gives me a nested too deeply error. The annoying thing is it worked for about 10 seconds before deciding it didn't like it. Also any ideas on limiting lines to within the bounding circle would be much appreciated :-)

    Thank you  

    https://www.desmos.com/calculator/gxvswfp621

     

  • -2
    Avatar
    Nadia Olea

    How can you do the parent function into domain and range in desmos?

     

  • -2
    Avatar
    Stryde - (Ari Stryde)

    Is it possible to remove 1/4 of a circle?

  • -2
    Avatar
    1chanian

    Can you check my circle, at kirby's legs, there is still some lingering lines after stating the restrictions.

    https://www.desmos.com/calculator/a8edw3bdpi

    Thanks

  • -2
    Avatar
    Ahedman

    That is a supremely unfortunate.I strongly recommend that you increase both the upper and lower bound in future versions. There are a number of interesting functions I would like to show my students that your program is now useless for. 

  • -2
    Avatar
    The Harcore Nodder

    Is there a "when....then" kind of restriction?

    How would you make it so that if you split a circle into four, three parts remain and the fourth doesn't?

  • -2
    Avatar
    Shinji

    Hello,

     

    I have trouble to understand what does it mean restrictions in Calculus: Integral with adjustable bounds sheet (https://www.desmos.com/calculator/u2qz73ufju)

    we can find this  0<=y<=f(x) {(a-x)(b-x)<0}

     

    I don't understand this restriction {(a-x)(b-x)<0}

     

    can you help me please ?

     

    best regards

     

  • -2
    Avatar
    Blake Barto (Rain)

    Can you limit a polar equation? say, for example, I want the following: r=.9^-θ   to stop at a certain point, and not spiral on forever. How can I do that?

    Edited by Blake Barto (Rain)
  • -2
    Avatar
    Team Desmos

    Ahedman - Polar graphs are automatically set to a domain of [0, 12pi]. It's possible to restrict the domain to a smaller interval but not to make it larger. 

  • -2
    Avatar
    Team Desmos

    Blake - try using "theta" in your restriction like {0<theta<pi}.

Article is closed for comments.
Powered by Zendesk