Range of $a$ in Trigonometric equation 
If the inequality $\sin^2 x+a\cos x+a^2>1+\cos x$ hold for any $x\in \mathbb{R}.$ Then range of $a$ is 

Try: $1-\cos^2 x+a\cos x+a^2-1-\cos x>0$
$$\cos^2 x+(1-a)\cos x-a^2<0$$
$$4\cos^2 x+4(1-a)\cos x-4a^2<0$$
$$\bigg(2\cos x+(1-a)\bigg)^2-4a^2-(1-a)^2<0$$
Could some help me how to solve further, Thanks
 A: Your approach is fine.
You already got
$$\bigg(2\cos x+(1-a)\bigg)^2-4a^2-(1-a)^2<0$$
which is equivalent to
$$\bigg(2\cos x+(1-a)\bigg)^2\lt 5a^2-2a+1\tag1$$
Since $5a^2-2a+1$ is always positive, $(1)$ is equivalent to
$$-\sqrt{5a^2-2a+1}\lt 2\cos x+1-a\lt \sqrt{5a^2-2a+1}$$
which is equivalent to
$$\frac 12\left(a-1-\sqrt{5a^2-2a+1}\right)\lt \cos x\lt\frac 12\left(a-1+\sqrt{5a^2-2a+1}\right)\tag2$$
The necessary and sufficient condition that $(2)$ holds for any $x\in\mathbb R$ is
$$\frac 12\left(a-1-\sqrt{5a^2-2a+1}\right)\lt -1\quad\text{and}\quad 1\lt \frac 12\left(a-1+\sqrt{5a^2-2a+1}\right),$$
i.e.
$$\sqrt{5a^2-2a+1}\gt a+1\quad \text{and}\quad  \sqrt{5a^2-2a+1}\gt -a+3\tag3$$ 
If $a\lt -1$, then 
$$(3)\iff 5a^2-2a+1\gt (-a+3)^2\iff a\in (-\infty, -2)\cup (1,\infty)$$
So, in this case, we have $a\in (-\infty,-2)$.
If $-1\le a\lt 3$, then
$$\begin{align}(3)&\iff 5a^2-2a+1\gt (a+1)^2\quad\text{and}\quad 5a^2-2a+1\gt (-a+3)^2\\\\&
\iff a\in (-\infty, -2)\cup (1,\infty)\end{align}$$
So, in this case, we have $a\in (1,3)$.
If $a\ge 3$, then
$$(3)\iff 5a^2-2a+1\gt (a+1)^2\iff a\in (-\infty,0)\cup (1,\infty)$$
So, in this case, we have $a\in [3,\infty)$.
Therefore, the range of $a$ is
$$a\in (-\infty,-2)\cup (1,3)\cup [3,\infty),$$
i.e.
$$a\in (-\infty, -2)\cup (1,\infty)$$

Another approach
First, let us prove the following lemma : 
Lemma 1 : 
If the inequality holds for any $x\in\mathbb R$, then $a$ has to, at least, satisfy $a\lt -2$ or $a\gt 1$.
Proof : 
The inequality 
$$\sin^2 x+a\cos x+a^2>1+\cos x$$
holds for $x=0$, so we have to have
$$a+a^2\gt 2,$$
i.e.
$$a\lt -2\quad\text{or}\quad a\gt 1\qquad\square$$
Next, let us prove the following lemma :
Lemma 2 : 
For any $a$ satisfying $a\lt -2$ or $a\gt 1$, the inequality holds for any $x\in\mathbb R$.
Proof : 
The inequality can be written as
$$t^2+(1-a)t-a^2\lt 0\tag4$$
where  $t=\cos x$.
So, we want to prove that
$$a\in (-\infty, -2)\cup (1,\infty)\implies \text{$(4)$ holds for any $t$ satisfying $|t|\le 1$}\tag5$$
Let $f(t)$ be the LHS of $(4)$, and let us consider the graph of $y=f(t)$.
If $a\in (-\infty, -2)\cup (1,\infty)$, then we have
$$f(-1)=-a^2+a\lt 0\qquad \text{and}\qquad f(1)=-a^2-a+2\lt 0$$
Since the graph of $y=f(t)$ is an upward parabola, it follows that if $a\in (-\infty, -2)\cup (1,\infty)$, then $f(t)\lt 0$ for any $t$ satisfying $|t|\le 1.\quad\square$
If follows from Lemma 1 and Lemma 2 that the range of $a$ is
$$a\in (-\infty, -2)\cup (1,\infty)$$
A: Given task allows suitable algebraic approach, because it is equivalent to the system of
\begin{cases}
\cos x =t\\
t\in[-1,1]\\
t^2+(1-a)t-a^2<0,\tag1 
\end{cases}
wherein the parabola $P(t,a) = t^2+(1-a)t-a^2$ has the positive discriminant 
$$D=(1-a)^2+4a^2.\tag2$$
The roots of $P(t,a)$ are
$$t_1 = \dfrac{a-1 - \sqrt D}2,\quad t_2 = \dfrac{a-1 + \sqrt D}2\tag3$$
wherein
$$P(t,a) = (t-t_1)(t-t_2)\tag4$$
is negative iff
$$t\in(t_1,t_2).\tag5$$
Condition $(5)$ is satisfied for all $t\in[-1,1]$ iff
$\mathbf{[-1,1] \subset (t_1,t_2)},$
or $t_1<-1$ and $t_2>1.$
This leads to the system in the form of
\begin{cases}
a-1-\sqrt{(a-1)^2+4a^2} < -2\\[4pt]
a-1 +\sqrt{(a-1)^2+4a^2} > 2,\tag6
\end{cases}
$$\sqrt{(a-1)^2+4a^2} > \max(a+1,\,3-a).\tag7$$
Since
$$\max(a+1,3-a) =
\begin{cases}
3-a,\quad\text{if}\quad a\in(-\infty,1)\\[4pt]
a+1,\quad\text{if}\quad a\in[1,\infty)\tag8
\end{cases}$$
is positive, then the inequality $(7)$ can be presented in the form of
$$\genfrac{[}{.}{0}{0}
{a\in(-\infty,1),\quad \sqrt{5a^2-2a+1} > 3-a}
{a\in[1,+\infty),\quad \sqrt{5a^2-2a+1} > a+1.}\tag9$$
Then
$$\genfrac{[}{.}{0}{0}
{a\in(-\infty,1),\quad 5a^2-2a+1 > a^2-6a+9}
{a\in[1,+\infty),\quad 5a^2-2a+1 > a^2+2a+1,}$$
$$\genfrac{[}{.}{0}{0}
{a\in(-\infty,1),\quad a^2+a-2 > 0}
{a\in[1,+\infty),\qquad\,\, a^2-a > 0,}$$
$$\genfrac{[}{.}{0}{0}
{a\in(-\infty,1),\quad (a+2)(a-1) > 0}
{a\in[1,+\infty),\qquad\,\, a(a-1) > 0\quad,}\tag{10}$$
$$\color{green}{\mathbf{a\in (-\infty,-2) \cup (1,+\infty).}}\tag{11}$$
Solution of $(7)$ can be illustrated, using Wolfram Alpha.

A: You get the quadratic equation:
$t^2+(1-a)t-a^2 \gt 0$ substituting $\cos x= t$. Now, the problem can be modified as: find the values of a such that $f(t):t^2+(1-a)t-a^2 \gt 0$ for $t \epsilon [-1,1]$. The equation is quadratic in t, and an upward parabola. So, if we try to analyse the situation graphically, we note that, there can be either of two situations for graph to be above x-axis for $t \epsilon [-1,1]$. 
 I 
For the first case , we see that sufficient condition is that it should take positive at 1 and the vertex should be to the right of 1. 
So: $ f(1)\gt 0$ and$ \frac {-(1-a)} {2*1}\gt 1$ [Note that for vertical parabola: $a't^2+bt+c=0,$ the x-coordinate of vertex is $\frac {-b} {2a'}$. So in $f(t), a'=1, b=(1-a)$ and $c= -a^2$]. So, now, solving $\frac {-(1-a)} {2*1}\gt 1$ gives, $a\gt 3$ ✓ 
Solving $f(1) \gt 0$ gives: $a^2+a-2 \lt 0$. The solutions of a satisfying this would be : $a \epsilon (-2,1)$ ✓ 
[Again, note that this would represent an upward parabola in a. It would take negative values where it intersects the x-axis, that is between the roots of the equation].
The intersection would be $\phi$✓  ✓  


 II 
Now,moving to the second case:
The sufficient conditions are that:
$f(-1) \gt 0$ and $ \frac {-(1-a)} {2*1}\lt -1$. Solving the first gives : $a^2-a \gt 0$ , so 
 $a \epsilon (-\infty,0) \cup (1, \infty)$✓  [ Note that here it has to take a positive value and 0,1 are the roots ]. Solving the second gives:$ a\lt -1$✓ . The intersection would be $(-\infty,-1)$✓ ✓ 


The final solution would be the union of the two cases I and II:so $a \epsilon (-\infty,-1) \cup \phi=(-\infty,-1)$✓✓✓✓ 
Note: it could have been actually divided into three cases-a third case would be actually that the parabola doesn't intersect the x-axis; it remains above it. But for this to happen: the discriminant of equation in t should be negative. In that case, we don't get any possible value of a. So that case is not possible
A: Alternatively, write it as:
$$\sin^2 x+a\cos x+a^2>1+\cos x \iff \\
a^2+\cos x\cdot a-(\cos ^2x+\cos x)>0 \iff \\
\left(a+\frac12\cos x\right)^2-(\cos ^2x +\cos x+\frac 14\cos ^2x)>0$$
Note that the graph of $f(a)=\left(a+\frac12\cos x\right)^2-(\cos ^2x +\cos x+\frac 14\cos ^2x)$ is an opening-up parabola with the vertex:
$$V\left(-\frac12\cos x,-\cos ^2x-\cos x-\frac14\cos^2x\right)$$
The extreme $y$-coordinates of the vertex are:
$$f'(x)=\left(-\cos^2x -\cos x-\frac14\cos^2x\right)'=\frac52\cos x\sin x+\sin x=0 \Rightarrow \\
1) \ \sin x\left(\frac52\cos x+1\right)=0 \Rightarrow 
\sin x=0 \ \text{(which implies $\cos x=\pm 1)$}\ \text{or} \\ 
2) \ \cos x=-\frac25 \ \text{(which imples $\sin x=\pm \frac{\sqrt{21}}{5}$)}.$$
Hence, there are three critical points:
$$\cos x=-1 \ \left(\text{$V\left(\frac12,-\frac14\right)$ is local min}\right);\\
\cos x=-\frac25 \ \left(\text{$V\left(\frac15,\frac15\right)$ is local max}\right);\\
\cos x=1 \ \left(\text{$V\left(-\frac12,-\frac94\right)$ is local min}\right)$$
Note: 1) SOC are left as an exercise. 2) See the Desmos graph.  
Hence, it is sufficient to consider the extreme cases:
$$\begin{align}f(a)&=\left(a-\frac12\right)^2-\frac14>0 \Rightarrow a\in (-\infty,0)\cup (1,+\infty)\\
f(a)&=\left(a-\frac15\right)^2+\frac15>0 \Rightarrow a\in (-\infty,+\infty)\\
f(a)&=\left(a+\frac12\right)^2-\frac94>0 \Rightarrow a\in (-\infty,-2)\cup (1,+\infty)\end{align}$$
which can be observed from the Desmos graph too.
