I already tried to ask this question, but it was unclear what I meant, so I will try to ask it again and explain it more carrefully.
For example I will use a toy problem. Suppose we have equation:
eq=k*x^2 + 2*x + 1
I want to use ContourPlot, to plot the curves where eq=0 for some values of x andk. If x and k are both real, this is easy to do:
ContourPlot[eq == 0, {k, 0, 2}, {x, -3, 3}]
But I want to treat x as complex variable, and k as real variable. For any real k we have 2 complex roots of the equation eq==0. I am not interested in Im[x], I only interested in Re[x]. So want I want is something like this:
ContourPlot[eq == 0, {k, 0, 2}, {Re[x], -3, 3}]
So, for each k, it should solve the equation eq==0, and plot Re[x] against k, omitting Im[x]. I want 2D plot, I don't want 3D plot. (My original problem is linear stability analythis, where x is groth rate, k is wave number).
Say it another way: basically, we have here 3 parameters (complex x + real k). I want to plot Re[x] against k, ignoring Im[x], so it is like a projection of 3D curve to 2D surface.
Note: Plotting Complex Quantity Functions doesn't solve my problem.
Note:
Manipulate[ContourPlot[k (reX + imX I)^2 + 2 (reX + imX I) + 1 == 0, {k, 0, 2}, {reX, -3, 3}], {imX, -3, 3}]
Doesn't solve it as well: I don't want to manipulate Im[x], I want to omit it, whatever it is.



![k vs Re[x]](../../images/4d622ff27f2061696f91612fb67abecb.webp)
Re[x],Im[x], k) to 2D space (with only 2 parameters:Re[x]andk) – Mikhail Genkin Sep 22 '15 at 17:32k, you can solve the equation and find 2 complex roots. So I want to plot real part of this roots againstk, omitting imaginary part of the roots. Where did you find freedom?? – Mikhail Genkin Sep 22 '15 at 17:33x = Re[x] + I Im[x]? Or will have you have imaginary numbers inside special functions like, say,Erf? – march Sep 22 '15 at 17:46ContourPlot, rather then solving it exactly – Mikhail Genkin Sep 22 '15 at 18:04ContourPlotmethod is very clever. I'm working on another method that requires the separability, but it's hard to get it to work, so I may not end up posting an answer. – march Sep 22 '15 at 18:13