Re: Real Solutions

*To*: mathgroup at smc.vnet.net*Subject*: [mg95809] Re: [mg95782] Real Solutions*From*: Bob Hanlon <hanlonr at cox.net>*Date*: Wed, 28 Jan 2009 06:27:19 -0500 (EST)*Reply-to*: hanlonr at cox.net

Select[Solve[x^3 - 2 x + 7 == 0, x], FreeQ[x /. #, Complex] &] {{x -> -(2*(2/(3*(63 - Sqrt[3873])))^ (1/3)) - ((1/2)*(63 - Sqrt[3873]))^ (1/3)/3^(2/3)}} Select[NSolve[x^3 - 2 x + 7 == 0, x], FreeQ[x /. #, Complex] &] {{x->-2.25826}} Bob Hanlon ---- =?UTF-8?B?S293YWxjenlrLVNjaHLDtmRlcg==?= at smc.vnet.net wrote: ============= Hi, 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.) Regards J.Schroeder