Question: Write a MATLAB program in a script file that determines the real roots of a cubic equation. The following procedure can be used to determine

Write a MATLAB program in a script file that determines the realWrite a MATLAB program in a script file that determines the real roots of a cubic equation.

The following procedure can be used to determine the roots of a cubic equation a_3x^3 + a_2x^2 + a_1x + a_0 = 0: Set: A = a_2/a_3, B = a_1/a_3, and C = a_0/a_3. Calculate: D = Q^2 + R^2 where Q = (3B - A^2)/9 and R = (9AB - 27C - 2A^3)/54. If D > 0, the equation has complex roots. If D = 0, all roots are real and at least two are equal. The roots are given by: x_1 = 2 cube root R - A/3, and x_2 = x_3 = - cube root R - A/3. If D

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!