To evaluate the integral \( \int_{-1}^{\frac{3}{2}} |x \sin(\pi x)| \, dx \), we will follow these steps:
### Step 1: Determine the points where the function changes sign
We need to find where \( x \sin(\pi x) = 0 \) within the interval \([-1, \frac{3}{2}]\). This occurs when either \( x = 0 \) or \( \sin(\pi x) = 0 \). The sine function is zero at integer multiples of \(\pi\), so we have:
- \( \sin(\pi x) = 0 \) at \( x = 0, 1, 2, \ldots \)
In our interval, the relevant points are \( x = 0 \) and \( x = 1 \).
### Step 2: Break the integral into intervals
The integral can be broken down into three parts based on the points found:
\[
\int_{-1}^{\frac{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}^{\frac{3}{2}} |x \sin(\pi x)| \, dx
\]
### Step 3: Determine the sign of \( x \sin(\pi x) \) in each interval
1. **For \( x \in [-1, 0] \)**:
- \( x \) is negative and \( \sin(\pi x) \) is also negative (since \( \sin \) is negative in the interval \([-\pi, 0]\)).
- Thus, \( x \sin(\pi x) \) is positive, so \( |x \sin(\pi x)| = -x \sin(\pi x) \).
2. **For \( x \in [0, 1] \)**:
- Both \( x \) and \( \sin(\pi x) \) are positive.
- Thus, \( |x \sin(\pi x)| = x \sin(\pi x) \).
3. **For \( x \in [1, \frac{3}{2}] \)**:
- \( x \) is positive and \( \sin(\pi x) \) is negative (since \( \sin \) is negative in the interval \([\pi, \frac{3\pi}{2}]\)).
- Thus, \( |x \sin(\pi x)| = -x \sin(\pi x) \).
### Step 4: Rewrite the integral
Now we can rewrite the integral:
\[
\int_{-1}^{\frac{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}^{\frac{3}{2}} -x \sin(\pi x) \, dx
\]
### Step 5: Evaluate each integral
1. **Evaluate \( \int_{-1}^{0} -x \sin(\pi x) \, dx \)**:
- Using integration by parts, let \( u = -x \) and \( dv = \sin(\pi x) \, dx \).
- Then \( du = -dx \) and \( v = -\frac{1}{\pi} \cos(\pi x) \).
- Applying integration by parts:
\[
\int -x \sin(\pi x) \, dx = -x \left(-\frac{1}{\pi} \cos(\pi x)\right) \bigg|_{-1}^{0} + \frac{1}{\pi} \int \cos(\pi x) \, dx
\]
2. **Evaluate \( \int_{0}^{1} x \sin(\pi x) \, dx \)**:
- Again using integration by parts, let \( u = x \) and \( dv = \sin(\pi x) \, dx \).
- Then \( du = dx \) and \( v = -\frac{1}{\pi} \cos(\pi x) \).
- Applying integration by parts:
\[
\int x \sin(\pi x) \, dx = -\frac{1}{\pi} x \cos(\pi x) \bigg|_{0}^{1} + \frac{1}{\pi} \int \cos(\pi x) \, dx
\]
3. **Evaluate \( \int_{1}^{\frac{3}{2}} -x \sin(\pi x) \, dx \)**:
- This will be similar to the first integral, but with different limits.
### Step 6: Combine results
After evaluating each integral, combine the results to get the final answer.