<s>[INST] Find the following Definite Integral $\int_{-1}^{1}(\{x+1\}\{x^2+2\})+(\{x^2+3\}\{x^3+4\})dx$, where $\{.\}$ is the fractional part of $x$. Integrate: $$\int_{-1}^{1}(\{x+1\}\{x^2+2\})+(\{x^2+3\}\{x^3+4\})dx$$
My attempt: We know that within the interval $[0,1)$, the following is true: 
$$\{x+1\}=x$$ 
$$\{x^2+2\}=x^2$$
$$\{x^2+3\}=x^2$$
$$\{x^3+4\}=x^3$$
Therefore $$I_1=\int_{0}^{1}x^3+x^5=5/12.$$
Similarily on the interval $[-1,0)$ we can write: 
$$\{x+1\}=x+1$$ 
$$\{x^2+2\}=x^2$$
$$\{x^2+3\}=x^2$$
$$\{x^3+4\}=x^3+1$$
Therefore, $$I_2=\int_{-1}^{0}x^3+2x^2+x^5=2/3-5/12.$$ Hence $$\int_{-1}^{1}(\{x+1\}\{x^2+2\})+(\{x^2+3\}\{x^3+4\})dx=2/3.$$ However the answer is $-2/3.$ I think I've made a mistake in the second transformations. Regardless, please explain where am I going wrong. 
 [/INST] If $x\in [-1,1]$, then $x^2,x^3,x^4\in [0,1]$. Now, when we add at least 1 to $y$, where $y\in [-1,1]$ its fractional part will be positive. Thus, you have a positive expression under the integral, so result cannot be negative.
</s>