Quadratic Equations
An equation of the form
$$ax^2+bx+c=0,$$where $a,$ $b$ and $c$ are given numbers and ${a\ne 0},$ is called a quadratic equation (an equation of the second degree).
The numbers $a,$ $b$ and $c$ are the coefficients of the equation: $a$ is the coefficient of $x^2$ (the leading coefficient), $b$ is the coefficient of $x,$ and $c$ is the constant term. The condition ${a\ne 0}$ matters: with ${a=0}$ we are left with ${bx+c=0},$ which is a linear equation.
Examples. Before reading off the coefficients, move all terms to the left side of the equals sign. The sign in front of each term is part of its coefficient.
- ${2x^2-5x-3=0}$: ${a=2},$ ${b=-5},$ ${c=-3}$
- ${x^2-9=0}$: ${a=1},$ ${b=0},$ ${c=-9}$
- ${-x^2+4x=0}$: ${a=-1},$ ${b=4},$ ${c=0}$
- ${3x^2=2x+1}$ is written as ${3x^2-2x-1=0}$: ${a=3},$ ${b=-2},$ ${c=-1}$
When ${a=1},$ the equation ${x^2+px+q=0}$ is called monic. Any quadratic equation can be made monic by dividing both sides by $a.$
A number that satisfies the equation is called a root (or solution) of the equation. For example, ${x=3}$ is a root of ${2x^2-5x-3=0},$ because ${2\cdot 3^2-5\cdot 3-3}={18-15-3}={0}.$
On this page: Incomplete equations · Quadratic formula · Solver · Derivation · Vieta's formulas · Factoring · Parabola · Reducible equations · Solved problems · With a parameter · Common mistakes · Practice
Incomplete Quadratic Equations
If ${b=0}$ or ${c=0},$ the equation is called incomplete. Such equations are solved quickly, without the quadratic formula.
| Type | How to solve it | Roots |
|---|---|---|
| ${c=0}$: ${ax^2+bx=0}$ | factor out $x$: ${x(ax+b)=0}$ | ${x_1=0},$ ${x_2=-\frac{b}{a}}$ |
| ${b=0}$: ${ax^2+c=0}$ | ${x^2=-\frac{c}{a}}$ | ${x_{1,2}=\pm\sqrt{-\frac{c}{a}}}$ if ${-\frac{c}{a}\gt 0};$ no real roots if ${-\frac{c}{a}\lt 0}$ |
| ${b=c=0}$: ${ax^2=0}$ | ${x^2=0}$ | ${x=0}$ |
Examples
- ${3x^2-12x=0},$ that is ${3x(x-4)=0}.$ A product is zero when at least one of its factors is zero: ${x_1=0},$ ${x_2=4}.$
- ${2x^2-18=0},$ that is ${x^2=9},$ so ${x_{1,2}=\pm 3}.$
- ${4x^2-3=0},$ that is ${x^2=\frac34},$ so ${x_{1,2}=\pm\frac{\sqrt3}{2}}.$
- ${x^2+9=0},$ that is ${x^2=-9}.$ The square of a real number is never negative, so the equation has no real roots.
- ${5x^2=0},$ that is ${x=0}.$
Do not divide by $x.$ Dividing ${3x^2=12x}$ by $x$ gives only ${x=4}$ and loses the root ${x=0}.$ The right way: ${3x^2-12x=0},$ ${3x(x-4)=0},$ so ${x_1=0},$ ${x_2=4}.$
The Quadratic Formula and the Discriminant
Every quadratic equation can be solved with one formula.
If ${b^2-4ac\ge 0},$ the roots of the equation ${ax^2+bx+c=0}$ are
$$x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$The number ${D=b^2-4ac}$ under the square root is called the discriminant (it is also written $\Delta$). Its sign tells how many real roots the equation has.
| Discriminant | Number of real roots | Roots |
|---|---|---|
| ${D\gt 0}$ | two distinct | ${x_{1,2}=\frac{-b\pm\sqrt{D}}{2a}}$ |
| ${D=0}$ | one (a double root) | ${x_1=x_2=-\frac{b}{2a}}$ |
| ${D\lt 0}$ | none (two complex conjugate roots) | — |
Why the root is called double when ${D=0}$ becomes clear when we factor: then ${ax^2+bx+c=a(x-x_1)^2}.$
How to solve a quadratic equation
- Write the equation in the form ${ax^2+bx+c=0}$ and read off $a,$ $b$ and $c$ together with their signs.
- Compute the discriminant ${D=b^2-4ac}.$
- Depending on the sign of $D,$ find the roots or conclude that there are no real roots.
- Check: substitute the roots into the equation or use Vieta's formulas.
Example 1. ${x^2+3x-4=0}.$ Here ${a=1},$ ${b=3},$ ${c=-4}.$
${D}={3^2-4\cdot 1\cdot(-4)}={9+16}={25}$
${x_{1,2}}={\frac{-3\pm\sqrt{25}}{2\cdot 1}}={\frac{-3\pm 5}{2}}$
${x_1=\frac{-3-5}{2}=-4},$ ${x_2=\frac{-3+5}{2}=1}$
Check: ${(-4)^2+3\cdot(-4)-4}={16-12-4}={0}$ and ${1^2+3\cdot 1-4=0}.$
Example 2. ${4x^2-12x+9=0}.$ Here ${a=4},$ ${b=-12},$ ${c=9}$ and
${D}={(-12)^2-4\cdot 4\cdot 9}={144-144}={0}$
The equation has one root: ${x=-\frac{b}{2a}=\frac{12}{8}=\frac32}.$ Indeed, ${4x^2-12x+9=(2x-3)^2},$ which is zero only for ${x=\frac32}.$
Example 3. ${x^2-2x+5=0}.$ Here ${D}={(-2)^2-4\cdot 1\cdot 5}={4-20}={-16}\lt{0},$ so the equation has no real roots. You can also see it like this: ${x^2-2x+5=(x-1)^2+4},$ and a square plus 4 is at least 4, so it is never zero.
Example 4. ${x^2-4x+1=0}.$ Here ${D}={(-4)^2-4\cdot 1\cdot 1}={12}$ and ${\sqrt{12}=\sqrt{4\cdot 3}=2\sqrt3}$:
${x_{1,2}}={\frac{4\pm 2\sqrt3}{2}}={\frac{2(2\pm\sqrt3)}{2}}={2\pm\sqrt3}$
Divide both terms of the numerator by 2. The roots are ${x_1=2-\sqrt3\approx 0.27}$ and ${x_2=2+\sqrt3\approx 3.73}.$
Example 5. ${-2x^2+x+6=0}.$ It is convenient to multiply by $-1$ first, so that the leading coefficient is positive: ${2x^2-x-6=0}.$ The roots do not change.
${D}={(-1)^2-4\cdot 2\cdot(-6)}={1+48}={49},$ ${x_{1,2}=\frac{1\pm 7}{4}},$ ${x_1=-\frac32},$ ${x_2=2}$
If the coefficients are fractions or decimals, multiply by a suitable number to make them integers. For example, ${0.5x^2-1.5x+1=0}$ multiplied by 2 becomes ${x^2-3x+2=0},$ with roots 1 and 2.
The Formula for an Even Coefficient of x
If ${b=2k},$ the formula becomes simpler. Then ${D}={4k^2-4ac}={4(k^2-ac)}$ and the factor 2 cancels:
The number ${D_1=k^2-ac=\frac{D}{4}}$ has the same sign as $D.$
For example, for ${x^2-4x+1=0}$ we have ${k=-2},$ ${D_1=4-1=3}$ and directly ${x_{1,2}=2\pm\sqrt3},$ with nothing to cancel. For ${3x^2+10x+3=0}$ we have ${k=5},$ ${D_1=25-9=16}$ and ${x_{1,2}=\frac{-5\pm 4}{3}},$ that is ${x_1=-3},$ ${x_2=-\frac13}.$
Quadratic Equation Solver
Enter the coefficients $a,$ $b$ and $c.$ They can be integers, decimals (such as 0.5) or fractions (such as 1/3). An empty box for $b$ or $c$ means 0. The solver finds the discriminant and the exact roots, checks them with Vieta's formulas, factors the quadratic and finds the vertex of the parabola.
Derivation of the Quadratic Formula
The formula comes from completing the square. Divide the equation ${ax^2+bx+c=0}$ by ${a\ne 0}$ and move the constant term to the right:
${x^2+\frac{b}{a}x=-\frac{c}{a}}$
The term ${\frac{b}{a}x}$ is twice the product of $x$ and ${\frac{b}{2a}}$: ${\frac{b}{a}x=2\cdot x\cdot\frac{b}{2a}}.$ Add ${\left(\frac{b}{2a}\right)^2=\frac{b^2}{4a^2}}$ to both sides, and the left side becomes a perfect square:
${x^2+2\cdot x\cdot\frac{b}{2a}+\frac{b^2}{4a^2}}={\frac{b^2}{4a^2}-\frac{c}{a}}$
${\left(x+\frac{b}{2a}\right)^2=\frac{b^2-4ac}{4a^2}}$
The denominator ${4a^2}$ is positive, so the right side has the sign of ${D=b^2-4ac}.$
- If ${D\lt 0},$ the right side is negative, and a square cannot be negative. There are no real roots.
- If ${D=0},$ we get ${x+\frac{b}{2a}=0},$ that is ${x=-\frac{b}{2a}}.$
- If ${D\gt 0},$ take square roots: ${x+\frac{b}{2a}=\pm\frac{\sqrt{D}}{2a}}.$ (Strictly, ${\sqrt{4a^2}=2|a|},$ but the $\pm$ sign already covers both signs.) Therefore ${x_{1,2}=\frac{-b\pm\sqrt{D}}{2a}}.$
Vieta's Formulas
The roots of a quadratic equation are related to its coefficients in a very simple way. These relations are named after the French mathematician François Viète (1540–1603). He was the first to use letters not only for the unknowns but also for the given numbers in equations, which made general formulas like the ones below possible.
Vieta's theorem. If $x_1$ and $x_2$ are the roots of the equation ${ax^2+bx+c=0}$ (${a\ne 0},$ ${D\ge 0}$), then
$$x_1+x_2=-\frac{b}{a},\qquad x_1x_2=\frac{c}{a}$$For the monic equation ${x^2+px+q=0}$: ${x_1+x_2=-p},$ ${x_1x_2=q}.$
In words: for a monic equation, the sum of the roots equals the coefficient of $x$ with the opposite sign, and their product equals the constant term.
Proof. Let ${x_1=\frac{-b-\sqrt{D}}{2a}}$ and ${x_2=\frac{-b+\sqrt{D}}{2a}}.$ Add them and multiply them (the numerators of the product give a difference of squares):
${x_1+x_2}={\frac{-b-\sqrt{D}-b+\sqrt{D}}{2a}}={\frac{-2b}{2a}}={-\frac{b}{a}}$
${x_1x_2}={\frac{(-b-\sqrt{D})(-b+\sqrt{D})}{4a^2}}={\frac{b^2-D}{4a^2}}={\frac{b^2-(b^2-4ac)}{4a^2}}={\frac{4ac}{4a^2}}={\frac{c}{a}}$
When ${D=0}$ the two roots coincide and the formulas still hold: ${x_1+x_2}={2\cdot\left(-\frac{b}{2a}\right)}={-\frac{b}{a}}$ and ${x_1x_2=\frac{b^2}{4a^2}=\frac{c}{a}},$ because ${b^2=4ac}.$
Example. The roots of ${2x^2-5x-3=0}$ are ${x_1=3}$ and ${x_2=-\frac12}.$ Indeed,
${x_1+x_2}={3-\frac12}={\frac52}={-\frac{-5}{2}},$ ${x_1x_2}={3\cdot\left(-\frac12\right)}={-\frac32}={\frac{-3}{2}}$
First check that there are roots. Vieta's formulas are about roots that exist. For ${x^2+2x+5=0}$ we would “get” the sum $-2$ and the product 5, but ${D=4-20=-16\lt 0},$ so there are no real roots. There are no two real numbers with sum $-2$ and product 5 either.
The Converse of Vieta's Theorem
If the numbers $x_1$ and $x_2$ satisfy ${x_1+x_2=-p}$ and ${x_1x_2=q},$ then $x_1$ and $x_2$ are the roots of the equation ${x^2+px+q=0}.$
In other words, the numbers with sum $S$ and product $P$ are the roots of the equation ${x^2-Sx+P=0}.$
Why it is true. Expand the brackets: ${(x-x_1)(x-x_2)}={x^2-(x_1+x_2)x+x_1x_2}={x^2+px+q}.$ So the equation ${x^2+px+q=0}$ is the same as ${(x-x_1)(x-x_2)=0},$ and its roots are exactly $x_1$ and $x_2.$
The same holds in the general form: if ${x_1+x_2=-\frac{b}{a}}$ and ${x_1x_2=\frac{c}{a}},$ then $x_1$ and $x_2$ are the roots of ${ax^2+bx+c=0}$ (divide the equation by $a$).
Finding the Roots Mentally
If the monic equation ${x^2+px+q=0}$ has integer roots, we can often guess them at once: look for two numbers whose product is $q$ and whose sum is $-p.$
- ${x^2-7x+10=0}$: product 10 and sum 7. These are ${x_1=2}$ and ${x_2=5}.$
- ${x^2+x-12=0}$: the product $-12$ is negative, so the roots have opposite signs, and their sum is $-1.$ These are ${x_1=-4}$ and ${x_2=3}.$
- ${x^2+8x+15=0}$: the product 15 is positive (same signs) and the sum $-8$ is negative (both roots are negative). These are ${x_1=-5}$ and ${x_2=-3}.$
Two special cases work for every quadratic equation:
If ${a+b+c=0},$ then ${x_1=1}$ and ${x_2=\frac{c}{a}}.$
If ${a-b+c=0},$ then ${x_1=-1}$ and ${x_2=-\frac{c}{a}}.$
Indeed, for ${x=1}$ the left side is ${a+b+c},$ and for ${x=-1}$ it is ${a-b+c}.$ The second root then comes from the product ${x_1x_2=\frac{c}{a}}.$ For example, ${5x^2-3x-2=0}$ has the roots 1 and ${-\frac25},$ because ${5-3-2=0},$ and ${2x^2+7x+5=0}$ has the roots $-1$ and ${-\frac52},$ because ${2-7+5=0}.$
If one root is known, Vieta's formulas give the other. For example, ${x_1=2}$ is a root of ${3x^2-7x+2=0},$ because ${3\cdot 4-7\cdot 2+2=0}.$ From ${x_1x_2=\frac23}$ it follows that ${x_2=\frac13}.$
Writing an Equation with Given Roots
By the converse theorem, the numbers $x_1$ and $x_2$ are the roots of the equation ${x^2-(x_1+x_2)x+x_1x_2}={0}.$
- Roots 3 and $-5$: the sum is $-2$ and the product is $-15.$ The equation is ${x^2+2x-15=0}.$
- Roots $\frac12$ and $-3$: the sum is ${-\frac52}$ and the product is ${-\frac32}.$ Multiply the equation ${x^2+\frac52x-\frac32=0}$ by 2: ${2x^2+5x-3=0}.$
- Roots ${2+\sqrt3}$ and ${2-\sqrt3}$: the sum is 4 and the product is ${4-3=1}.$ The equation is ${x^2-4x+1=0}$ (see Example 4).
Expressions in the Roots without Solving the Equation
An expression that does not change when $x_1$ and $x_2$ are swapped can be written in terms of the sum ${S=x_1+x_2}$ and the product ${P=x_1x_2}.$ The most common ones are:
| Expression | In terms of $S$ and $P$ |
|---|---|
| ${x_1^2+x_2^2}$ | ${S^2-2P}$ |
| ${(x_1-x_2)^2}$ | ${S^2-4P}$ |
| ${\frac{1}{x_1}+\frac{1}{x_2}}$ | ${\frac{S}{P}}$ |
| ${x_1^2x_2+x_1x_2^2}$ | ${SP}$ |
| ${x_1^3+x_2^3}$ | ${S^3-3SP}$ |
| ${\frac{x_1}{x_2}+\frac{x_2}{x_1}}$ | ${\frac{S^2-2P}{P}}$ |
For example, ${x_1^2+x_2^2}={(x_1+x_2)^2-2x_1x_2},$ because ${(x_1+x_2)^2}={x_1^2+2x_1x_2+x_2^2},$ and ${x_1^3+x_2^3}={(x_1+x_2)^3}-{3x_1x_2(x_1+x_2)}.$
Example. Without solving the equation ${x^2-6x+4=0},$ find ${x_1^2+x_2^2},$ ${\frac{1}{x_1}+\frac{1}{x_2}},$ ${x_1^3+x_2^3}$ and ${|x_1-x_2|}.$
Solution. ${D=36-16=20\gt 0},$ so the roots exist. ${S=6},$ ${P=4}$ and
${x_1^2+x_2^2}={S^2-2P}={36-8}={28}$
${\frac{1}{x_1}+\frac{1}{x_2}=\frac{S}{P}=\frac64=\frac32}$
${x_1^3+x_2^3}={S^3-3SP}={216-72}={144}$
${(x_1-x_2)^2}={S^2-4P}={36-16}={20},$ so ${|x_1-x_2|=\sqrt{20}=2\sqrt5}$
Check: the roots are ${3\pm\sqrt5},$ and for example ${(3+\sqrt5)^2+(3-\sqrt5)^2}={(14+6\sqrt5)}+{(14-6\sqrt5)}={28}.$
In general ${|x_1-x_2|=\frac{\sqrt{D}}{|a|}}$: the distance between the roots depends only on the discriminant and on $a.$
Signs of the Roots
Suppose the equation has real roots (${D\ge 0}$). Their signs follow from $S$ and $P,$ without computing the roots:
| Condition | The roots |
|---|---|
| ${P\lt 0}$ | have opposite signs |
| ${P\gt 0},$ ${S\gt 0}$ | are both positive |
| ${P\gt 0},$ ${S\lt 0}$ | are both negative |
| ${P=0}$ | one is 0, the other is $S$ |
If ${P=\frac{c}{a}\lt 0},$ then $a$ and $c$ have opposite signs, ${-4ac\gt 0}$ and ${D=b^2-4ac\gt 0}.$ So such an equation always has two roots of opposite signs.
Example. For ${2x^2-9x+4=0}$ we have ${D=81-32=49\gt 0},$ ${P=2\gt 0}$ and ${S=\frac92\gt 0}.$ Both roots are positive (they are 4 and $\frac12$). The equation ${x^2+5x-3=0}$ has ${P=-3\lt 0},$ so its roots have opposite signs. Since ${S=-5\lt 0},$ the negative root has the larger absolute value.
Factoring a Quadratic
The expression ${ax^2+bx+c}$ is called a quadratic trinomial. The roots of the equation ${ax^2+bx+c=0}$ give its factorization:
if ${D\gt 0}$: ${ax^2+bx+c}={a(x-x_1)(x-x_2)};$
if ${D=0}$: ${ax^2+bx+c=a(x-x_1)^2};$
if ${D\lt 0},$ the trinomial cannot be factored into linear factors with real coefficients.
Why it is true. By Vieta's formulas
${a(x-x_1)(x-x_2)}={a\bigl(x^2-(x_1+x_2)x+x_1x_2\bigr)}={a\left(x^2+\frac{b}{a}x+\frac{c}{a}\right)}={ax^2+bx+c}$
Example 1. ${2x^2-5x-3}$ has the roots 3 and ${-\frac12},$ so ${2x^2-5x-3}={2(x-3)\left(x+\frac12\right)}={(x-3)(2x+1)}.$
Example 2. Simplify the fraction ${\frac{x^2-5x+6}{x^2-9}}.$
Solution. The roots of ${x^2-5x+6=0}$ are 2 and 3, so ${x^2-5x+6}={(x-2)(x-3)}.$ Also ${x^2-9=(x-3)(x+3)}.$ For ${x\ne\pm 3}$
${\frac{x^2-5x+6}{x^2-9}}={\frac{(x-2)(x-3)}{(x-3)(x+3)}}={\frac{x-2}{x+3}}$
The Quadratic Function and the Parabola
The function ${y=ax^2+bx+c},$ where ${a\ne 0},$ is called a quadratic function, and its graph is a parabola. The roots of the equation ${ax^2+bx+c=0}$ are the $x$-coordinates of the points where the parabola meets the $x$-axis.
The graph of ${y=x^2-2x-3}$: roots $-1$ and 3, vertex ${(1,\ -4)},$ axis of symmetry ${x=1}.$
- If ${a\gt 0},$ the parabola opens upward and the vertex is its lowest point. If ${a\lt 0},$ it opens downward and the vertex is its highest point.
- Vertex: ${\left(-\frac{b}{2a},\ -\frac{D}{4a}\right)}.$ Axis of symmetry: the line ${x=-\frac{b}{2a}}.$
- The parabola crosses the $y$-axis at the point ${(0,\ c)}.$
- The axis of symmetry lies exactly halfway between the roots: ${\frac{x_1+x_2}{2}=-\frac{b}{2a}}.$ This is Vieta's formula for the sum again.
The parabola meets the $x$-axis at as many points as the equation has roots, so their number depends on the sign of $D$:
If ${D\gt 0}$ the parabola crosses the $x$-axis at two points, if ${D=0}$ it touches it at its vertex, and if ${D\lt 0}$ it does not meet it.
Three Forms of a Quadratic Function
A quadratic function can be written in three ways. Each of them shows a different property of the graph:
| Form | What you see | Example |
|---|---|---|
| Standard form ${y=ax^2+bx+c}$ | the $y$-intercept ${(0,\ c)}$ | ${y=2x^2+4x-30},$ point ${(0,\ -30)}$ |
| Vertex form ${y=a(x-h)^2+k}$ | the vertex ${(h,\ k)}$ and the axis ${x=h}$ | ${y=2(x+1)^2-32},$ vertex ${(-1,\ -32)}$ |
| Factored form ${y=a(x-x_1)(x-x_2)}$ | the roots $x_1$ and $x_2$ | ${y=2(x-3)(x+5)},$ roots 3 and $-5$ |
All three examples are the same function: ${2(x+1)^2-32}={2x^2+4x+2-32}={2x^2+4x-30}$ and ${2(x-3)(x+5)}={2(x^2+2x-15)}={2x^2+4x-30}.$ More about graphs: Quadratic Function Graph.
Equations That Reduce to Quadratic Equations
Many equations of higher degree or with fractions can be solved by a suitable substitution or transformation that turns them into a quadratic equation.
Example 1. ${3x^4-2x^2-1=0}.$ The equation has degree four but contains only $x^4$ and $x^2$ (a biquadratic equation). Substitute ${x^2=u},$ where ${u\ge 0}$:
${3u^2-2u-1=0}$
Since ${3-2-1=0},$ the roots are ${u_1=1}$ and ${u_2=-\frac13}.$ The second one is negative and must be rejected, because ${x^2\ge 0}.$ From ${x^2=1}$ we get ${x_{1,2}=\pm 1}.$
Example 2. ${(x^2-2x+3)^2}-{5(x^2-2x+3)+4}={0}.$ Substitute ${x^2-2x+3=u}$ to get ${u^2-5u+4=0},$ with the roots ${u_1=1}$ and ${u_2=4}$ (product 4 and sum 5).
- ${x^2-2x+3=4},$ that is ${x^2-2x-1=0}.$ Here ${D_1=1+1=2}$ and ${x_{1,2}=1\pm\sqrt2}.$
- ${x^2-2x+3=1},$ that is ${x^2-2x+2=0}.$ Here ${D_1=1-2=-1\lt 0},$ so there are no real roots.
Answer: ${x_{1,2}=1\pm\sqrt2}.$ The second case could have been rejected at once: ${x^2-2x+3}={(x-1)^2+2}\ge{2},$ so this expression can never equal 1.
Example 3. ${\frac{x}{x-1}-\frac{2}{x+1}=\frac{4}{x^2-1}}.$ The equation is defined for ${x\ne\pm 1}.$ Multiply by the common denominator ${x^2-1=(x-1)(x+1)}$:
${x(x+1)-2(x-1)=4},$ ${x^2-x-2=0}$
The roots are ${x_1=2}$ and ${x_2=-1}$ (${a-b+c=1+1-2=0}$). The number $-1$ is not allowed, because it makes the denominators ${x+1}$ and ${x^2-1}$ zero. Answer: ${x=2}.$
Solved Problems
Problem 1. Solve the equation ${x^2-4=0}.$
Solution. Factor the difference of squares: ${(x-2)(x+2)=0},$ so ${x_1=2}$ and ${x_2=-2}.$ The formula gives the same: ${a=1},$ ${b=0},$ ${c=-4},$ ${D}={0^2-4\cdot 1\cdot(-4)}={16}$ and ${x_{1,2}=\frac{0\pm 4}{2}=\pm 2}.$
Problem 2. Solve the equation ${3x^2+4x+5=0}.$
Solution. ${D}={4^2-4\cdot 3\cdot 5}={16-60}={-44}\lt{0}.$ The equation has no real roots.
Problem 3. Solve the equation ${x^2+4x-5=0}.$
Solution. ${D}={4^2-4\cdot 1\cdot(-5)}={16+20}={36}$ and ${x_{1,2}=\frac{-4\pm 6}{2}},$ that is ${x_1=1},$ ${x_2=-5}.$ Faster: ${a+b+c=1+4-5=0},$ so ${x_1=1}$ and ${x_2=\frac{c}{a}=-5}.$
Problem 4. Solve the equation ${x^2+4x+4=0}.$
Solution. ${D=4^2-4\cdot 1\cdot 4=0},$ so the equation has one root: ${x=-\frac{4}{2}=-2}.$ Indeed, ${x^2+4x+4=(x+2)^2}.$
Problem 5. Solve the equation ${x^2-13x+12=0}$ and sketch the graph of the function ${f(x)=x^2-13x+12}.$
Solution. ${a+b+c=1-13+12=0},$ so ${x_1=1}$ and ${x_2=12}.$ For the graph: ${a=1\gt 0},$ so the parabola opens upward. It crosses the $x$-axis at the points ${(1,\ 0)}$ and ${(12,\ 0)}$ and the $y$-axis at the point ${(0,\ 12)}.$ The vertex lies halfway between the roots: ${x=\frac{1+12}{2}=6.5},$ and with ${D=169-48=121}$ we get ${f(6.5)}={-\frac{D}{4a}}={-\frac{121}{4}}={-30.25}.$
Problem 6. Solve the equation ${8x^2-30x+7=0}.$
Solution. The coefficient of $x$ is even: ${k=-15},$ ${D_1}={(-15)^2-8\cdot 7}={225-56}={169}$ and
${x_{1,2}=\frac{15\pm 13}{8}},$ ${x_1=\frac{2}{8}=\frac14=0.25},$ ${x_2=\frac{28}{8}=\frac72=3.5}$
Problem 7. The area of a rectangle is 40 cm² and its perimeter is 26 cm. Find its sides.
Solution. Let the sides be $x$ and $y.$ Then ${x+y=13}$ and ${xy=40}.$ By the converse of Vieta's theorem, $x$ and $y$ are the roots of the equation
${t^2-13t+40=0},$ ${D=169-160=9},$ ${t_{1,2}=\frac{13\pm 3}{2}}$
that is ${t_1=5}$ and ${t_2=8}.$ The sides are 5 cm and 8 cm.
Problem 8. The product of two consecutive natural numbers is 156. Find the numbers.
Solution. Let the numbers be $n$ and ${n+1}.$ Then ${n(n+1)=156},$ that is ${n^2+n-156=0}.$
${D=1+624=625},$ ${n_{1,2}=\frac{-1\pm 25}{2}},$ ${n_1=-13},$ ${n_2=12}$
The number $-13$ is not a natural number. The numbers are 12 and 13. Check: ${12\cdot 13=156}.$
Problem 9. A ball is thrown straight up. After $t$ seconds its height is ${h=20t-5t^2}$ meters. When is the ball at a height of 15 m? When does it hit the ground? How high does it rise?
Solution. ${20t-5t^2=15},$ that is ${5t^2-20t+15=0},$ and after dividing by 5: ${t^2-4t+3=0}.$ The roots are ${t_1=1}$ and ${t_2=3}$ (${1-4+3=0}$). The ball is at 15 m twice: after 1 s on the way up and after 3 s on the way down.
The ball is on the ground when ${h=0}$: ${5t(4-t)=0},$ that is at ${t=0}$ (the moment of the throw) and at ${t=4}$ s. The highest point is the vertex of the parabola: ${t=-\frac{20}{2\cdot(-5)}=2}$ s and ${h=20\cdot 2-5\cdot 2^2=20}$ m.
Problem 10. The sum of a number and its reciprocal is ${\frac{10}{3}}.$ Find the number.
Solution. ${x+\frac1x=\frac{10}{3}},$ ${x\ne 0}.$ Multiply by $3x$: ${3x^2+3=10x},$ that is ${3x^2-10x+3=0}.$ Here ${k=-5},$ ${D_1=25-9=16}$ and ${x_{1,2}=\frac{5\pm 4}{3}},$ that is ${x_1=\frac13}$ and ${x_2=3}.$ Both numbers are solutions: ${3+\frac13=\frac{10}{3}}.$
Quadratic Equations with a Parameter
In an equation with a parameter, some coefficients depend on a letter (the parameter). To solve such an equation means to say what the roots are for every value of the parameter. If the leading coefficient depends on the parameter, the case where it is zero is treated separately, because then the equation is not quadratic.
Problem 1. Solve the equation ${x^2-3x+p+1=0}$ with the parameter $p.$
Solution. ${D}={(-3)^2-4(p+1)}={9-4p-4}={5-4p}.$
- For ${p\lt\frac54}$ we have ${D\gt 0},$ and the equation has two roots: ${x_{1,2}=\frac{3\pm\sqrt{5-4p}}{2}}.$
- For ${p=\frac54}$ we have ${D=0},$ and the equation has one root: ${x=\frac32}.$
- For ${p\gt\frac54}$ we have ${D\lt 0},$ and the equation has no real roots.
Problem 2. Find the values of $k$ for which the equation ${kx^2-x+2=0}$ has exactly one real root or no real roots.
Solution. For ${k=0}$ the equation is linear: ${-x+2=0},$ with the single root ${x=2}.$ This value is a solution of the problem.
For ${k\ne 0}$ the equation is quadratic. It has one root or no roots exactly when ${D\le 0}$:
${D}={(-1)^2-4\cdot k\cdot 2}={1-8k}\le{0},$ that is ${k\ge\frac18}$
Answer: ${k=0}$ or ${k\ge\frac18},$ that is ${k\in\{0\}\cup\left[\frac18,\ \infty\right)}.$ The value ${k=\frac18}$ is included: then ${D=0},$ and the equation ${\frac18x^2-x+2=0}$ has the single root ${x=4}.$
Problem 3. Find $m$ if one root of the equation ${x^2+mx+12=0}$ is three times the other.
Solution. Let the roots be $x_2$ and ${x_1=3x_2}.$ By Vieta's formulas ${x_1x_2=3x_2^2=12},$ so ${x_2^2=4}$ and ${x_2=\pm 2}.$
- For ${x_2=2}$: ${x_1=6}$ and ${m=-(x_1+x_2)=-8}.$ The equation is ${x^2-8x+12=0},$ with the roots 2 and 6.
- For ${x_2=-2}$: ${x_1=-6}$ and ${m=8}.$ The equation is ${x^2+8x+12=0},$ with the roots $-2$ and $-6.$
Answer: ${m=-8}$ or ${m=8}.$
Problem 4. Find $k$ if the roots of the equation ${x^2+(k-2)x+4-2k=0}$ satisfy ${x_1^2+x_2^2=5}.$
Solution. ${S=x_1+x_2=2-k}$ and ${P=x_1x_2=4-2k}.$ Then
${x_1^2+x_2^2}={S^2-2P}={(2-k)^2-2(4-2k)}={k^2-4}$
From ${k^2-4=5}$ we get ${k=3}$ or ${k=-3}.$ But Vieta's formulas hold only when the roots exist, so we check the discriminant:
- ${k=3}$: the equation is ${x^2+x-2=0}$ and ${D=1+8=9\gt 0}.$ The roots are 1 and $-2,$ and indeed ${1^2+(-2)^2=5}.$
- ${k=-3}$: the equation is ${x^2-5x+10=0}$ and ${D=25-40=-15\lt 0}.$ There are no real roots.
Answer: ${k=3}.$
Problem 5. Solve the equation ${\frac{x+k}{k}+\frac{x}{x-k}=\frac{x-k}{2k}}$ with the parameter $k.$
Solution. The equation makes sense for ${k\ne 0}$ and ${x\ne k}.$ Multiply by ${2k(x-k)}$:
${2(x+k)(x-k)+2kx}={(x-k)^2}$
${2x^2-2k^2+2kx}={x^2-2kx+k^2}$
${x^2+4kx-3k^2=0}$
The coefficient of $x$ is even: ${D_1}={(2k)^2+3k^2}={7k^2}\gt{0},$ because ${k\ne 0}.$ So
${x_{1,2}}={-2k\pm\sqrt{7k^2}}={-2k\pm\sqrt7\,|k|}={(-2\pm\sqrt7)k}$
(the $\pm$ sign absorbs the sign of $k$: $\pm|k|$ and $\pm k$ give the same two numbers). It remains to check the condition ${x\ne k}$: ${(-2\pm\sqrt7)k=k}$ would mean ${(-3\pm\sqrt7)k=0},$ which is impossible, because ${k\ne 0}$ and ${\sqrt7\ne 3}.$
Answer: for ${k=0}$ the equation makes no sense, and for every ${k\ne 0}$ the roots are ${x_{1,2}=(-2\pm\sqrt7)k}.$
Common Mistakes
| Mistake | Wrong | Right |
|---|---|---|
| Coefficients read off before the terms are moved to the left | ${x^2=2x+3}$: ${a=1},$ ${b=2},$ ${c=3}$ | ${x^2-2x-3=0}$: ${a=1},$ ${b=-2},$ ${c=-3}$ |
| The sign of $b$ is lost | ${x^2-5x+6=0}$: ${x_{1,2}=\frac{-5\pm 1}{2}}$ | ${-b=5},$ so ${x_{1,2}=\frac{5\pm 1}{2}}$ |
| The square of a negative number | ${b=-3},$ ${b^2=-9}$ | ${b^2=(-3)^2=9}$ |
| Wrong sign in front of $4ac$ | ${x^2+3x-4=0}$: ${D=9-16}$ | ${D}={9-4\cdot 1\cdot(-4)}={9+16}={25}$ |
| Only the square root is divided by $2a$ | ${x_{1,2}=-b\pm\frac{\sqrt{D}}{2a}}$ | ${x_{1,2}=\frac{-b\pm\sqrt{D}}{2a}}$ |
| Only one term of the numerator is cancelled | ${\frac{4\pm 2\sqrt3}{2}=4\pm\sqrt3}$ | ${\frac{4\pm 2\sqrt3}{2}=2\pm\sqrt3}$ |
| A root lost by dividing by $x$ | ${3x^2=12x},$ so ${x=4}$ | ${3x(x-4)=0}$: ${x_1=0},$ ${x_2=4}$ |
| The negative root is forgotten | ${x^2=9},$ so ${x=3}$ | ${x_{1,2}=\pm 3}$ |
| Sum of the roots with the wrong sign | ${x^2-7x+10=0}$: ${x_1+x_2=-7}$ | ${x_1+x_2=7},$ ${x_1x_2=10}$ |
| The formulas for ${a=1}$ used when ${a\ne 1}$ | ${2x^2-5x-3=0}$: ${x_1x_2=-3}$ | ${x_1x_2=\frac{c}{a}=-\frac32}$ |
| Vieta's formulas used when there are no roots | ${x^2+2x+5=0}$: ${x_1+x_2=-2},$ ${x_1x_2=5}$ | ${D=-16\lt 0},$ there are no real roots |
Practice Problems
Try them yourself, then open the answer.
1. Solve the equation ${x^2-8x+15=0}.$
Look for two numbers with product 15 and sum 8: ${x_1=3},$ ${x_2=5}.$ With the formula: ${D=64-60=4}$ and ${x_{1,2}=\frac{8\pm 2}{2}}.$
2. Solve the equation ${2x^2+3x-2=0}.$
${D=9+16=25},$ ${x_{1,2}=\frac{-3\pm 5}{4}},$ that is ${x_1=-2},$ ${x_2=\frac12}.$
3. Solve the equation ${9x^2-6x+1=0}.$
${D=36-36=0},$ and the equation has one root ${x=\frac{6}{18}=\frac13}.$ Indeed, ${9x^2-6x+1=(3x-1)^2}.$
4. Solve the equation ${x^2+x+1=0}.$
${D=1-4=-3\lt 0}.$ The equation has no real roots.
5. Solve the equation ${5x^2-20=0}.$
${x^2=4},$ so ${x_{1,2}=\pm 2}.$
6. Solve the equation ${x^2-6x+7=0}.$
${k=-3},$ ${D_1=9-7=2}$ and ${x_{1,2}=3\pm\sqrt2}.$
7. Without solving the equation ${x^2-3x-7=0},$ find ${x_1^2+x_2^2}$ and ${\frac{1}{x_1}+\frac{1}{x_2}}.$
${D=9+28=37\gt 0},$ ${S=3}$ and ${P=-7}.$ Then ${x_1^2+x_2^2}={S^2-2P}={9+14}={23}$ and ${\frac{1}{x_1}+\frac{1}{x_2}=\frac{S}{P}=-\frac37}.$
8. Write a quadratic equation with integer coefficients whose roots are $-2$ and ${\frac53}.$
${S=-2+\frac53=-\frac13}$ and ${P=-2\cdot\frac53=-\frac{10}{3}}.$ Multiply the equation ${x^2+\frac13x-\frac{10}{3}=0}$ by 3: ${3x^2+x-10=0}.$
9. One root of the equation ${x^2+px-12=0}$ is 4. Find $p$ and the other root.
${x_1x_2=-12},$ so ${x_2=-3}.$ From ${x_1+x_2=1=-p}$ we get ${p=-1}.$ Check: ${4^2-4-12=0}.$
10. For which value of $m$ does the equation ${x^2-6x+m=0}$ have one (double) root?
${D=36-4m=0}$ for ${m=9}.$ Then ${x^2-6x+9=(x-3)^2},$ and the root is ${x=3}.$
11. The length of a rectangle is 3 cm more than its width, and its area is 54 cm². Find its sides.
If the width is $x$ cm, then ${x(x+3)=54},$ that is ${x^2+3x-54=0}.$ ${D=9+216=225}$ and ${x_{1,2}=\frac{-3\pm 15}{2}}.$ The positive root is ${x=6}.$ The sides are 6 cm and 9 cm.
See also: Biquadratic Equations · Quadratic Inequalities · Quadratic Function Graph
You can also check your answers with the equation and inequality solver.
Quadratic equations in our math forum
Quadratic equations problems
Problems using Vieta's formulas
Solution of cubic and quartic equations - 1
Forums involving quadratic equations

MENU
Graphing Quadratic Functions in Standard Form