I have a matrix A4
When calculting the Eigenvalues I get, as expected,
Then, I would like to calculate the roots, which are real. So, I replace
and define F as
I assume that z is real
and calculate the root by
My problem is that roots 2 and 3 are not real. I need to find a solution only when all the roots are real. How can I do that?