- 1 Write A Matlab User Defined Function That Solves For A Root Of A Nonlinear Equation F X 0 With The Bisection Meth 1 (57.72 KiB) Viewed 32 times
(1) Write a MATLAB user-defined function that solves for a root of a nonlinear equation f(x) = 0 with the bisection meth
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
(1) Write a MATLAB user-defined function that solves for a root of a nonlinear equation f(x) = 0 with the bisection meth
(1) Write a MATLAB user-defined function that solves for a root of a nonlinear equation f(x) = 0 with the bisection method. Use 'a' and 'b' symbols to bracket the root, and TolMax' as the maximum tolerance. The program should also include the following features: i) Check if points 'a' and 'b' are on opposite sides of the solution. If not, the program should stop and display an error message. ii) The number of iterations should be determined before the iteration are carried out. (2) Use the developed user-defined function to: a) determine the root of f(x) = x² - e* Start with a = 0 and b = 1 and maximum tolerance use 10-2. b) The location of the centroid of a circular sector is given by: 2rsine 30 Ө First, derive the equation that must be solved and then determine the angle for which x = 1/2. Start with a = 1 and b = 2 and maximum tolerance use 10-². 0