2: solve the roots of the equation through iteration methods, Newton, secant method Some hints: import numpy as np impor
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
2: solve the roots of the equation through iteration methods, Newton, secant method Some hints: import numpy as np impor
2: solve the roots of the equation through iteration methods, Newton, secant method Some hints: import numpy as np import matplotlib.pyplot as plt f=lambda x:x**2-2*x xi=lambda x:np.sqrt(2*x) xrange=np.arange(0,5.2,0.1) plt.figure() plt.plot(xrange,f(xrange)) plt.hlines(0,0,plt.xlim([1]) def plot(x,color='g'): plt.hlines(f(x),0,x,color, '--') plt.vlines(x,0,f(x),color, '--')
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!