Is there any method that output all 3 of the solutions of the cubic polynomial? And why did this output 1 anyways? What about the other 2 solutions? Why didn't this output them?
You just have to use the roots of unity for cubics, which is (-1+isqrt(3)) /2. If a cubic has three real distinct roots, then you will get a complex cube root, where you then have to use De Moivre's theorem. The reason this only gave one solution is because it outputs the real solution.
Is there any method that output all 3 of the solutions of the cubic polynomial? And why did this output 1 anyways? What about the other 2 solutions? Why didn't this output them?
that's the problem with the cubic formula it gives only one solution, though you can find other 2 from this using primitive roots of unity for n=3
You just have to use the roots of unity for cubics, which is (-1+isqrt(3)) /2. If a cubic has three real distinct roots, then you will get a complex cube root, where you then have to use De Moivre's theorem. The reason this only gave one solution is because it outputs the real solution.
@Visions_Tutoring this means multiplying one cube root by one complex root of unity and the other cube root by the other complex root of unity.