0

Given is the equation: Y^2 = X^3 + 2*X - 3*X*Y
Assuming the plotted sketch is correct. enter image description here

Y^2 = X^3 + 2*X - 3*X*Y

Hint:

Y^2 + X^2 =1  ==>  Y= sqrt( 1 - X^2 )

The X values are known.
How can I find the corresponding Y values for X values? E.g. for known X-Values, I expect something like below listed Y-Values (see the plotted sketch):

X= 1 ; Y=0.79
X=2 ; Y=1.58
X=3 ; Y=2.79
X=4 ; Y=4.39
X=5 ; Y=6.33
X=6 ; Y=8.57 
X=7 ; Y=11.12 
X=8 ; Y=13.92
X=9 ; Y=16.98
X=10 ; Y= 20.29

E.g. I will try to find Y for X=6; then Y will be calculated as follws:

Y^2+X^2=1  ==>  Y=sqrt(1 - X^2) = sqrt(1-36) = sqrt(-35) = (0, 5.92i );

Thus:

Y^2 = X^3 + 2*X - 3*X*Y = (228 , -106,49i)

Y = sqrt( 228 , -106,49i) = (15.49 , -3.44i)

Sadly, the calculated Y is wrong! I expect something like (6, 8.57i). But how can I find Y?

Thanks in advance.

4
  • 1
    What does this have to do with JavaScript? Math SE might be a better fit for this question.
    – Joe Clay
    Mar 28, 2017 at 14:23
  • I assume he tries to implement the calculation in javascript.
    – lbndev
    Mar 28, 2017 at 14:29
  • They really should clarify that then, as there's literally nothing related to programming in their question as it stands right now.
    – Joe Clay
    Mar 28, 2017 at 14:30
  • I don't know why is this question got -2 points? Would you make it backward please? "JavaScript" because I mean, I don't want to use a library (see below, for example the anwser of lbndev). Mar 28, 2017 at 14:46

2 Answers 2

2

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 :)

7
  • What is your final result, e.g. For X = 6? I expect e.g. For X = 6 something like 8.57 (see the above X-Y list or the sketch). X isn't constant, it is a variable! Mar 28, 2017 at 15:04
  • I know it's not a constant, but it need to act like it to make this easy to solve. Now you can just past x into this and everything will work ok, as far as I remember quadric equations from primary school :) Mar 28, 2017 at 15:09
  • Thanks already ^ 3. It seems to work. But I have not understood it yet. I still need time to get it. Maybe would be possible to adapt the below equations? (X^2+y^2-1)^3-x^2y^3=0 ; X^3+y^3=3xy^2-x-1 ; X^3+y^2=6xy/sqrt(y/x) ; cos (PI* Y)=cos (PI.X) ; Because I need them to test and study, in order to understand the approach of solve such equations. I thank you for your efforts and appreciate it. Mar 28, 2017 at 16:02
  • just translate "Quadratic equation" to your language and you'll get everything :) you can, almost always solve equasion with two variables. If not you need to know more about "entangled functions", but this is more complexed topic (I had it on university). However all your equasions are solvable. Just pretend x is an constant, solve and here you go! you have answer. Mar 28, 2017 at 16:29
  • Maybe you want see my new question for complex-equestion here:Algorithm which adapt (solve) the complex equations ( implicit function f(x,y) ) Mar 28, 2017 at 22:02
0

Have you used a math library with support for complex numbers ? MathJs is one. See this SO answer.

1
  • Thanks for your answer. Mar 29, 2017 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.