求3/x-sin3x=0 的根的个数(画图)

x 3 s i n ( 3 x ) = 0 \dfrac {x}{3}-sin\left( 3x\right) =0

ef f(t):
    return np.sin(3*t)
def f1(x):
    return x/3
t1=np.arange(-10,10,0.001)
t2=np.arange(-10,10,0.002)
plt.figure(1,figsize=(8,6))
plt.subplot(211)
plt.plot(t1,f(t1))
plt.plot(t2,f1(t2))
plt.show()

发布了51 篇原创文章 · 获赞 5 · 访问量 2136

猜你喜欢

转载自blog.csdn.net/weixin_44659084/article/details/103745030