Search code examples
mathwolfram-mathematicaequation-solving

How to identify the roots of an equation by plotting it's real and imaginary parts


This is more of a general Maths question (might be silly even). But in high school we learn to identify the roots of an equation via it's plot right. For example, for the equation

y = x^2 - 1

The blue line would show us the roots. This is when the blue line crosses x, so +- 1.

enter image description here

Now, if we said that the equation had a real and an imaginary part, so that it is

y = x^2 - 1 + (x^2 - 0.5)i 

as given in the Mathematica screenshot, then we have a real part which crosses zero, and an imaginary part which also crosses zero but at a different x. So my question is: is it possible to identify the roots of such an equation by simply looking at the real and imaginary parts of the plot?

Note: part of my confusion is that if I use FindRoot, in Mathematica, I get either 0.877659 - 0.142424i or -0.877659 + 0.142424i. So might be some fundamental property in Maths I don't know about which prevents one from identifying roots of a complex function through separating real and imaginary parts...


Solution

  • we have a real part which crosses zero, and an imaginary part which also crosses zero but at a different x.

    Those are graphs of the real and imaginary parts plotted for real values of x. If they both crossed the horizontal axis at the same point(s), that would mean the equation has real root(s), since both real and imaginary parts would be zero for some real value of x. However, this equation has no real roots, so the crossing points are different.

    So my question is: is it possible to identify the roots of such an equation by simply looking at the real and imaginary parts of the plot?

    f(x) = x^2 - 1 + i (x^2 - 0.5) is a complex function of a complex variable, which maps a complex variable x = a + i b to the complex value f(x) = Re(f(x)) + i Im(f(x)).

    Each of Re(f(x)) and Im(f(x)) is a real function of a complex variable. Such functions can be plotted in 3D by representing x = a + i b as a point in the (a, b) plane, and the value of the function along the third dimension, say c. For example, f(x) has the following graphs for the real and imaginary parts.

    enter image description here

    The cross-sections of the two surfaces by the horizontal plane c = 0 are pairs of curves where each function is zero, respectively. It follows that the intersections of those curves are the points where Re(f(x)) = Im(f(x)) = 0, which means they are the roots of the equation f(x) = 0.

    enter image description here

    Since f(x) = 0 is a quadratic equation, it must have two roots, and those two points are in fact ±(0.877659 - 0.142424 i), as can be verified by direct calculation.