Why is my approach the wrong method? The equation $\sin^4x-2\cos^2x+a^2=0$ can be solved if :
My approach was to substitute $y$ as $\sin^2x$ and form the quadratic $y^2+2y+a^2-2=0.$
$D\geq0,$ so $-\sqrt3\leq a\leq\sqrt3.$
Which is not the answer $a²\leq2.$
My guess is that $D\geq0$ can only be applied if $y$ has all real values but I am not sure.
And could an alternative method be given? This is the only method I have to approach these kind of problems.
 A: The flaw in your argument is that setting the discriminant $D$ to be non-negative merely finds the restriction on $a$ such that $$y=\sin^2x\in\mathbb{R};$$ whereas the actual goal is to find the restriction on $a$ such that $$x\in\mathbb{R}.$$ The latter restriction is narrower because $$x\in\mathbb{R}\implies y\in\mathbb{R} \quad\text{ but}\quad y\in\mathbb{R} \kern.6em\not\kern-.6em\implies x\in\mathbb{R}.$$

So to solve the problem, first simplify the given equation by completing the square:
$$\sin^4x-2\cos^2x+a^2=0\\
\iff (\sin^2x)^2-2(1-\sin^2x)+a^2=0\\
\iff (\sin^2x)^2+2\sin^2x+a^2-2=0\\
\iff (\sin^2x+1)^2+a^2-3=0\\
\iff (\sin^2x+1)^2=3-a^2.$$
Then set the given restriction:
$$x\in\mathbb{R}\\
\iff -1\leq \sin x \leq1\\
\iff 1\leq (\sin^2 x+1)^2 \leq4\\
\iff 1\leq 3-a^2 \leq4\\
\iff -1\leq a^2 \leq 2\\
\iff a^2\leq2\\
\iff -\sqrt2\leq a \leq\sqrt2.$$
A: With the quadratic formula you find that
$$\sin^2(x)=-1+\sqrt{3-a^2}\mbox,$$
so first of all $|a|\le \sqrt{3}$ as you found, but you sill have to chech for which of these $a$ you obtain
$$0\le -1+\sqrt{3-a^3}\le 1 \iff 1 \le 3-a^2 \le 4 \iff-1 \le a^2\le 2 \iff a^2\le 2$$
