# How to integrate modulus function ( absolute value) within the specified limits

1. Nov 21, 2011

### phygeeknerd12

1. The problem statement, all variables and given/known data

integrate modulus of xcos∏x within the limits -1 to 1/2

P.S I'm not allowed to use acaluculator so graphing and finding out the answer not possible
2. Relevant equations

it's using the property of definite integral
∫f(x) dx within the limit from a to b = ∫f(x) dx within the limit from a to c + ∫f(x) dx within the limit from c to b

3. The attempt at a solution

i tried the problem but i don't know how to split the limits..,i.e, how to find c

2. Nov 21, 2011

### Deveno

where is xcos(πx) non-negative?

split your interval into 4 regions:

where x < 0 and cos(πx) < 0
where x < 0 and cos(πx) ≥ 0
where x ≥ 0 and cos(πx) < 0
where x ≥ 0 and cos(πx) ≥ 0

(it may be that some of these regions are empty).

then integrate the appropriate integrand for each of the (up to) 4 regions.

for example, on a region where x is negative and the cosine is positive,

you want -∫f