$xf(x)=\frac{1}{2}(\cos(x^2)-\cos[(x+1)^2]+r(x))$
$|r(x)|<c/x$ for constant $c$
Find the upper and lower limits of $xf(x)$ as $x→ \infty$

I'm a bit confused.
The solution of mine(1,-1) and my friend's ($\sin\frac{1}{2}$,-$\sin\frac{1}{2}$) are different.
It is possible that this question has two answers? (because of looseness of bounds)
Please let me know how to get the exact answer.

If you write function names like $\sin$ out as text, they're interpreted as a juxtaposition of variable names and get formatted accordingly (e.g. italicized). You can get the proper font and spacing for functions like $\sin$ by using the predefined commands like \sin. If you need a function for which there's no predefined command, you can use \operatorname{name}.
–
jorikiNov 27 '12 at 10:12

The second term decays as $x\rightarrow\infty$ and is thus irrelevant. The minima and maxima are determined by the envelope of the beat pattern defined by the product of sines. The amplitude is unity such that the minimum is -1 and the maximum is +1 as you mentioned.

See the plot below for an illustration. The envelope is plotted as a dashed red curve. The maxima are plotted as solid blue lines and the function $x f(x)$ is plotted in black.

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.