Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions