Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13010

Re: How to discard negative solutions

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to discard negative solutions
Date 2013-01-02 01:04 +0000
Message-ID <kc012o$hbg$1@smc.vnet.net> (permalink)
References <20130101004551.3FFB56895@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


?$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@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
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How to discard negative solutions Bob Hanlon <hanlonr357@gmail.com> - 2013-01-02 01:04 +0000

csiph-web