MathGroup Archive 2007

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

Search the Archive

Re: How to Eliminate


Here are two immediate solutions for the solution of x^2+3x+2==0
one is a functional programming approach and the other is based on pattern
matching
x/.#&/@Solve[x^2+3x+2==0,x]

and

Solve[x^2+3x+2==0,x]/.{x_->y_}:>y

regards
yehuda

On 4/15/07, JikaiRF at aol.com <JikaiRF at aol.com> wrote:
>
> Dear Members:
> When I use "Solve" in order to solve polynomials with high orders, its
> solutions are usually reterned in terms of a pair of nested braces,
> like {{x -> 0.1}, {x -> 0.5}}. In this situation, I would like to
> obtain a pair of braces such as {0.1, 0.5}.  In other words, I would
> like to know how to eliminate x ->.
> How can I obtain my result?
>
>       Sincerely
>       F. Takata.
>
>
>


  • Prev by Date: differentiate a function of a function
  • Next by Date: Re: Mathematica help
  • Previous by thread: Re: How to Eliminate
  • Next by thread: Re: How to Eliminate