answersLogoWhite

0


Best Answer

Where the equation is ax2 + bx + c the roots are given by the solutions to :

(-b +/- sqrt(b2 - 4ac))/2a

So you would first input the values of a, b , and c, then calculate [d = b*b - 4*a*c], and then determine whether it is positive or negative. If it is positive [d>0, or d=0], then you can continue:

so the two roots of x are: (-b + sqrt(d))/2/a, and (-b - sqrt(d))/2/a.

If d < 0, then you need to calculate sqrt(-d) and then display -b/2/a as the real part, and +/- sqrt(-d)/2/a as the imaginary parts.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: A program to compute the real roots of the quadratic equation?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

A function to compute the real roots of the quadratic equation?

Where the equation is ax2 + bx + c the roots are given by the solutions to : (-b +/- sqrt(b2 - 4ac))/2a


What are the roots of the quadratic equation below?

That depends on the equation.


What are quadratic equations with real roots?

If the discriminant of the quadratic equation is zero then it will have 2 equal roots. If the discriminant of the quadratic equation is greater than zero then it will have 2 different roots. If the discriminant of the quadratic equation is less than zero then it will have no roots.


Why do you use square roots to solve quadratic equations?

Because it's part of the quadratic equation formula in finding the roots of a quadratic equation.


Can the answer to a quadratic equation be a decimal?

Yes. You can calculate the two roots of a quadratic equation by using the quadratic formula, and because there are square roots on the quadratic formula, and if the radicand is not a perfect square, so the answer to that equation has decimal.


How many roots does a quadratic equation?

2 roots


How do you solve a quadratic equation graphically?

The roots of the quadratic equation are the x-intercepts of the curve.


How many roots does a quadratic equation in one variable have?

A quadratic equation has two roots. They may be similar or dissimilar. As the highest power of a quadratic equation is 2 , there are 2 roots. Similarly, in the cubic equation, the highest power is 3, so it has three equal or unequal roots. So the highest power of an equation is the answer to the no of roots of that particular equation.


How do you formulate quadratic equation that can be solve by extracting square roots?

By using the quadratic equation formula


What is the solving for the roots of quadratic equation?

It is finding the values of the variable that make the quadratic equation true.


What are the roots of a quadratic equation called?

Either "roots" or "solutions".


What is the difference between a radical equation and a quadratic equation?

radical equations have sq roots, cube roots etc. Quadratic equations have x2.