for the equation 5x^3-7x^2+4x-2, the answer is 1/5 + 3/5i, where exactly does the i come from?
The zero set of discriminant of the cubic \({\displaystyle ax^{3}+bx^{2}+cx+d\,} \) has discriminant \({\displaystyle b^{2}c^{2}-4ac^{3}-4b^{3}d-27a^{2}d^{2}+18abcd\,.}\)
The discriminant is zero if and only if at least two roots are equal.
If the coefficients are real numbers, and the discriminant is not zero,
the discriminant is positive if the roots are three distinct real numbers,
and negative if there is one real root and two complex conjugate roots.
\(\begin{array}{|rcll|} \hline && 5x^3-7x^2+4x-2 \\ && ax^{3}+bx^{2}+cx+d \\ &&{} a = 5, \quad b=-7, \quad c = 4, \quad d = -1 \\\\ && b^{2}c^{2}-4ac^{3}-4b^{3}d-27a^{2}d^{2}+18abcd \\ &=& (-7)^{2}\cdot 4^{2}-4\cdot 5\cdot 4^{3}-4(-7)^{3}\cdot (-1)-27\cdot 5^{2}\cdot (-1)^{2} +18\cdot 5\cdot (-7) \cdot 4 \cdot (-1) \\ &=& -23 \\ \hline \end{array}\)
There is one real root and two complex conjugate roots:
\(x_1 = 1, \quad x_2 = \frac15 - \frac{3 i}{5}, \quad x_3 = \frac15 + \frac{3 i}{5} \)