How to find Y for corresponding X values (Implicit function, Complex number)

前端 未结 2 1410
南旧
南旧 2021-01-27 07:39

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:

相关标签:
2条回答
  • 2021-01-27 08:25

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

    0 讨论(0)
  • 2021-01-27 08:25

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

    0 讨论(0)
提交回复
热议问题