El profesor se sorprenderá mucho al ver tu solución correcta😉
a + c a + c ----- - ----- = 0.5 x - a x + c
a*x^2 + b*x + c = 0
D = b^2 - 4 * a * c =
(0.5*a - 0.5*c)^2 - 4 * (-0.5) * (a^2 + c^2 + 2.5*a*c) = 0.25*(a - c)^2 + 2*a^2 + 2*c^2 + 5*a*c
x1 = (-b + sqrt(D)) / (2*a)
x2 = (-b - sqrt(D)) / (2*a)
suma
-re(a) - 2.0*re(c) + I*(-im(a) - 2.0*im(c)) + 2.0*re(a) + I*(2.0*im(a) + im(c)) + re(c)
=
1.0*re(a) - 1.0*re(c) + I*(-im(a) - 2.0*im(c)) + I*(2.0*im(a) + im(c))
producto
(-re(a) - 2.0*re(c) + I*(-im(a) - 2.0*im(c)))*(2.0*re(a) + I*(2.0*im(a) + im(c)) + re(c))
=
-(2.0*re(a) + I*(2.0*im(a) + im(c)) + re(c))*(2.0*re(c) + I*(2.0*im(c) + im(a)) + re(a))
-(2.0*re(a) + i*(2.0*im(a) + im(c)) + re(c))*(2.0*re(c) + i*(2.0*im(c) + im(a)) + re(a))
x1 = -re(a) - 2.0*re(c) + I*(-im(a) - 2.0*im(c))
x2 = 2.0*re(a) + I*(2.0*im(a) + im(c)) + re(c)
x2 = i*(2.0*im(a) + im(c)) + 2.0*re(a) + re(c)