The easiest way to write a generic algorithm is to simply use the quadratic formula. If it is a computer program, ask the user for the coefficients a, b, and c of the generic equation ax2 + bx + c = 0, then just replace them in the quadratic formula.
Chat with our AI personalities
When you need to find the roots of a quadratic equation and factorisation does not work (or you cannot find the factors). The quadratic equation ALWAYS works. And when appropriate, it will give the imaginary roots which, judging by this question, you may not yet be ready for.
This quadratic equation has no real roots because its discriminant is less than zero.
-- The roots of a quadratic equation are the values of 'x' that make y=0 . -- When you graph a quadratic equation, the graph is a parabola. -- The points on the parabola where y=0 are the points where it crosses the x-axis. -- If it doesn't cross the x-axis, then the roots are complex or pure imaginary, and you can't see them on a graph.
The quadratic formula can be used to find the solutions of a quadratic equation - not a linear or cubic, or non-polynomial equation. The quadratic formula will always provide the solutions to a quadratic equation - whether the solutions are rational, real or complex numbers.
ax+b=)