1.
x = np.arange(0.9, 1.2, 0.1) def g(x): return x**3-1/x # 导数是3*x**2+1/x**2则x=1处k=4. so Tangent line切线由点斜公式计算出:y=4(x-1)+0=4x-4 plot(x, [g(x),4*x-4], 'x', 'g(x)', legend=['g(x)', 'Tangent line (x=1)'])
others.