Re: Refine, assumptions, domains
- To: mathgroup at smc.vnet.net
- Subject: [mg101738] Re: [mg101690] Refine, assumptions, domains
- From: Andrzej Kozlowski <akozlowski at gmail.com>
- Date: Wed, 15 Jul 2009 07:13:11 -0400 (EDT)
- References: <200907140937.FAA02004@smc.vnet.net>
On 14 Jul 2009, at 02:37, Richard Fateman wrote: > What I'm looking for is a simple way to obtain a finite list > > { Pi, 2 Pi, 3 Pi} > > from this information: > > 0< n*Pi < 10, Element[n,Integers] > > Refine doesn't do this, at least with Mathematica 6.0 > Suggestions? (cc to fateman at gmail.com would be nice.) > One way: Reduce[0 < n*Pi < 10 && Element[n, Integers]] n == 1 || n == 2 || n == 3 Of course this is not quite in the form you wanted. If you really need it in that particular form you could use: n*Pi /. {ToRules[Reduce[0 < n*Pi < 10 && Element[n, Integers]]]} {Pi, 2*Pi, 3*Pi} or various other alternatives. But Reduce does the main job. Andrzej Kozlowski
- References:
- Refine, assumptions, domains
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Refine, assumptions, domains