[input]solve( (3+i)^3 + p*(3+i)^2 + 40*(3+i) + q = 0, q)[/input]
q=(-((6*i+8)*p)-(66*i))-138
p and q are real, so q= "(-((6*i+8)*p)-(66*i))-138" has to be real. because of "-(66*i)", the term "-((6*i+8)*p)" needs an imaginary part of +(66*i).
so p is -11.
(-((6*i+8)*p)-(66*i))-138 = (-((6*i+8)*(-11))-(66*i))-138 = -50
p = -11 and q = -50
[input]z^3 + -11*z^2 + 40z - 50 = 0[/input]
three solutions:
{z=3-(1*i), z=3+1*i, z=5}
susie: Write down the other root of the equation.
z=3-i and z=5