MathGroup Archive 2005

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

Search the Archive

Re: Solve with assumptions


Mukhtar Bekkali wrote:
> Great.
> 
> How do you pull the solution out from Reduce? That is, with Solve I can
> have x=x/.Solve[f[x]==0,x] and get x and use it later on.  The output
> of Reduce is identity, x==number.
>

Hi Mukhtar,

*ToRules* is your friend in this case. For example,

In[1]:=
Reduce[x^2 - 1 == 0, x]

Out[1]=
x == -1 || x == 1

In[2]:=
ToRules[%]

Out[2]=
Sequence[{x -> -1}, {x -> 1}]

In[3]:=
{%}

Out[3]=
{{x -> -1}, {x -> 1}}

In[4]:=
x /. %

Out[4]=
{-1, 1}

Best regards,
/J.M.


  • Prev by Date: Re: Solve with assumptions
  • Next by Date: Help! Delete Casses based on column
  • Previous by thread: Re: Solve with assumptions
  • Next by thread: goto and label (cont)