Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3031
| From | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Select positive solutions (depending on parameters) |
| Date | 2011-06-08 11:11 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <isnld1$mvk$1@smc.vnet.net> (permalink) |
Select will do anything that you tell it to do
f[x_] = Times @@ (x - Range[-3, 3]);
sols = Solve[f[x] == 0, x]
{{x -> -3}, {x -> -2}, {x -> -1}, {x -> 0}, {x -> 1}, {x -> 2}, {x -> 3}}
Select[sols, -2 <= (x /. #) <= 1 &]
{{x -> -2}, {x -> -1}, {x -> 0}, {x -> 1}}
Select[sols, Abs[x /. #] > 1 &]
{{x -> -3}, {x -> -2}, {x -> 2}, {x -> 3}}
Bob Hanlon
---- Andrea <cimatori@knmi.nl> wrote:
=============
Hi,
I'm a newbie of Mathematica, sorry if the question has been answered
many times already.
I can't understand how to select those solutions of a system of
equations (depending on some parameters) that satisfy a set of
conditions.
I do something like this:
sols=Solve[f[x,y,...,a,b,c...]==0,{x,y,...}]
and I would then like to operate a selection on "sols", considered
only in some interval of the parameters (relevant for my problem and
decided by me).
The function "Select" does not give the right answer, as it returns
only those solution that are positive for any parameter value.
Any help would be welcome,
thanks.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Select positive solutions (depending on parameters) Bob Hanlon <hanlonr@cox.net> - 2011-06-08 11:11 +0000
csiph-web