MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


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?