The bisection method was discussed in the lecture. Write a function bisect (f, left, right, tol) which takes four arguments: the function you want to find a root of, the left and right endpoints of the interval at the start, and the tolerance. The function should apply the bisection method until endpoints of the interval are within the given tolerance. Use lambda functions to call bisect with different input functions. Use it to solve the following to some reasonable tolerance: 1. Find three values of x for which f(x) = x³ + 2x² - x - 1 is zero. 2. Find the cube root of 7. 3. Find both solutions to tan-¹(x) = 3 - x². 4. Find all solutions to log(x¹) = x³ – 1. For each of these you may want to first plot the function in order to select sensible initial estimates for the roots. Remember, for the bisection method you must supply initial guesses which bracket the root. Explain what happens when you try to apply bisection method to the function f(x) = 1/x, with initial guesses -2 and 3.
The bisection method was discussed in the lecture. Write a function bisect (f, left, right, tol) which takes four arguments: the function you want to find a root of, the left and right endpoints of the interval at the start, and the tolerance. The function should apply the bisection method until endpoints of the interval are within the given tolerance. Use lambda functions to call bisect with different input functions. Use it to solve the following to some reasonable tolerance: 1. Find three values of x for which f(x) = x³ + 2x² - x - 1 is zero. 2. Find the cube root of 7. 3. Find both solutions to tan-¹(x) = 3 - x². 4. Find all solutions to log(x¹) = x³ – 1. For each of these you may want to first plot the function in order to select sensible initial estimates for the roots. Remember, for the bisection method you must supply initial guesses which bracket the root. Explain what happens when you try to apply bisection method to the function f(x) = 1/x, with initial guesses -2 and 3.
Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step 1: Writing the given information
VIEWStep 2: Coding the function bisect
VIEWStep 3: Applying the bisect function to (1)
VIEWStep 4: Applying the bisect function to (2)
VIEWStep 5: Applying the bisect function to (3)
VIEWStep 6: Applying the bisect function to (4)
VIEWStep 7: Executing the codes in Python
VIEWStep 8: Analysing the bisection method for 1/x
VIEWSolution
VIEWStep by step
Solved in 9 steps with 17 images
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,