# best real approximation to complex numbers

I have a system of equations and its answers are complex, but I want real numbers. Is there any way to find the best real approximation to a complex number?

-
What exactly are these "equations" you have? Anyway, if the imaginary parts are huge enough, well... – J. M. Apr 25 '11 at 16:08
"Best" in what sense? – Qiaochu Yuan Apr 25 '11 at 16:24
Hi, Thanks for your answers ,My questions are: A^2=Alpha,B^2=Beta+2*a,C^2=Lambda Where Alpha=2.894812656849533, Beta=-2.159105950538185, Lambda=-0.003583679988243 I need A, B ,C to be best real numbers with a acceptable error to the true ones I will appreciate if you help me – sima bh Apr 27 '11 at 15:20
Why do you need your results to be real? What are you really trying to do? – J. M. Apr 29 '11 at 14:47
for those numbers, I get $A=1.7014148985035$, $B=1.1152236755327$. Only $C$ remains complex (actually, purely imaginary: $C=0.059863845418107\,i$). – lhf Apr 29 '11 at 16:05

The best real approximation to a complex number is its projection onto the real axis, that is, its real part.

-
It depends on what you want to use it for: perhaps its magnitude might be more useful in some cases. – Henry Apr 25 '11 at 16:28
I meant best in the Euclidean sense, that is, the real number closest to a given complex number. And that is its real part. – lhf Apr 25 '11 at 17:55
@Ihf Could you please give some references defending this kind of approximation of complex numbers by its real part in euclidean sense if you have some ? – optimal control Dec 2 '15 at 14:41
@optimalcontrol, it's the standard approximation in inner product vector spaces by orthogonal projection onto a subspace. – lhf Dec 2 '15 at 15:06

You might be interested in Bairstow's method, which allows you to use real approximation techniques to locate the complex conjugate pairs of roots to real polynomials of arbitrary degree.

Effectively one applies a Newton method to find a real quadratic factor of the given real polynomial.

Perhaps a fuller description of your "system of equations" would be helpful.

Added: In response to the system of equations added as a comment (3 times), it seems strange that you ask this. As stated the equation for C is not related to the equations involving A and B, so the "best" real value of C s.t. $C^2$ is negative would be zero. There are of course two purely imaginary exact roots for C. The situation for A and B is not much more complicated. You have two possible exact real roots for $A = \pm \alpha ^ {1/2}$, and for each of these two exact roots for $B = \pm (\beta + 2a)^{1/2}$. One wonders if $A$ and $a$ in your equation for B are meant to be the same value. Otherwise you have quite forgotten to tell us anything about $a$. Assuming it is $A$, then taking the positive root for $A$ allows us to overcome the negative value for $\beta$ and get two exact real roots for $B$. If you take the negative real root for $A$, then obviously the exact roots for $B$ are both purely imaginary (so their closest real approximations would be zero).

I won't go into a lot more detail (all that is required is taking some square roots), but I await your clarification of my suspicion that the equation for C is not complete as given.

-
Hi, Thanks for your answers ,My questions are: A^2=Alpha,B^2=Beta+2*a,C^2=Lambda Where Alpha=2.894812656849533, Beta=-2.159105950538185, Lambda=-0.003583679988243 I need A, B ,C to be best real numbers with a acceptable error to the true ones I will appreciate if you help me – sima bh Apr 27 '11 at 15:18