Question: Please let me know using matlab -6+ 1.10), Write a program to solve the quadratic equation ax + bx + c = 0 using the

 Please let me know using matlab -6+ 1.10), Write a program

Please let me know using matlab

-6+ 1.10), Write a program to solve the quadratic equation ax" + bx + c = 0 using the standard quadratic formula -btv62 hac 2a or the alternative formula 2c -b I/62 hac Your program should accept values for the coef- ficients a, b, and c as input and produce the two roots of the equation as output. Your program should detect when the roots are not real, but need not use complex arithmetic explicitly (for exam- ple, you could return the real and imaginary parts of the complex conjugate roots in this case). You should guard against unnecessary overflow, under- flow, and cancellation. When should you use each of the two formulas? Try to make your program robust when given unusual input values, such as 0 or c= 0, which otherwise would make one of the formulas fail. Any root that is within the range of the floating-point system should be com- puted accurately, even if the other is out of range. Test your program using the following values for the coefficients: a 6 6 5 6 x 10154 - 4 x 10154 0 1 1 1 1 3.999999 a = 5 x 10154 1 -106 10-165 -10155 10155

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!