MATH 4330 HOMEWORK1, DUE Sept. 14, 2017 1. (6 points) This problem will demonstrate that sometimes two equivalent calcula- tions in mathematics may lead to different results in computer finite-digit arithmetic- We know the roots of ax2 +bx +c are given the quadratic formula 2a Consider the quadratic equation 2a x2 + 6 × 10°x + 1 =0, whose roots are approximately 지 =–1666666666671 29629629632201646 × 10.6, X2 5.99999999998333333333328703704 x 105, (a) Use the quadratic formula to compute the roots, the relative errors (using the approximate roots provided above), and the number of significant digits. Why are significant digits lost for x1? (b) Now we consider a mathematically equivalent formula. For x1, we rationalize the numerator 2c 2a Use this formula to compute xi, the relative error (using the approximate roots pro- vided above), and the number of significant digits. Why are significant digits of xi restored? (c) Can we apply this strategy to compute x2? Why? 2. (4 points) (a) Write a Matlab script to plot the function e [0, 1] in a black solid line with step 0.01. On the same graph, plot the function 1 +x+/2 with step 0.1 in blue circles. Add legend ‘exponential function’ ad Taylor expansion’ (b) Write a Matlab script to plot the function log(x+1) on [1/2, 1/2] in a red solid line. On the same graph, plot the function x -/2+d/3 in black circles. Add legend logarithm function and Taylor expansion Page 1 of 1