MathGroup Archive 2005

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

Search the Archive

Re: Solve yields unreal solutions, NSolve yields real solutions


Mukhtar Bekkali schrieb:
> I thought NSolve is the same as Solve just numeric. The below code
> gives real answers, replacing NSolve with Solve in the last line
> generates Unreal results.  I do not understand why.
> 
> \!\(\*
>   RowBox[{\(Clear["\<Global`*\>"]\), "\n", \(Remove["\<Global`*\>"]\),
...

>     "\[IndentingNewLine]", \(NSolve[FOCB \[Equal] 0, T\_b]\)}]\)
> 

I do not use RealOnly, so I can not tell you exactly what's going on,
but I *guess* the intermediate complex numbers vanish due to RealOnly.

 Solve gives me only Reals in this case:

sol = RootReduce[Solve[FOCB == 0, Subscript[T, b]]]];
N[sol]

{{Subscript[b, 1] -> 1.8560333600623977,
  Subscript[b, 2] ->  9.206972531099007},
{Subscript[b, 1] ->  0.3071686114422483,
 Subscript[b, 2] ->  0.9103220918432908},
{Subscript[b, 1] ->  -8.463201971504645,
 Subscript[b, 2] ->  -0.8172946229422982}}

I *guess* the intermediate complex numbers vanish due to RealOnly.
-- 
Peter Pein
Berlin


  • Prev by Date: Re: Solve yields unreal solutions, NSolve yields real solutions
  • Next by Date: Re: Clear subscripted variables
  • Previous by thread: Re: Solve yields unreal solutions, NSolve yields real solutions
  • Next by thread: Mathematica 5.1.1 benchmark