how do i evaluate the integral of the absolute value of x from -2 to 1? can someone show me? thanks.

Try evaluating it as 2 integrals by defining |x| piecewise.

|x| = {x, x>=0; -x, x<0}

To evaluate the integral of the absolute value of x from -2 to 1, you can split the integral into two separate integrals based on the intervals where the absolute value function changes sign.

The absolute value function can be written as a piecewise function:
|x| = x, for x ≥ 0
|x| = -x, for x < 0

In this case, we need to evaluate the integral from -2 to 1, which includes both negative and positive values of x. So we'll split the integral into two parts: one from -2 to 0 (where x is negative) and another from 0 to 1 (where x is positive).

Let's evaluate each of these integrals separately:

Integral from -2 to 0: ∫(-2 to 0) |x| dx
Since x is negative in this interval, we can rewrite the absolute value function as -x:
∫(-2 to 0) |x| dx = ∫(-2 to 0) -x dx
Now we can integrate -x with respect to x:
= [-x^2/2] evaluated from -2 to 0
= [-(0)^2/2] - [-(2)^2/2]
= [0] - [(-4)/2]
= 0 + 2
= 2

Integral from 0 to 1: ∫(0 to 1) |x| dx
In this interval, x is positive, so we can keep the absolute value function as x:
∫(0 to 1) |x| dx = ∫(0 to 1) x dx
Now we can integrate x with respect to x:
= [x^2/2] evaluated from 0 to 1
= (1^2/2) - (0^2/2)
= 1/2 - 0
= 1/2

To find the overall integral from -2 to 1, we sum up the two separate integrals:

Overall integral = Integral from -2 to 0 + Integral from 0 to 1
= 2 + 1/2
= 5/2

Therefore, the integral of the absolute value of x from -2 to 1 is 5/2.