Question: I need the source code in MATLAB. Thank you.. Cancellation, Precision and Loss of Precision. Consider finding the roots of the quadratic polynomial, f(x) =

 I need the source code in MATLAB. Thank you.. Cancellation, Precision

I need the source code in MATLAB. Thank you..

Cancellation, Precision and Loss of Precision. Consider finding the roots of the quadratic polynomial, f(x) = ax^2 + bx + c. Suppose we are trying to solve this equation for a = 0.5, b = 1000, c=5 times 10^-7. The quadratic formula says that one of the roots is, x = -b + squareroot b^2 - 4ac/2a Use the Loss of Precision Theorem (with base 10) to establish the number of accurate digits in the root. Recall that double precision numbers give about 15 or 16 decimal digits of precision. Compute the "true" root using the Matlab roots function. Compute the root in Matlab using the formula in Equation (1). How accurate is your result? Does it agree with your answer in part (a)? Modify the above formulation of the quadratic formula to remove this problem. Verify your results by computing the root with the new formulation in Matlab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!