# How to plot this equation for $x,y$?

(1 + r^2 + x)^2 - (-1 + r)^2 ((1 + x)^2 + y^2)=0

2 (2 r^3 + (1 + x)^2 + y^2 - r (-1 + x^2 + y^2))=0


I am trying to plot $x$ and $y$ which are giving by the equations above so what I did is that I solve the second equation for $c$ then substituted the value of $c$ in the first equation and then used the ContourPlot function to plot $x$ and $y$. The problem is that when solving for $c$ in the second equation we get three solutions and each one results in a different plot when substituted in the first equation. Also, there seems to be some disconnect at some areas. Why is this happening and is there a way to fix it?

Thanks.

• Have you tried using Eliminate[] to get rid of c from the system of equations? Commented Nov 18, 2016 at 2:53
• By the way, people here generally like users to post code as Mathematica code instead of images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this this meta Q&A helpful Commented Nov 18, 2016 at 2:53
• @MichaelE2, I have just tried Eliminate and it seems that it does work but what in the case of a more complicated equations when you need to solve for $c$?
– MrDi
Commented Nov 18, 2016 at 2:59
• Do you have such an example? There are going to be uncomputable problems due to the finite limitations of the hardware and software. But have some doubt that there is a pair of polynomials for which you could solve for c but not eliminate it. That's just intuition and I could be wrong. It's also possible that computing Eliminate[] takes much more time, so that it cannot effectively be done. Commented Nov 18, 2016 at 3:28
• There's no c in your equations. I guess you meant r. Commented Nov 18, 2016 at 10:27

soln = {x, y} /. Solve[{
(1 + r^2 + x)^2 - (-1 + r)^2 ((1 + x)^2 + y^2) == 0,
2 (2 r^3 + (1 + x)^2 + y^2 - r (-1 + x^2 + y^2)) == 0},
{x, y}, Reals] // Normal // Simplify

(*  {{-1 - 2*r + r^2,
-Sqrt[(-(-4 + r))*r^3]},
{-1 - 2*r + r^2,
Sqrt[(-(-4 + r))*r^3]}}  *)

ParametricPlot[Evaluate@soln, {r, 0, 4}]


eq = {(1 + r^2 + x)^2 - (-1 + r)^2 ((1 + x)^2 + y^2) == 0,
2 (2 r^3 + (1 + x)^2 + y^2 - r (-1 + x^2 + y^2)) == 0};

el = Eliminate[eq, r]


ContourPlot[Evaluate @ el, {x, -3, 7}, {y, -6, 6}]