Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Imposing constraints on a system of equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109360] Re: Imposing constraints on a system of equations
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 23 Apr 2010 03:49:12 -0400 (EDT)

Use Reduce

eq1 = Pi*r^2 + 2*Pi*r*x == 0;
eq2 = 2*Pi*r*h + (2*Pi*h + 4*Pi*r)*x == 0;
eq3 = 2*Pi*r^2 + 2*Pi*r*h - a == 0;

sols = Reduce[{eq1, eq2, eq3, r >= 0, h >= 0},
   {r, h, x}, Reals] // ToRules

{r -> 1/Sqrt[6*Pi], 
   h -> Sqrt[2/(3*Pi)], 
   x -> -(h/(Sqrt[6*Pi]*
             (h + Sqrt[2/(3*Pi)])))}


Bob Hanlon

---- Virgil Stokes <vs at it.uu.se> wrote: 

=============
A very simple question on imposing conditions/constraints.

I know that a, r, and h must be real and non-negative in the following 
system of equations:

eq1=Pi*r^2+2*Pi*r*x==0;
eq2=2*Pi*r*h+(2*Pi*h+4*Pi*r)*x==0;
eq3=2*Pi*r^2+2*Pi*r*h-a==0;
sols=Solve[{eq1,eq2,eq3},{r,h,x}]

How can I impose conditions on this system such that only real solutions 
are obtained, and r and h are non-negative?

Thank you,
--V



  • Prev by Date: Re: Adding the elements of a list sequentially
  • Next by Date: Re: Find (cyclic) Sequence
  • Previous by thread: Imposing constraints on a system of equations
  • Next by thread: Re: Imposing constraints on a system of equations