Given is the equation:
Y^2 = X^3 + 2*X - 3*X*Y
Assuming the plotted sketch is correct.
Y^2 = X^3 + 2*X - 3*X*Y
Hint:
just solve it by 'y'. It's not that difficoult, when you treat x like constant value:
y^2 = x^3 + 2x - 3xy
0 = (-1)y^2 + (-3x)y + (x^3 + 2x)
it's Quadratic equation of:
a = -1
b = -3x
c = x^3 + 2x
y1 = (-(-3x) - sqr((-3x)^2 - 4(-1)(x^3+2x)))/2*(-1)
y2 = (-(-3x) + sqr((-3x)^2 - 4(-1)(x^3+2x)))/2*(-1)
finally:
d = x(9*x+4*x^2+8)
y1 = (3x+sqr(d))/(-2)
y2 = (3x-sqr(d))/(-2)
eg.
for x = 6
y1 = -26,5784
y2 = 8,578396
as you may see from the chart there are always two y matched to one x. I think that is clear enaugh :)
Have you used a math library with support for complex numbers ? MathJs is one. See this SO answer.