Assignment 3 ============ Due: 18th, Feb. Weight: 30 Send to: HUQ0 Root Finding ------------ This assignment is to be done in the EMF using FORTRAN 90. Engineering and scientific problems often require the calculation of the roots of a function or equation for their solution; that is, those values of such that F(x) = 0. Pratical example might be estimating when a car will run out of gas for a given terrain profile and performance demand. For this assignment, you will be given a function F(x) for which you will have to estimate the root of the function on an interval [a,b]., i.e., a<= XR <= b such that F(XR) = 0. We will use the bissection method to estimate the root of F(x). We start with an interval [a,b] containing a single root. This means the arithmetic sign of F(a) and F(b) will be different (one positive, one negative). The general idea is to compute the interval midpoint Xm, which then replaces the interval limit with matching sign. For instance, if we assume that F(a) is positive and F(b) is negative. If the equation value at the midpoint Xm is negative, the root falls in the interval between a and Xm; if the equation value at the midpoint is positive, the root falls in the interval between Xm and b. We have halved the interval within which the root lie. We now repat the steps in this iterative algorithm, halving the interval of interest with each iteration. There are many ways to decide when to stop the iterative process. In this application, we stop the the process when we find the root (i.e., F(Xm) = 0) or when the interval of interest is less than a small positive constant Delta. For this assignment you have to approximate the root of a polynomial F(X) within the interval [-5, 5], where F(X) has the following form: F(x) = A* X**4 + B* X**3 + C* X**2 + D* X + E You may assume that Delta = 0.001. The input to the program is the polynomial coeficients A, B, C, D, and E. The output should be the equation for the polynomial and any roots that were found. If there are no roots for the polynomial in the given interval, print an appropriate message. - Make sure that your variable names are representative of their use. - Comment your program so someone else (me!) can easily understand what it does. - Good luck. - This is the data you will be using for this assignment: /DATA 0.0 1.0 -2.125 -25.0 53.125 0.0 0.0 1.0 14.0 3.0 3.0 -12.4 -26.29 29.766 0.0 0.0 0.0 1.234 -1.2 10.44 0.0 0.0 0.0 3.0 -2.5 0.0 0.0 0.0 0.0 0.0 <--All Zeros to quit ===================================================