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

Homework Statement

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

Homework 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

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

Related Calculus and Beyond Homework Help News on Phys.org
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