# Solving an equation involving the real and complex roots of the function

I have a equation:

$$1+k\cdot\frac{80}{(s+2)(s+5)(s+8)}=0\to k\cdot80+(s+2)(s+5)(s+8)=0$$

When we solve that equation for $s$ we get three solutions. Two of those are complex solutions which are eachothers conjugate and the other one is the real solution. When I set:

$$\left|\frac{\text{real solution}}{\text{complex solution}}\right|=1\to\left|\text{real root}\right|=\left|\text{complex root}\right|$$

I need to solve that for $\text{k}$.

Using wolframalpha I found the solutions for $s$: here. So when I call them $s_\text{real root}$ and $s_\text{complex roots}$ I need to solve $k$ for:

$$\left|s_\text{real root}\right|=\left|s_\text{complex roots}\right|$$

You can approach the problem as follows. Denote the real solution as $s_1=r$. Then we have that the two complex solutions are given by $$s_2= r e^{i\phi} \qquad s_3 = r e^{-i\phi}.$$

The polynomial producing these solutions has to be (a multiple of) $$(s-s_1)(s-s_2)(s-s_3)= s^3 - r (2 \cos \phi +1) s^2 + r^2 (2 \cos \phi +1) s -r^3.$$

Your polynomial gives $$80 k+(s+2) (s+5) (s+8)= s^3+ 15 s^2 +66 s + 80(1+k)$$ Comparing the coefficients, we have $$r^3 = - 80 (1+k), \quad r^2 (2 \cos \phi+1) =66, \qquad r(2\cos \phi+1) = -15.$$ Dividing the second by the third equation, we have $$r= -\frac{66}{15}=-\frac{22}5.$$

The last equation reads $$-\frac{22}{5} (2 \cos \phi+1) = -15$$ which is equivalent to $$\cos \phi = \frac{53}{44}.$$ As $53/44>1$ there is no solution $\phi\in\mathbb{R}$ and thus your problem has no solution.

Let the real root be $r\,$, then if the $2$ complex conjugate roots have the same modulus $|r|$, it follows by Vieta's relations that $|r|^3=|-80(k+1)| \iff 80k=\pm r^3-80\,$.

• If $80k=- r^3-80\,$ then substituting back: \require{cancel} \begin{align} 0 = (r+2)(r+5)(r+8)+80k = \bcancel{r^3} + 15 r^2 + 66 r + \cancel{80} - \bcancel{r^3} - \cancel{80} = r(15r+66) \\ \end{align} $r=0$ is not a solution since not all $3$ roots can be $0\,$, which leaves $r=-\cfrac{66}{15}=-\cfrac{22}{5}\,$. With $80k=\cfrac{22^3}{5^3}-80\,$, and factoring out the now known factor $s+\cfrac{22}{5}$ the equation becomes: \begin{align} s^3 + 15 r^2 + 66 r + \cancel{80} + \frac{22^3}{5^3} - \cancel{80} &\iff 125 s^3 + 1875 s^2 + 8250s+10648=0 \\ &\iff (5 s + 22) (25 s^2 + 265 s + 484) = 0 \end{align} However, the quadratic factor has discriminant $\Delta \gt 0$ and therefore $2$ distinct real roots, rather than complex conjugate ones, so the original problem has no solutions in this case.

• If $80k= r^3-80\,$: \require{cancel} \begin{align} 0 = r^3 + 15 r^2 + 66 r + \cancel{80} + r^3 - \cancel{80} = r(2r^2+15r+66) \\ \end{align} Again $r=0$ is not an eligible solution, and the quadratic has no real roots, so the original problem has no solutions in this case, either.