Standard form of the quadratic equation :
ax2+bx+c = 0, a ≠ 0
Here a, b and c are coefficient (real number) which is entered by the user. Point to remember that value of ‘a’ can not be zero.
Formula to find the root of the equation :
Every quadratic equation has two roots. Let, these roots are x and y. Then the formula is:
(x,y) = (-b ± √b2-4ac)/2
The nature of a root depends upon the discriminant of a quadratic equation i.e. b2-4ac. b2-4ac is knowns as the discriminant of a quadratic equation.
- If the discriminant is greater than 0, the roots are real and different.
- If the discriminant is equal to 0, the roots are real and equal.
- If the discriminant is less than 0, the roots are complex and different.