Could you please explain to me, how to get the formula of discriminant ? How can I visualize it, any articles, lectures?
I can memorize it $b^2 - 4ac$ But, want to understand it.
Thanks.
Could you please explain to me, how to get the formula of discriminant ? How can I visualize it, any articles, lectures?
I can memorize it $b^2 - 4ac$ But, want to understand it.
Thanks.
You want to solve $$ax^2+bx+c=0$$
First, you divide by $a$ . Then, you subtract the constant term on the left side.
$$x^2+\frac{b}{a}x=-\frac{c}{a}$$
Now, you add $(\frac{b}{2a})^2=\frac{b^2}{4a^2}$ to get a binom at the left side
$$x^2+\frac{b}{a}x+\frac{b^2}{4a^2}=\frac{b^2-4ac}{4a^2}$$
So, we have
$$(x+\frac{b}{2a})^2=\frac{b^2-4ac}{4a^2}$$
So, we have $$x+\frac{b}{2a}=\pm\frac{\sqrt{b^2-4ac}}{2a}$$
Subtracting $\frac{b}{2a}$ leads to the well-known formula.
You see, how $b^2-4ac$ merges.
You have here many answers that illustrate what is the discriminant of a second degree polynomial, so I want suggest you a more general vision.
You can see that, if $x_1,x_2$ are the roots of the polynomial than the discriminat $\Delta$ is: $$ \Delta= b^2-4ac=a^2(x_1-x_2)^2 $$ where $a$ is the leading coefficient of the polynomial.
So the discriminant is a function of the coefficient that is null if and only if the polynomial has a multiple root.
This is a very important property because we can define a discriminant, with this same property, also for polynomials of any degree.
Since you ask about some lectures, you can start from here, and see how this notion of determinat can be defined for general polynomials.
IMHO the discriminant is easiest to understand in the case that $a=1$ (i.e. that your quadratic polynomial is monic i.e. of the form $x^2+bx+c$). In this case, the discriminant (as you know) is $b^2-4c$. But its real significance is this:
It is the square of the difference between the polynomial's two roots!
In other words: $x^2+bx+c$ factors as $(x-\alpha)(x-\beta)$ for some numbers $\alpha$ and $\beta$, and the discriminant is actually $(\alpha-\beta)^2$.
You can see this by the following computation.
$$(x-\alpha)(x-\beta) = x^2 - (\alpha+\beta)+\alpha\beta$$
So if this is equal to $x^2 + bx + c$, it means that $b = -(\alpha+\beta)$ and $c = \alpha\beta$. Then $b^2 = \alpha^2 + 2\alpha\beta+\beta^2$, and $b^2 - 4c$ is
$$(\alpha^2 + 2\alpha\beta+\beta^2) - 4\alpha\beta = \alpha^2 - 2\alpha\beta + \beta^2$$
But this is $(\alpha-\beta)^2$!
Some commentary:
(1) If the roots $\alpha,\beta$ are real, this means the parabola $y=x^2+bx+c$ hits the $x$-axis at these points, so the discriminant is literally telling you the square of the distance between them.
(2) Here is a way to look at how the discriminant $\Delta = b^2 - 4c$ shows up in the quadratic formula:
By the above calculation, the sum $\alpha + \beta$ of the roots is $-b$. Meanwhile, because $\Delta = (\alpha-\beta)^2$, it means $\sqrt{\Delta}$ is (plus or minus) $\alpha - \beta$. So $\alpha$ and $\beta$ are two numbers of which we have the sum ($-b$) and the difference ($\sqrt{\Delta}$). We can extract $\alpha,\beta$ themselves by solving the linear system:
$$\alpha + \beta = -b$$ $$\alpha - \beta = \sqrt{\Delta}$$
Adding the two equations together we get $2\alpha = -b+\sqrt{\Delta}$, in other words, $\alpha = \frac{-b + \sqrt{\Delta}}{2}$. Subtracting them, we get $2\beta = -b-\sqrt{\Delta}$, i.e. $\beta = \frac{-b-\sqrt{\Delta}}{2}$.
It is a consequence of completing the square of the quadratic $ax^2+bx+c=0$ which is:
$$ a\left(x+\frac{b}{2a}\right)^2-\left(\frac{b^2}{4a}\right)+c=0 $$ or: $$ \left(x+\frac{b}{2a}\right)^2=\left(\frac{b^2}{4a^2}\right)-\frac{c}{a} $$ Which only has a real solution when the right hand side is greater than or equal to zero (because the left hand side is the square of a real number and hence is non-negative) , that is only when $b^2-4ac\ge0$, which is the discriminant.
You must have seen a method called "completing the square" before you saw the quadratic formula in school right? This is where it comes from, in fact, if you know how to complete the square, you can derive the whole quadratic formula on your own.
Consider the quadratic equation that you're used to $$ax^2 + bx + c = 0.$$
To complete the square we need the coefficient of $x^2$ (the term in front of $x^2$, i.e. the $a$) to be $1$, so we need to divide both sides by $a$. (If $a = 0$, then the equation isn't a quadratic and we actually have $bx + c = 0$, which you can solve easily). This gives: $$x^2 + \frac{b}{a}x + \frac{c}{a} = 0.$$
We now complete the square as usual: $$\Bigg(x + \frac{b}{2a}\Bigg)^2 + \frac{c}{a} - \frac{b^2}{4a^2} = 0.$$
We now need to make $x$ the subject:
\begin{align}\Bigg(x + \frac{b}{2a}\Bigg)^2 &= -\Bigg(\frac{c}{a} - \frac{b^2} {4a^2}\Bigg)\\ \Bigg(x + \frac{b}{2a}\Bigg)^2 &= -\Bigg(\frac{4ac}{4a^2} - \frac{b^2} {4a^2}\Bigg)\\ \Bigg(x + \frac{b}{2a}\Bigg)^2 &= -\Bigg(\frac{4ac - b^2} {4a^2}\Bigg)\\ \Bigg(x + \frac{b}{2a}\Bigg)^2 &= \Bigg(\frac{b^2-4ac} {4a^2}\Bigg)\\ x + \frac{b}{2a} &= \pm\sqrt{ \Bigg(\frac{b^2-4ac} {4a^2} \Bigg) }\\ x + \frac{b}{2a} &= \pm\frac{\sqrt{b^2-4ac}}{2a}\\ x &= -\frac{b}{2a}\pm\frac{\sqrt{b^2-4ac}}{2a}\\ x &= \frac{-b\pm\sqrt{b^2-4ac}}{2a}. \end{align}
Finally, the part in the square root is the discriminant.
Consider the polynomial $$ax^2+bx+c$$ First I would like to make this polynomial a multiple of a polynomial with its first term a perfect square and the second term even. To do this, we multiply by $\frac{4a}{4a}.$ $$\begin{align} \frac{1}{4a}(4a^2x^2 + 4abx+4ac) &= \frac{1}{4a}((2ax)^2+2b(2ax)+4ac) \\ & = \frac{1}{4a}((2ax)^2+2b(2ax)+b^2-b^2+4ac)\\ & = \frac{1}{4a}(\bigg((2ax)^2+2b(2ax)+b^2\bigg)-(b^2-4ac))\\ & = \frac{1}{4a}((2ax+b)^2-(b^2-4ac))\\ & = \frac{1}{4a}((2ax+b)^2-\sqrt{b^2-4ac}^2)\\ & = \frac{1}{4a}(2ax+b+\sqrt{b^2-4ac})(2ax+b-\sqrt{b^2-4ac})\\ \end{align}$$ You can easily see from this that when the discriminant is zero, the second and third factors both have the same root. When the discriminant is positive, the roots are different. And when the discriminant is negative, there are no real roots.