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

∥☆過路亽.° 提交于 2019-12-02 07:50:45

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

lbndev

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!