What is the maximum value of $k$ so that $x^2+4(\sin^{2}{x}\tan^{2}{x}+\cos^{2}{x}\cot^{2}{x}+k^2-x\sec{x}\csc{x})=0$ has real roots. What is the largest value of $k$ such that the equation $$x^2+4(\sin^{2}{x}\tan^{2}{x}+\cos^{2}{x}\cot^{2}{x}+k^2-x\sec{x}\csc{x})=0$$ has real roots?


I tried to find out the roots in terms of $k$.
But I couldn't.

How do we approach this problem without finding the roots actually?
\begin{align}
  C &amp;\equiv \cos x \\
  S &amp;\equiv \sin x \\
  0 &amp;= x^2-(4\sec x \csc x)\, x+4(\sin^2 x \tan^2 x+\cos^2 x \cot^2 x+k^2) \\
  &amp;= x^2-\frac{4x}{SC}+4\left( \frac{S^6+C^6}{S^2 C^2}+k^2 \right) \\
  \Delta &amp;=
  \left( \frac{4}{SC} \right)^2-
  16\left( \frac{S^6+C^6}{S^2 C^2}+k^2 \right) \\
  &amp;= 16\left[ \frac{1-(S^6+C^6)}{S^2C^2}-k^2 \right] \\
  &amp;= 16
  \left[
    \frac{1-(\color{red}{S^2+C^2})(S^4-S^2C^2+C^4)}{S^2C^2}-k^2
  \right] \\
  &amp;= 16\left[ \frac{1-(S^4-S^2C^2+C^4)}{S^2C^2}-k^2 \right] \\
  &amp;= 16\left[ \frac{1+3S^2C^2-(\color{red}{S^2+C^2})^2}{S^2C^2}-k^2 \right] \\
  &amp;= 16(3-k^2) \\
\end{align}

Therefore,

$$\fbox{$-\sqrt{3} \le k \le \sqrt{3} \,$}$$
I would suggest plugging your equation into the quadratic formula to get

$$ x = \frac{1}{2} \sqrt{(-16)(\sin^2 x \tan^2 x + \cos^2 x \cot^2 x +k^2 - x \sec x \csc x)}$$

From here we see we need 

$$(-16)(\sin^2 x \tan^2 x + \cos^2 x \cot^2 x +k^2 - x \sec x \csc x) \gt 0$$

to have real roots.  Rearranging $\to$

$$ k^2 \lt  - \sin^2 x \tan^2 x - \cos^2 x \cot^2 x + x \sec x \csc x$$