MathGroup Archive 2009

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

Search the Archive

Re: Real Solutions

  • To: mathgroup at
  • Subject: [mg95840] Re: Real Solutions
  • From: Bill Rowe <readnews at>
  • Date: Wed, 28 Jan 2009 06:33:10 -0500 (EST)

On 1/27/09 at 6:58 AM,
=?UTF-8?B?S293YWxjenlrLVNjaHLDtmRlcg==?= at wrote:

>I need only the real solutions from Solve or NSolve. I found a
>complicated way with a lot of "ifs" to get, what I want. Is there an
>easier way to do this? (I don't want to use Reduce.

Easier is always subject to opinion. But here is a way to
accomplish what you want without using Reduce

In[1]:= DeleteCases[Solve[x^3 + x == 0, x],
  HoldPattern[{x -> _Complex}]]

Out[1]= {{x->0}}

  • Prev by Date: Re: Looping
  • Next by Date: Printing (v7)
  • Previous by thread: Real Solutions
  • Next by thread: Re: Real Solutions