<s>[INST] Set of values of $a$ for which function always increases If the set of all values of the parameter $a$ for which the function $$f(x)=\sin (2x)-8(a+1) \sin x+(4a^2+8a-14)x$$ increases for all $x \in R$ and has no critical point for all $x \in R$ is $(- \infty, m- \sqrt n) \cup (\sqrt n, \infty)$, then find the value of $m^2+n^2$ (where $m,n$ are prime numbers).
After finding $f'(x)$, we need to set $f'(x)>0$ but I am not having any clue how to extract condition on $a$? Could someone help me with this?
 [/INST] Taking the derivative
$$f'(x) = 2\cos(2x) - 8(a+1)\cos x + (4a^2 + 8a -14)$$
Now both $\cos (2x)$ and $\cos x$ oscillate between $-1$ to $1$. Thus assuming $a \ge -1$,
$$-2 - 8(a+1) + 4a^2 + 8a - 14 \le f'(x) \le 2 + 8(a+1) + 4a^2 + 8a - 14$$
$$4a^2  - 24 \le f'(x) \le 4a^2 + 16a - 4$$
$$4(a^2  - 6) \le f'(x) \le 4(a^2 + 4a - 1)$$
Then $a > \sqrt{6}$ implies $0 < 4(a^2 - 6) \le f'(x)$.
On the other hand, if $a < 1$,
$$-2 + 8(a+1) + 4a^2 + 8a - 14 \le f'(x) \le 2 - 8(a+1) + 4a^2 + 8a - 14$$
$$4a^2 + 16a - 8 \le f'(x) \le 4a^2 - 20$$
$$4(a^2 + 4a - 2) \le f'(x) \le 4(a^2 - 5)$$
Then $a < -2 - \sqrt{6}$ implies $0 < 4(a^2 + 4a - 2) \le f'(x)$.
Therefore $a \in (-\infty,-2-\sqrt{6})\cup(\sqrt{6},\infty)$ makes the derivative positive for all $x$, which means the function is strictly increasing and has no critical points.

This seems to match what they are after except that $6$ isn't prime. Did I make an error somewhere?
</s>