TITLE: Find the range of $k$ for which the inequality $k\cos^2x-k\cos x+1\geq0 ,\forall x\in(-\infty,\infty)$ holds.
QUESTION [5 upvotes]: Find the range of $k$ for which the inequality $k\cos^2x-k\cos x+1\geq0 ,\forall x\in(-\infty,\infty)$ holds.

This is an inequality involving trigonometric function $\cos x$ which varies from $-1$ to $1$.
If the question had been $kx^2-kx+1\geq 0$, i would have easily solved it,by using the discriminant property of the quadratics.If quadratic is positive then its discriminant is negative but i am not able to find the range of $k$ in this question.

REPLY [7 votes]: Just another way: Equivalently, you have to find when 
$$4k(\cos x -\tfrac12)^2  \ge k-4$$
Now $\cos x \in [-1, 1] \implies (\cos x - \tfrac12)^2 \in [0, \tfrac94]$, and so $ k \in [-\frac12, 4]$.