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

MathGroup Archive 2007

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

Search the Archive

Re: Parse results from Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73910] Re: Parse results from Solve
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Sat, 3 Mar 2007 00:56:39 -0500 (EST)
  • References: <es916i$2u2$1@smc.vnet.net>

=CF/=C7 nikki_74 =DD=E3=F1=E1=F8=E5:
> I have used the Solve command to get the solutions for a system of equati=
ons. However I want to use these solutions in other commands, such as Reduc=
e and Simplify.
>
> For instance, say the output of Solve is,
> sols= {{x->0,y->0},{x->1,y->2}}
>
> and I want all solutions where x!=y , or , all solutions where y>1.
>
> Can anybody help with this? Thanks!

Use directly Reduce!

In[38]:=
Solve[x^2 - 3*y^4 == 0 && x + y == 2, {x, y}]
N[%]

Out[38]=
{{x -> 2 + 1/(2*Sqrt[3]) + (1/2)*Sqrt[1/3 + 8/Sqrt[3]], y -> (1/2)*(-
(1/Sqrt[3]) - Sqrt[1/3 + 8/Sqrt[3]])},
  {x -> (1/2)*(4 - 1/Sqrt[3] - I*Sqrt[(1/3)*(-1 + 8*Sqrt[3])]), y -> 1/
(2*Sqrt[3]) + (1/2)*I*Sqrt[(1/3)*(-1 + 8*Sqrt[3])]},
  {x -> (1/2)*(4 - 1/Sqrt[3] + I*Sqrt[(1/3)*(-1 + 8*Sqrt[3])]), y -> 1/
(2*Sqrt[3]) - (1/2)*I*Sqrt[(1/3)*(-1 + 8*Sqrt[3])]},
  {x -> (1/6)*(12 + Sqrt[3] - Sqrt[3*(1 + 8*Sqrt[3])]), y -> (1/2)*(-
(1/Sqrt[3]) + Sqrt[1/3 + 8/Sqrt[3]])}}

Out[39]=
{{x -> 3.401344839274771, y -> -1.4013448392747707}, {x ->
1=2E7113248654051871 - 1.0350686958100501*I,
   y -> 0.28867513459481287 + 1.0350686958100501*I}, {x ->
1=2E7113248654051871 + 1.0350686958100501*I,
   y -> 0.28867513459481287 - 1.0350686958100501*I}, {x ->
1=2E1760054299148548, y -> 0.823994570085145}}

Why to "play" now with Out[38] while for example

In[49]:=
Reduce[x^2 - 3*y^4 == 0 && x + y == 2, {x, y}, Reals]
ToRadicals[%]
LogicalExpand[%]

Out[49]=
(x == Root[48 - 96*#1 + 71*#1^2 - 24*#1^3 + 3*#1^4 & , 1] || x ==
Root[48 - 96*#1 + 71*#1^2 - 24*#1^3 + 3*#1^4 & , 2]) && y == 2 - x
Out[50]=
(x == 2 + 1/(2*Sqrt[3]) - (1/2)*Sqrt[1/3 + 8/Sqrt[3]] || x == 2 + 1/
(2*Sqrt[3]) + (1/2)*Sqrt[1/3 + 8/Sqrt[3]]) && y == 2 - x
Out[51]=
(x == 2 + 1/(2*Sqrt[3]) - (1/2)*Sqrt[1/3 + 8/Sqrt[3]] && y == 2 - x)
||
  (x == 2 + 1/(2*Sqrt[3]) + (1/2)*Sqrt[1/3 + 8/Sqrt[3]] && y == 2 -=
 x)

In[47]:=
Reduce[x^2 - 3*y^4 == 0 && x + y == 2 && y < 0, {x, y}, Reals]
ToRadicals[%]

Out[47]=
x == Root[48 - 96*#1 + 71*#1^2 - 24*#1^3 + 3*#1^4 & , 2] && y == 2 =
- x
Out[48]=
x == 2 + 1/(2*Sqrt[3]) + (1/2)*Sqrt[1/3 + 8/Sqrt[3]] && y == 2 - x

Regards

Dimitris



  • Prev by Date: Re: Bug with Limit?
  • Next by Date: Re: Regression
  • Previous by thread: Re: Parse results from Solve
  • Next by thread: Re: Parse results from Solve