Finding values for K such that the roots of the quadratic are strictly imaginary: $x^2+\left(K^2+3K-7\right)x+K$ $x^2+\left(K^2+3K-7\right)x+K$ 
I'd like to know the general approach needed to find out how to find solutions for K when I want the roots of this equation to have a specific property, such as strictly imaginary, or when I want them to have a positive real part only, or negative real part only.
Bonus points if the approach applies to a general quadratic of the form $ax^2+bx+c$, what equations should be satisfied if I want specific properties for the roots? Extra bonus points for the same question, but for cubic and quartic equations.
 A: Hint: The roots of a monic quadratic are strictly imaginary iff it is of the form $(x-bi)(x+bi)=x^2+b^2$.
A: The real part comes from coefficient of $x$, so this coefficient should be $0$ or
$$K^2+3K-7=0$$
then solve it and check if the $K>0$ to get what you need 
A: $ax^2 + bx + c = 0$
By the quadratic formula
$x = \frac {-b \pm \sqrt {b^2 - 4ac}}{2a}$
In this case $b$ is a function of $k$ instead of a constant, but that doesn't matter.
If we want strictly imaginary roots then
$b = 0$ and $b^2 - 4ac < 0$
If we want real roots then
$b^2 - 4ac > 0$
If you want one root (of multiplicity 2)
$b^2 - 4ac = 0$
$b = 0$
Then $k^2 + 3k - 7 = 0$
Use the quadratic formula to solve for $k$
$k = \frac {-3 \pm \sqrt {9+28}}{2}$
And in order for $b^2 - 4ac < 0$ then $k > 0$
$k = \frac {-3 + \sqrt {37}}{2}$
A: So the solution is like $x=ai$ where $a$ is real, so $$-a^2+ai(k^2+3k-7)+k=0$$

If $k$ is real then $a =\pm\sqrt{k}$ and $k^2+3k-7=0$ so $$ k= {-3\pm \sqrt{37}\over 2}$$
so $$ a=\pm\sqrt{-3+ \sqrt{37}\over 2}$$
