How do I shade in a graph using Socratic's graph function?

1 Answer

Through the use of less than and greater than functions.


You can use less and greater than equations to create shading.

A simple example is #y < x#, with the "equation box" being "y < x" which results in a dotted boundary line:

graph{y < x [-10, 10, -5, 5]}

And #y <= -x# gets the solid boundary line:

graph{y <= -x [-10, 10, -5, 5]}

We can put them together (I'm using "(y-x)(y+x)<0"):

graph{(y-x)(y+x) < 0 [-10,10,-5,5]}

And you can use this functionality to make shapes by graphing lines and curves and then using functions to limit what is actually graphed. This answer has more on that: