1.Use the dichotomy to find the real root of in the section (0,1). However, the tolerance should be 0.01%.
1) Implementing Python
2) Comparing calculation result dichotomy with Newton method
3) To check the relationship between the actual value and thecalculation results
4) Actual values are obtained with Python and compared with resultsusing two algorithms
Thank you. 🙂
Solution
Please find required python code below:
import numpy as np
from scipy.optimize import fsolve
#=============================================================================
def func(x):
return x**5 + 3*x -1
# Derivative of the above function
def derivFunc( x ):
return 5 *x**4 +3
#=============================================================================
# Prints root of func(x)
def bisection(a,b):
 Â
if (func(a) * func(b) >= 0):
print(“You have not assumed