How do I extract the real part of a substitution expression from FindRoot or Solve? Or alternately, how do I insist that they return real results?
For example, FindRoot returns something of the form:
{x->A + B I}
Analytically, I know that x must be real. Because B is 17+ orders of magnitude smaller than A, I assume it's numerical slop.
If I do:
Re[FindRoot[expr, {x, guess}]]
it simply returns:
Re[{x->A + B I}]
Assumptions aren't helping:
Assuming[Element[x, Reals], FindRoot[expr, {x, guess}]] ]
still returns x with a small imaginary component. Any suggestions?
Chop, that's all. – Artes Apr 14 '15 at 16:35Chopworks, but I wouldn't say it's easy to find in the documentation unless you already know it's there... – Paul T. Apr 15 '15 at 21:21