Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*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 1998

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

Search the Archive

Re: using Upset for defining positive real values (Re: Can I get ComplexExpand to really work?)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14756] Re: using Upset for defining positive real values (Re: Can I get ComplexExpand to really work?)
  • From: Maarten.vanderBurgt at icos.be
  • Date: Sat, 14 Nov 1998 03:07:49 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Rolf,

Thanks for the tips.

PowerExpand comibed with Simplify works fine

Instead of your PosSolve function, which ony works in the particular
case of PosSolve[a^2 -1==0, a], I am in fact looking for a more general
solution of the following problem:
Solve[{f(a,b,c,d, x,y,z)==0}, {x,y,z}], where {f( )==0} is a well
defined set of equations for some physical problem, and retain e.g.
only positive solutions for  x, y,z while a,b are positive reals and
c,d are negative. If your set of solutions is quite complicated it is
often difficult to see which one(s) actually make(s) sense in the
particular problem Is there a way to do this, with some 'Solve-like'
function, without having to calculate numerical values for the
solutions with some typical parameter values for a,b,c,d?

thanks

Maarten van der Burgt




rolf at mertig.com on 09-11-98 02:49:58 AM

cc:

Subject: [mg14756]  Re: using Upset for defining positive real values (Re: Can I
get
      ComplexExpand to really work?)



Maarten.vanderBurgt at icos.be wrote:
>
> Hello,
>
> In functions like Solve and Simplify there is no option like the
> Assumptions option in Integrate.
> In a recent message ([mg14634]) Kevin McCann(?) suggested usign Upset as
> an alternative to the Assumptions option in Integrate. I thought this
> might work as well for Solve, Simplify etc.
>
> In the example below I want A to be positive real number. I use Upset to
> give A the right properties.
> I was hoping Solve[A^2-1 == 0, A] would come up with the only possible
> solution given that A is a positive real: {A -> 1}. Same for
> Simplify[Sqrt[A^2]]: I would expect the result to be simply A (instead
> of Sqrt[A^2]) when A is set to be positive and real.
>
> Upset does not seem to work here.
>
> 1st question: why?
Because Simplify and Solve are obviously not written to recognize Upset
values.
>
> 2nd question: is there a way you can introduce simple assumptions about
> variables in order to rule out some solutions or to reduce the number
> of solutions from functions like Solve, or to get a more simple answer
> from manipulation fuctions like Simplify.
>...
> In[3]:= Solve[a^2-1 == 0, a]
> Out[4]= {{a -> -1},{a -> 1}}
> In[5] := Simplify[Sqrt[a^2]]
> Out[5]= Sqrt[a^2]
>
Some possibilities are:

In[1]:= PosSolve[eqs_, vars_] := Select[Solve[eqs, vars], Last[Last[#]]
> 0&]
In[2]:= PosSolve[a^2-1 == 0, a]
Out[2]= {{a -> 1}}
In[3]:= PowerExpand[Sqrt[a^2]]
Out[3]= a

--
Dr. Rolf Mertig
Mertig Research & Consulting
Mathematica training and programming Development and distribution of
FeynCalc Amsterdam, The Netherlands
http://www.mertig.com





  • Prev by Date: Re: A "singular" equation
  • Next by Date: Simplify
  • Previous by thread: Re: using Upset for defining positive real values (Re: Can I get ComplexExpand to really work?)
  • Next by thread: Re: Re: using Upset for defining positive real values (Re: Can I get ComplexExpand to really work?)