# 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. 17 out of 22 found this helpful
Have more questions? Submit a request

• Ahedman

Hey Velascri,

Think about it this way: you only want to plot the parts of the ears that are "above" the places where the circles intersect. You can limit the part of the equation that graphs by using curly brackets {} after the equation. For example, the following entry will be graphed as the line y=2x, but only for values of x greater than 1.

y = 2x {x>1}

With that said, think of where you want to graph your lines: only above the places where the circles intersect. The word "above" should be a clue that you want your y values to be greater than something. If you use a constant value like {y>5}, desmos will graph the top half of each circle. If you use an expression with x, like {y > x + 12}, desmos will graph whatever part of the circle for which the y value of the point is 12 more than the x value of the point, which is good for the left ear, though it's not perfect. You could get it to be perfect by finding both intersections of the left ear and the head, then using the inequality that corresponds to the equation for the line that passes through those two points. I think the following two entries will work well for you:

(x+8)^2+(y-5)^2<= 15  {y>x+12 }

(x-8)^2+(y-5)^2 <= 15 {y>-x+12}

For less than or equal, use "<="

• 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
• 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

• 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.

• Ahedman

Bhavna Sivakumar

Make sure the argument of your function is the same as the domain restriction. Since your function is a function of "t", change your restriction to {0<t<3.5}.

• Foura Brahim

Hello
I wish to restrict the domain only to integers, is it possible with the actual implementation of Desmos ?

• Sc Mccallis

Is it possible to limit x values to strictly intergers? I have a function where it should not be possible for rational numbers to be placed within the equation, which is xcos(180x-360/2x), in which x cannot be rational, cannot be less than 3 and cannot be negative. I know for the less than three i need to use {x<3} and for the negative i need to use {y>0}, however i cannot figure out how to limit the x values to intergers only.

• Jason Bell

A couple people were asking how to write a restriction with "or". I was also wondering about this, but couldn't find an answer anywhere. However, I happened to discover that using a comma seems to do the trick. For example, if you only want the upper and lower part of the line y = 2x + 1, you can use the restriction {x<-2, x>1}. (Notice the comma). Hope this helps someone.

• Noah Meyer

How do you use unions with the restrictions?

• 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

• James Zickmantel

I think I get it but it doesn't explain well the function of colons and commas in this example:

{f(x)>0:0,f(x)<0:f(x)}<y<{f(x)>0:f(x),f(x)<0:0}{a<x<b,b<x<a}

The colon is some kind of 'if-else' expression and the comma is for chaining of multiple conditions.

Edit: here is something about it called piecewise

https://support.desmos.com/hc/en-us/articles/203192385-Piecewise

Edited by James Zickmantel
• Orion D. Hunter
• James Zickmantel

How to limit the dot.
https://www.desmos.com/calculator/y7wsjj7l1n
I put c as the animated driver instead of b which is defined as c but with curly brackets you add the greater then less than rule
Hope that's what you were asking!?

• battle fir

Desmos is simply amazing !!!! I really appreciate everything that you have done for making math fun!

But please just tell me how to make the upper bound of the integral as +ve infinity??

I have observed that Desmos is capable of calculating the sum of curves extending to infinity in the y-axis. So I believe that it would be possible to calculate the area of curves that extend in both directions of the x-axis.

I have a link to the graph describing my problem:

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

Edited by battle fir
• 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
• Leena M

Hello,

Is it possible to use interval notation for restricting the domain and range? My pre-calc teacher prefers we use interval notation but I'm not sure if that's possible for a Desmos drawing.

• 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)???????????

• James Zickmantel
• 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?

• Dan Meyer

How does it work though?

• Daniel Cheng

Basically, I have a parabola and I set it as an inequality so that anything less than it is shaded. Then, I set a restriction to limit the amount (x and y) shaded.

• 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?

• Orion D. Hunter

Hey, there is a infinity symbol, it's just unused,

Try typing infinity, or paste the following:

\infty

• Jackson Smith

I graphed an equation - f_{18}\left(x\right)=\frac{1}{x-3.5}-4\ \left\{1<x<3.5\right\}. But whenever I try to restrict the range, it doesn't work. Please help.

• Kimberly Hager

Can you create a domain restriction with a line of best fit?  For example, I want a parabola to go through the three points that my students drag to a location, but I don't want a full line, I only want the parabola to fit through those three points. I can do it with a regular quadratic equation, but line LOBF disappears when I include a domain restriction. • Kimberly Hager

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

• LUCAS RUSSELL

I am graphing a picture of Sasuke (from  Naruto) for school, I rotated a parabola and am having trouble restricting the line to fit his sword hilt correctly, please help.

(My graph)

• James Zickmantel

Lucas add {y < -13} at the end and it should trim that red line on the sword.

Edited by James Zickmantel
• LUCAS RUSSELL

thanks for the help!

• Damonk

Is there any way to put restrictions on table functions?

Article is closed for comments.