Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: from range restriction to domain restriction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72617] Re: from range restriction to domain restriction
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Fri, 12 Jan 2007 05:53:46 -0500 (EST)
  • References: <eo4o86$mgn$1@smc.vnet.net><eo534u$5p6$1@smc.vnet.net>

Why the following commands give different output?

Reduce[ComplexExpand[Im[Sqrt[x]]] == 0, x]
x > 0

and

Reduce[ComplexExpand[Im[Sqrt[x]]] == 0]
x == 0 || (Re[x] > 0 && Im[x] == 0)

The following behaviour (for example) looks more normal to me

Reduce[(x + 1)*(4*x^2 + 2) == 0, Reals]
Reduce[(x + 1)*(4*x^2 + 2) == 0, x, Reals]
x == -1
x == -1

Regards
Dimitris

Peter Pein wrote:
> Chris Chiasson schrieb:
> > If I wanted to ensure that Sqrt[x] was always a real number, perhaps
> > as a condition on Piecewise, I would say Im@Sqrt@x==0 (or
> > Element[Sqrt@x,Reals], but Mathematica doesn't like to simplify that).
> > In my real case, x isn't a symbol - and it comes from the output of
> > some other commands. However, I also know that Element[x,Reals], so I
> > was wondering if there is a way to make Mathematica do the following:
> >
> > (part of) input:
> > Im@Sqrt@x==0
> >
> > output:
> > x>0
> >
> > If someone knows how to do this (other than the obvious Cases +
> > pattern transformation), I would appreciate being told how. Thank you.
> >
>
> Hi Chris,
>
> is Reduce[ComplexExpand[Im[Sqrt[x]], x] == 0, x]
> --> x >= 0
> acceptable?
>
> You would have to do sth. like
>
> expr/.{Assuming[a_,ex_]:>Reduce[...],Simplify[ex_,a_]:>... and so on}
>
> I guess I would use the Menu->Find->Find... to replace all "Im@Sqrt@==" with
> "0<=" ;-)
> 
> 
> Sorry, I've got no better idea :-(
> 
> Peter


  • Prev by Date: An Introduction to Programming with Mathematica, Third Edition
  • Next by Date: RE: Mathematica newbie
  • Previous by thread: Re: from range restriction to domain restriction
  • Next by thread: sparsearray and its nonempty cells