在Python中求解和绘制方程

时间:2014-12-01 20:52:31

标签: equations

我是python的新手。我所要做的就是解决y并绘制函数, 换句话说,插入x的值并生成y。

y^10+y = x.

请原谅我的无知。

1 个答案:

答案 0 :(得分:0)

from numpy import *
from matplotlib.pyplot import plot, show

y = arange(-10, 10, 0.01) #get values between -10 and 10 with 0.01 step and set to y
x = y**10 + y #get x values from y

plot(x, y)
show()

Plot result

使用matplotlib和numpy库:http://scipy.org/

如果您想解决问题,请使用sympy:https://github.com/sympy/sympy/wiki/Quick-examples