Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Questions about Abs[_]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55634] Re: Questions about Abs[_]
  • From: Maxim <ab_def at prontomail.com>
  • Date: Thu, 31 Mar 2005 01:25:49 -0500 (EST)
  • References: <d2dpgh$lt5$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Wed, 30 Mar 2005 08:54:41 +0000 (UTC), Dan <dantopa at gmail.com> wrote:

> Hi Andrzej:
>
> Mathematica is considering the most general case. I am thinking that
> you are dealing with all positive numbers since you have stated the
> answer you want.
>
> Let's tell Mathematica we have all positive numbers.
>
> x = Abs[(2 z0 - 2 d m)^2];     (* define the function *)
>
> lst={z0,d,m};                   (* assemble all variables in a list *)
>
> Simplify[x,lst\[Element]Reals && lst > 0]     (* apply criteria *)
>
> output =
> (2 z0 - 2 d m)^2
>
> Hope this helps,
>
> Dan
>

Element[{x, y}, Reals] is just a conventional notation which means that  
both x and y are in Reals; {x, y}>0 cannot be used in the same way.  
Mathematica seems to interpret the assumption {x, y}>0 as equivalent to  
Element[{x, y}, Reals] (most likely based on the rule that everything  
appearing algebraically in inequalities is real):

In[1]:=
Refine[Element[x, Reals], {x, y} > 0]
Refine[x > 0, {x, y} > 0]

Out[1]=
True

Out[2]=
x > 0

Going slightly off topic, this is one of many cases where Mathematica's  
parsing of vector input is shoddy:

In[3]:=
NSolve[{x, y} == {0}]

Out[3]=
{{False -> 0.}}

Of course we have an invalid input here, but Mathematica's output (and  
absense of warning messages) leaves the user at a loss about what went  
wrong.

Maxim Rytin
m.r at inbox.ru


  • Prev by Date: Re: Need a functional process for this.
  • Next by Date: Re: Need a functional process for this.
  • Previous by thread: Re: Re: Questions about Abs[_]
  • Next by thread: Re: Re: 3D Plots: Specifying GridLine spacing for FaceGrids