It is a bit strange that your function is $xf(x)$ while $f(x)$ alone is never used. I'll just define $g(x) = \frac 12\left(\cos(x^2) - \cos(x+1)^2 + r(x)\right)$ and try to find $\limsup_{x\to\infty} g(x)$ and $\liminf_{x\to\infty} g(x)$. Like Till said, the term $r(x)$ will eventually go to $0$ so it's unimportant. The problem is with $\cos(x^2) - \cos(x+1)^2$.
Let's prove that $\cos(x^2) - \cos(x+1)^2$ has $\limsup$ and $\liminf$ equal to $2$ and $-2$ respectively. It is obvious that $-2 \le h(x) \le 2$ for all $x$.
Suppose $x^2 = 2n\pi$. Then $x = \sqrt{2n\pi}$, and $(x + 1)^2 = 2n\pi + 1 + 2\sqrt{2n\pi}$. The difference of these two terms is $1 + 2\sqrt{2n\pi}$. We will show that the set $S = \{e^{(1 + 2\sqrt{2n\pi})i}\}$ in the complex plane has as its closure the unit circle. Given $\epsilon > 0$, pick $N$ such that $\sqrt{N + 1} - \sqrt{N} < \epsilon$. Then for all $n > N$, we have $2\sqrt{2\pi}(\sqrt{n+1} - \sqrt n) < 2\sqrt{2\pi}\epsilon$. This shows that $S$ is dense in the unit circle. We can also show that $-1 \notin S$: if $-1 \in S$, then there exist integers $m$ and $n$ such that $1 + 2\sqrt{2n\pi} = (2m + 1)\pi$. Rearranging gives $(2m + 1)^2\pi^2 - (4m + 8n + 2)\pi + 1 = 0$. This would imply that $\pi$ is algebraic, hence a contradiction. Therefore, $-1 \in \overline S - S$, and that implies $\limsup_{x\to\infty} (\cos(x^2) - \cos(x + 1)^2) = 2$.
The case for $\liminf$ is similar: Replace $2n$ in the above paragraph with $2n - 1$ and make some minor changes.