Mathematics
Quadratic formula - formula in LaTeX
The expression under the root is the discriminant: positive gives two real solutions, zero gives one, negative gives none. The whole numerator goes in the first braces of \dfrac and the denominator in the second. Missing braces around the numerator are the most common mistake here.
LaTeX code
$$
x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$Got this formula in your notes or on a whiteboard? Snap a photo and CamteX turns it into LaTeX. Try it free
What the symbols mean
- roots of the equation ax² + bx + c = 0
- coefficients of the equation, a nonzero
A math formula - one of the most frequently typed in assignments, lecture notes and calculus or algebra homework.
Worked example
With a = 1, b = −5 and c = 6 the discriminant is 1, so there are two roots. The implication arrow is \Rightarrow, and \quad spaces out the steps on one line.
Other ways to write it
The school notation with the discriminant computed first; the 1,2 subscript must be in braces.
\Delta = b^2 - 4ac, \qquad x_{1,2} = \dfrac{-b \pm \sqrt{\Delta}}{2a}The single (double) root when the discriminant is zero.
x = \dfrac{-b}{2a}The factored form, once both roots are known.
ax^2 + bx + c = a(x - x_1)(x - x_2)
LaTeX commands in this formula
\dfrac- fraction (display)
\pm- plus-minus sign
\sqrt- square root
x^{2}- superscript (power); wrap several characters in braces
How to use this formula in LaTeX?
- Copy the code with the button above -
$$…$$is centered display math. - Paste it into the CamteX editor, Overleaf or any LaTeX document.
- Inside a sentence, use single
$…$instead of double. - The formula needs the
amsmathpackage - CamteX templates include it in the preamble.
Related formulas - Mathematics
Drawing formulas is faster than typing them.
Draw a formula, table or chart - CamteX AI turns it into ready LaTeX and inserts it into your document.