Calculator Work with quadratic functions
Quadratic equation solver
In one sentence
Solves ax² + bx + c = 0 and reports the discriminant, the nature of the roots and both solutions in exact and decimal form.
Last checked Source: uk-dfe-alevel-maths-subject-content Source: Department for Education, GCE AS and A level subject content for mathematics (topics derived; every example and value computed here), uk-dfe-alevel-maths-subject-content www.gov.uk (opens in a new tab)
Key facts
Quadratic equation solver
- Formula ref
- x = (−b ± √(b² − 4ac)) / 2a
- Topic
- Work with quadratic functions
Inputs
- a: coefficient of x², not zero
- b: coefficient of x
- c: constant term
Worked input
- Input a = 2, b = −7, c = 3.
- Discriminant = −7² − 4×2×3 = 25, which is positive, so two distinct real roots.
- Roots: x = 1/2 and x = 3.
- Take x² − 6x + 9 = 0, a quadratic whose discriminant is exactly zero, so the two roots merge into one repeated root. The discriminant is 0 and the single root is x = −b/2a = 3. Repeated roots are the case examiners love, because a student who writes two different answers has not noticed that the formula gives the same value on both branches of the plus or minus sign. Check: the left side is the perfect square (x − 3)², which vanishes only at x = 3 and touches the axis there without crossing it.
- Take x² + 2x + 5 = 0, a quadratic whose discriminant is negative, so the tool must report that there are no real roots instead of printing a number. The discriminant is −16, the square root of a negative number is not real, and the working stops there. Never write a square root of a negative number as an answer at this level, because the specification only asks you to state that there are no real roots and to say why, usually by quoting the sign of the discriminant. Check: completing the square gives (x + 1)² + 4, which is at least 4 for every real x, so the curve never reaches the axis.
- Take x² − 2x − 1 = 0, a quadratic with a positive discriminant that is not a perfect square, so both roots stay as surds. The discriminant is 8, so x = (2 ± √8)/2 = 1 ± √2, which is about 2.4142 and −0.4142. Leave a surd answer exact unless the question asks for decimals, because the exact form carries full accuracy and shows the method, while the rounded form can only lose marks when it is used in a later step. Check: the two roots add to 2, which is −b/a, and multiply to −1, which is c/a.
How to use it
- Rearrange the equation so one side is zero.
- Enter a, b and c with their signs.
- Read the discriminant first: negative means no real roots.
- Substitute each root back to check.
Quadratic equation solver in your study of A-level maths, set out with its source.
See also Line and circle intersection, Sum and product of roots calculator, Simultaneous linear equations solver and Quadratic turning point calculator.
Study brief
- Students preparing for the Level 3 Advanced GCE in Mathematics must master several algebraic processes involving quadratic functions. One essential tool is the discriminant, expressed as b2 – 4ac. This value determines the nature of the roots, specifically whether they are real or repeated based on whether b2 – 4ac is greater than 0, equal to 0, or less than 0. Another method for handling these functions is completing the square, which transforms the equation ax2 + bx + c into the form a(x + b/2a)2 + c - (b2/4a). Beyond basic solving, learners should be able to address simultaneous equations containing one linear and one quadratic equation, such as y = 2x + 3 and y = x2 – 4x + 8. The curriculum also requires solving linear and quadratic inequalities in a single variable. For example, px2 + qx + r ≥ 0 or ax + b > cx + d. These inequalities can be interpreted graphically by examining where a curve like y = px2 + qx + r sits in relation to a line like y = ax + b. Solutions can be expressed using set notation, such as {x : x < a} ∪ {x : x > b}, or through the use of 'and' and 'or' conjunctions.
Practise for free
Test yourself with exam-style questions and see why each answer is right or wrong.
More from Work with quadratic functions
-
Completing the square calculator
Writes ax² + bx + c as a(x + p)² + q and gives the turning point.
-
Discriminant calculator
Evaluates b² − 4ac and classifies the quadratic as having two real roots, one repeated root or none.
-
Quadratic from its roots
Builds the quadratic with given roots α and β and expands it.
-
Quadratic turning point calculator
Finds the vertex of y = ax² + bx + c and says whether it is a maximum or a minimum.
-
Sum and product of roots calculator
Gives α + β and αβ from the coefficients without solving.