Question: For a given quadratic equation ( a x 2 + b x + c = 0 ) . We know that there are two possible

For a given quadratic equation (ax2+bx+c=0). We know that there are two possible
roots. The roots may be: real, real but equal, and complex.
x2-4x+4=0 has real equal roots : x=2 and x=2
x2-4x+7=0 has complex roots: x=2+i*1.732 and x=2-i*1.732
x2-5x-14=0 has real roots x=-7 and x=2
We determine the root type for a given quadratic formula by look at the discriminant.
discriminant =b2-4ac
If discriminant 0, then the roots will be complex
If discriminant =0, then the roots are equal and real
If discriminant >0, then the roots are non-equal and real
Write an m-file that asks a user for the coefficients a,b, and c from a quadratic
equation. Then, use conditional statements to determine the discriminant and decide the
type of roots and print the type of roots - you don't actually have to find the roots.
 For a given quadratic equation (ax2+bx+c=0). We know that there are

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!