Integration help x^2-x|1-x|

I've never integrated a modulus function before, from what I have read over the net you need to establish where the graph of the function is negative and positive and then split the integral up?

In this one the limits are -1 to 4 and the graph intersects the x-axis at 0 and 1/2 so does that mean I need split the integral into 3 going from -1 to 0, 0 to 1/2 and 1/2 to 4 right?

Although I am having trouble changing the x|1-x| part, when the graph is positive is it x(1-x) and when it is negative -x(1-x)?

Sorry if the wording is poor,

Regards.

Re: Integration help x^2-x|1-x|

Quote:

Originally Posted by

**Wevans2303** from what I have read over the net you need to establish where the graph of the function is negative and positive and then split the integral up?

Not the whole function, but the part inside |...|. Here, you have two cases: x <= 1 and x > 1.

Quote:

Originally Posted by

**Wevans2303** Although I am having trouble changing the x|1-x| part, when the graph is positive is it x(1-x) and when it is negative -x(1-x)?

$\displaystyle x^2-x|1-x|=\begin{cases}x^2-x(1-x)&x\le1\\x^2-x(-(1-x))&x>1\end{cases}$

Re: Integration help x^2-x|1-x|

Thanks, just to clarify, the two cases are where x<=1 and x>1 because the modulus part will go |1-x|>0 when x<=1 and |1-x|<0 when x>1?

Regards.

Re: Integration help x^2-x|1-x|

Quote:

Originally Posted by

**Wevans2303** the two cases are where x<=1 and x>1 because the modulus part will go |1-x|>0 when x<=1 and |1-x|<0 when x>1?

Rather, 1 - x >= 0 when x <= 1 and 1 - x < 0 when x > 1. The absolute value |1 - x| cannot be < 0.

Re: Integration help x^2-x|1-x|

Quote:

Originally Posted by

**emakarov** Rather, 1 - x >= 0 when x <= 1 and 1 - x < 0 when x > 1. The absolute value |1 - x| cannot be < 0.

Ah I understand, so I integrate each part and then add them together?

Are the limits -1 to 1 and 1 to 4?

Re: Integration help x^2-x|1-x|