Question: Consider the function f(x) = 1/4 - sin(4x)/x. Given a function bisection, write a python function multi_bisection to compute all 10 roots of f(x). bisection
Consider the function f(x) = 1/4 - sin(4x)/x. Given a function bisection, write a python function multi_bisection to compute all 10 roots of f(x). bisection function:



jupyter b File Edit View Language isection.py Last Saturday at 5:37 PM 1 def different_sign(a, b): return a * b 0.0 3 4 def bisection (func, low, high, n max): assert different_sign(func(low), func(high)) for i in range(n_max): midpoint = (low + high) / 2.0 if different_sign(func(ow), func(midpoint)): 9 10 high = midpoint else: low = midpoint 12 13 4 return midpoint 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
