How to restrict the domain of a function in Grapher?

In some math software, you can restrict the domain of a function by adding a command and the conditions after the function definition. Example, for Symbolab:

x^2, x >0

But this doesn't work in Grapher. I get this yellow warning:

enter image description here


Solution 1:

Grapher does it the other way around: y = x > 0 ? x^2

See

https://discussions.apple.com/thread/2786498