Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Solving simultaneous equations with inequalities

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31153] Re: [mg31140] Solving simultaneous equations with inequalities
  • From: BobHanlon at aol.com
  • Date: Sun, 14 Oct 2001 04:11:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 2001/10/13 2:48:55 AM, milstead at cs.bris.ac.uk writes:

>I am solving some simultaneous equations and getting four results because
>the solution contains two square roots - produced because some of the
>equations to solve are of the form x^2 = y^2 + z^2. Is there any way of
>including the hint x>0 or 'I only want positive roots of x to be used'
>in
>Solve[]?
>

For a positive value of x, both y and z must be real and 
at least one of them must be non-zero.

Select[
  Solve[x^2==y^2+z^2, x], 
  Simplify[Positive[x/.#], Element[{y,z}, Reals]&&(y!=0||z!=0)]&]

{{x -> Sqrt[y^2 + z^2]}}

For a nonnegative value of x

Select[
  Solve[x^2==y^2+z^2, x], 
  Simplify[NonNegative[x/.#], Element[{y,z}, Reals]]&]

{{x -> Sqrt[y^2 + z^2]}}


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Sorting and Selecting in MultiLevel Lists?
  • Next by Date: Re: Simplex visualization
  • Previous by thread: Solving simultaneous equations with inequalities
  • Next by thread: Re: Solving simultaneous equations with inequalities