Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: How to discard negative solutions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129312] Re: How to discard negative solutions
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Tue, 1 Jan 2013 20:04:11 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20130101004551.3FFB56895@smc.vnet.net>

?$Assumptions

$Assumptions is the default setting for the Assumptions option used in
such functions as Simplify, Refine, and Integrate.  >>

$Assumptions is not used by Solve directly. Imbed the $Assumptions as
constraints in the Solve or use Select or Cases or DeleteCases along
with Simplify/FullSimplify to eliminate undesired results.

$Assumptions={a>0,b>0,c>0};

solveSolution={b->a,c->a,c->-a-b};

Select[solveSolution,Simplify[Positive[#[[-1]]]]&]

{b->a,c->a}


Bob Hanlon


On Mon, Dec 31, 2012 at 7:45 PM, Dr. Robert Kragler
<kragler at hs-weingarten.de> wrote:
> Hi,
> from a geometric problem I obtain with $Assumptions = {a > 0, b > 0, c > 0}
> using Solve a series of solutions such as
>   {b -> a, c -> a} but also {c -> -a - b}.
> The latter one should obviously be discarded because it will be negative
> according to the assumptions (a>0, b>0) above.
> How can these negative solutions being excluded by Mathematica V8 ? Positive[]
> and NonNegative[] do not help because quantities which are not NumericQ remain
> unevaluated. Help is appreciated.
>
> Robert Kragler
>



  • Next by Date: Re: Remembering Richard Crandall
  • Next by thread: Re: Remembering Richard Crandall