Re: How to set y always greater than or equal to x for a function?

• To: mathgroup at smc.vnet.net
• Subject: [mg46576] Re: How to set y always greater than or equal to x for a function?
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Tue, 24 Feb 2004 21:04:20 -0500 (EST)
• Organization: The University of Western Australia
• References: <c1ehpp\$kgg\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <c1ehpp\$kgg\$1 at smc.vnet.net>,
Albert Franco <francoatnsuok at earthlink.net> wrote:

> This is an example of one line I would like to calculate in Mathematica:
>
> Plot3D[Sqrt[y-x],{x,-100,100},{y,-100,100}];
>
> How can I best edit this line to make y always greater than or equal to x
> during calculation so the program doesn't try to take the square root of a
> negative number?

<< Calculus`

Plot3D[Boole[y >= x] Sqrt[y - x], {x, -100, 100}, {y, -100, 100}];

Cheers,
Paul

--
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

```

• Prev by Date: Re: How to set y always greater than or equal to x for a function?
• Next by Date: a question about [[ ]]
• Previous by thread: Re: How to set y always greater than or equal to x for a function?
• Next by thread: RE: How to set y always greater than or equal to x for a function?