Integrating $|x \sin(\pi x)|$ over $-1 \leq x \leq 3/2$ $$\int_{-1}^{3/2} |x \sin(\pi x)| \, dx.$$
The second part of the sum I can do.
The problem is to set the limits before spliting.
I mean before spliting the integral into two integrals, how to set the limits?
 A: You can make your life easier if you make the substitution
$$
\pi x=t
$$
so the integral becomes
$$
\frac{1}{\pi^2}\int_{-\pi}^{3\pi/2}|t\sin t|\,dt
$$
and take into account that between $-\pi$ and $0$ the sine is negative, as well as between $\pi$ and $3\pi/2$, so you can write it as
$$
\int_{-\pi}^0 t\sin t\,dt
+
\int_{0}^\pi t\sin t\,dt
-
\int_{\pi}^{3\pi/2} t\sin t\,dt
=
\int_{-\pi}^\pi t\sin t\,dt
-
\int_{\pi}^{3\pi/2} t\sin t\,dt
$$
dividing the result by $\pi^2$.
The antiderivative
$$
\int t\sin t\,dt
$$
can be computed by parts.
A: The problem is the absolute value. Without that, you could use regular integration techniques to solve the problem.
You need to find where the expression in the absolute value is positive and where it is negative, so you can split the integral into multiples integrals and you can change the absolute value to a plus sign or a minus sign. Since the expression in the absolute value is continuous, the easiest way to do that is to see where the expression becomes zero, and those roots will be the limits of your smaller integrals.
(As I wrote, you need to find where the inner expression is positive and where it is negative, since the definition of absolute value depends on the sign of the expression. The expression is continuous, so by the Intermediate Value Theorem the function must become zero whenever it switches sign. So, the expression is positive in an interval between two points that are either zeros of the expression or endpoints of your overall interval. We find $-1,0,$ and $1$, and the right endpoint is $3/2$. So any interval where the expression stays positive or stays negative is between two of those values. Finding the zeros is key to finding the intervals, so we find where the expression equals zero.)
So solve $x\sin(\pi x)=0$, which is easy. In the interval of integration $[-1,3/2]$, the roots are $-1$, $0$, and $1$. We use these roots to get
$$\int_{-1}^{3/2} |x \sin(\pi x)| \, dx$$
$$=\int_{-1}^{0} |x \sin(\pi x)| \, dx+\int_{0}^{1} |x \sin(\pi x)| \, dx+\int_{1}^{3/2} |x \sin(\pi x)| \, dx$$
$$=\int_{-1}^{0} x \sin(\pi x) \, dx+\int_{0}^{1} x \sin(\pi x) \, dx+\int_{1}^{3/2} -x \sin(\pi x) \, dx$$
It is a "coincidence" that the first two small integrals give the same expression (it is because zero is a double-root of the expression). You could re-combine those two, if you like.
You can then do each small integral by substitution and integration by parts.
