To evaluate the integral \( \int_{-2}^{4} x \lfloor x \rfloor \, dx \), where \( \lfloor x \rfloor \) denotes the greatest integer function, we will break the integral into segments based on the behavior of the greatest integer function.
### Step 1: Identify the intervals based on the greatest integer function
The greatest integer function \( \lfloor x \rfloor \) takes constant integer values over intervals. We can identify the intervals where \( \lfloor x \rfloor \) is constant:
- From \( -2 \) to \( -1 \): \( \lfloor x \rfloor = -2 \)
- From \( -1 \) to \( 0 \): \( \lfloor x \rfloor = -1 \)
- From \( 0 \) to \( 1 \): \( \lfloor x \rfloor = 0 \)
- From \( 1 \) to \( 2 \): \( \lfloor x \rfloor = 1 \)
- From \( 2 \) to \( 3 \): \( \lfloor x \rfloor = 2 \)
- From \( 3 \) to \( 4 \): \( \lfloor x \rfloor = 3 \)
### Step 2: Break the integral into segments
We can express the integral as a sum of integrals over these intervals:
\[
\int_{-2}^{4} x \lfloor x \rfloor \, dx = \int_{-2}^{-1} x(-2) \, dx + \int_{-1}^{0} x(-1) \, dx + \int_{0}^{1} x(0) \, dx + \int_{1}^{2} x(1) \, dx + \int_{2}^{3} x(2) \, dx + \int_{3}^{4} x(3) \, dx
\]
### Step 3: Evaluate each integral
Now we will evaluate each integral separately.
1. **From \( -2 \) to \( -1 \)**:
\[
\int_{-2}^{-1} x(-2) \, dx = -2 \int_{-2}^{-1} x \, dx = -2 \left[ \frac{x^2}{2} \right]_{-2}^{-1} = -2 \left( \frac{(-1)^2}{2} - \frac{(-2)^2}{2} \right) = -2 \left( \frac{1}{2} - 2 \right) = -2 \left( \frac{1}{2} - \frac{4}{2} \right) = -2 \left( -\frac{3}{2} \right) = 3
\]
2. **From \( -1 \) to \( 0 \)**:
\[
\int_{-1}^{0} x(-1) \, dx = -\int_{-1}^{0} x \, dx = -\left[ \frac{x^2}{2} \right]_{-1}^{0} = -\left( 0 - \frac{(-1)^2}{2} \right) = -\left( -\frac{1}{2} \right) = \frac{1}{2}
\]
3. **From \( 0 \) to \( 1 \)**:
\[
\int_{0}^{1} x(0) \, dx = 0
\]
4. **From \( 1 \) to \( 2 \)**:
\[
\int_{1}^{2} x(1) \, dx = \int_{1}^{2} x \, dx = \left[ \frac{x^2}{2} \right]_{1}^{2} = \left( \frac{2^2}{2} - \frac{1^2}{2} \right) = \left( 2 - \frac{1}{2} \right) = \frac{3}{2}
\]
5. **From \( 2 \) to \( 3 \)**:
\[
\int_{2}^{3} x(2) \, dx = 2 \int_{2}^{3} x \, dx = 2 \left[ \frac{x^2}{2} \right]_{2}^{3} = \left( 3^2 - 2^2 \right) = 9 - 4 = 5
\]
6. **From \( 3 \) to \( 4 \)**:
\[
\int_{3}^{4} x(3) \, dx = 3 \int_{3}^{4} x \, dx = 3 \left[ \frac{x^2}{2} \right]_{3}^{4} = 3 \left( \frac{4^2}{2} - \frac{3^2}{2} \right) = 3 \left( \frac{16}{2} - \frac{9}{2} \right) = 3 \left( \frac{7}{2} \right) = \frac{21}{2}
\]
### Step 4: Combine all results
Now we can combine all the results from the segments:
\[
\int_{-2}^{4} x \lfloor x \rfloor \, dx = 3 + \frac{1}{2} + 0 + \frac{3}{2} + 5 + \frac{21}{2}
\]
Calculating this step by step:
\[
3 + \frac{1}{2} + \frac{3}{2} + 5 + \frac{21}{2} = 3 + 5 + \left( \frac{1 + 3 + 21}{2} \right) = 8 + \frac{25}{2} = 8 + 12.5 = 20.5
\]
### Final Answer
Thus, the value of the integral is:
\[
\int_{-2}^{4} x \lfloor x \rfloor \, dx = 20.5
\]