Find $k$ such that $f(x)$ is increasing 
For $f(x)=\cos2x+2xk^2+(2k+1)(k-1)x^2$, find $k$ such that $f(x)$ is increasing on $\mathbb{R}$.

I am able to find only one value of $k$ that is $1$ and the answer is also that only one such $k$ exists, but I am not able to prove this. 
Please help.
 A: Clearly, since $x^2$ is ''dominating'' if $|x|\to \infty $ we have $k=1$ or $k=-{1\over 2}$.
If $k=1$ we have $f(x) =\cos 2x +2x$ and $f'(x) =-2\sin 2x +2 \geq 0$ for all $x$. 
If $k=-{1\over 2}$ we have $f(x) =\cos 2x -x/2$ and $f'(x) =-2\sin 2x -1/2$ and so $f'(0)<0$ and $f'(-\pi/4) =2-1/2>0$, so it is not increasing.  
A: $f(x)$ is increasing if $f'(x)\ge 0$ for all $x$, that is, if $-2\sin(2x)+2k^2+2(2k+1)(k-1)x\ge 0$.  To ensure this, the coefficient $2(2k+1)(k-1)$ (in the last term) must be zero.  Using $k=1$ satisfies $f'(x)\ge 0$ but using $k=-\frac12$ does not.  Can you fill in the details?
A: If we differentiate and set $f'(x) \geq 0$, we get:
$$-2\sin(2x) + 2k^2 + 2(2k+1)(2k-1)x \geq 0$$
$$k^2 + (2k+1)(k-1)x \geq \sin(2x)$$
The only way this can be true for any $x$ is if the $x$ term vanishes. Therefore we solve:
$$(2k+1)(k-1) = 0 \quad\longrightarrow\quad k = 1 \vee k = -\frac{1}{2}$$
Now we must verify those solutions:
$$1 \geq \sin(2x)\quad\checkmark$$
$$\frac{1}{4} \geq \sin(2x)\quad \times$$
