Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solve/Reduce and assumptions

72 views
Skip to first unread message

Hiranya Peiris

unread,
Feb 18, 2002, 5:35:33 AM2/18/02
to
I have a large set of simultaneous multivariate algebraic equations which
I am solving using Solve and Reduce. I get as the answer a list of all
possible sets of solutions. However, only one of these is valid, because
the equations contain a constant parameter R which should be positive. I
cannot find any way of getting Solve and Reduce to recognize this fact.
For example,

Solve[{eqn1,eqn2,...eqnN,R!=0},vars] works, while

Solve[{eqn1,eqn2,...eqnN,R>0},vars] is invalid.

Applying

Simplify[Result,R>0]

to the full solution set does not work either.

I would be grateful for any advice on how to get around this. I am a
newbie, and I tried everything I could think of - mailing this list is my
last resort.

Please copy any replies to my email address: hir...@astro.princeton.edu

Thanks very much!
Hiranya


BobH...@aol.com

unread,
Feb 19, 2002, 2:39:15 AM2/19/02
to

In a message dated 2/18/02 6:33:33 AM, hir...@astro.princeton.edu writes:

>I have a large set of simultaneous multivariate algebraic equations which
>I am solving using Solve and Reduce. I get as the answer a list of all
>possible sets of solutions. However, only one of these is valid, because
>the equations contain a constant parameter R which should be positive.
>I
>cannot find any way of getting Solve and Reduce to recognize this fact.
>For example,
>
>Solve[{eqn1,eqn2,...eqnN,R!=0},vars] works, while
>
>Solve[{eqn1,eqn2,...eqnN,R>0},vars] is invalid.
>
>Applying
>
>Simplify[Result,R>0]
>
>to the full solution set does not work either.
>

You did not say what makes the results invalid. I am guessing
that you are looking for real solutions. You can use Select,
Cases, or DeleteCases. For example,

Select[
Solve[R*x^3==8, x],

Simplify[Element[x/.#,Reals], R>0]&]

{{x -> 2/R^(1/3)}}


Bob Hanlon
Chantilly, VA USA

Hiranya Peiris

unread,
Feb 20, 2002, 1:47:41 AM2/20/02
to
Thanks for your reply! I used DeleteCases and it worked. I have a couple
more quick questions.

1. I am not quite sure how Solve works. If you give it an overconstrained
problem, more equations than variables, will it fail (given that the
equations are all self-consistent)? In my problem, this is the case, and
if I use Solve[eqns] it produces a list of answers, while if I do
Solve[eqns,vars] it gives no solutions: {}.

2. The reason some of the solutions were invalid (see below) is not a
mathematical reason, but a physical one - the parameter R has to be R>0. R
is not a variable, its a parameter that the other variables have to be
solved in terms of. But since I can only get it to produce a solution
using Solve[eqns], there is no way tell Solve that its not a variable, so
it treats R as a variable too, and that is why I get a whole list of
unphysical solutions.

Given the above, what is the explanation for the behaviour of Solve? I can
just use DeleteCases, but I want to understand why it is acting the way it
does.

Thanks
Hiranya

0 new messages