Question: Write a Matlab program that finds numerically the root (or the zero) of the expression below in the interval 0.0 lessthanorequalto X lessthanorequalto 5.0: squareroot

Write a Matlab program that finds numerically the root (or the zero) of the expression below in the interval 0.0 lessthanorequalto X lessthanorequalto 5.0: squareroot In(x^2 + 1)=atan [exp(5x^3/x^4 + 1] where, squareroot is the squareroot function, atan 0 is the arctangent function, exp0 is the exponential function and In0 is the natural logarithm function. Your program MUST perform the following tasks: Prompt the user to enter a positive integer number n, defined the range 2 lessthanorequalto n lessthanorequalto 15, and then verify if the number entered lies within the specifications. Your program must allow the user to reenter the number WITHOUT THE NEED to rerun the program. The output of your program should be: A plot displaying the function corresponding to the difference between the two sides of the above-defined expression. The x-axis must be defined in the range [0, 5] and the curve must have 1000 evenly spaced points. Label the x-axis and y-axis and add a title to the plot. Determine i) numerically the root (or zero) of the above-defined expression using the BISECTION METHOD (see details below) with a precision better than 10", where n is the number provided by the user, and ii) the corresponding NUMBER of bisections. Both values MUST be displayed inside the plot with an identifying text. Determine numerically the root (or zero) of the above-defined expression using the function fzero()defined in Matlab. Display also the determined value in the same plot with an identifying text.your program MUST also allow the user to START OVER as often he/she wishes, WITHOUT THE NEED to rerun the program. THE BISECTION METHOD: approximates a root of a function (named f) on an interval containing the root. Assume that xL and xR is an interval [xL, xR] where the function has a root. Assume also that the function f is continuous in the interval. If the interval is bisected by computing its midpoint, xM, where x_m = x_L+x_R, then three possible situations may occur: f(xM)=0, then x_M is the root of the function; the root is in the left half of the interval [x_L, x_M]; the root is in the right half of the interval [x_M, x_R]; If |f(x_M)| > 10^-n then the interval (left half or right half) where the root is located is bisected again. This process is repeated until |f(x_M)| lessthanorequalto 10^-n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
