# When do we need to separate areas while calculating definite integrals?

Many times when the function has range $f(x) \lt 0$ and also $f(x) > 0$ and we want to calculate an area of the function we need to separate the area in two parts. Thus, we will calculate the whole area as: $$S = \big{\lvert} S_1\big\rvert +\big\lvert S_2\big\rvert$$

This is because the definite integral of $S_1$ or the one of $S_2$ could be negative.

However, in many cases we don't. For example, with $$f(x) = x + \sin^2x$$

Here in this image we don't need to separate the areas for calculating for example the area between $-\pi\le x \le \pi$. But why?

Could you give examples where we need to separate the areas and sum them up with absolute values, and examples where we don't need.

• What do you mean "here" we don't? WolframAlpha does not mention areas anywhere ... – Hagen von Eitzen Apr 9 '16 at 15:24
• Do you know odd,even functions we split up areas if by doing so we get even and odd function which would give resultant area as $0$ – Archis Welankar Apr 9 '16 at 15:27
• @HagenvonEitzen I mean here by the image of the function. – Pichi Wuana Apr 9 '16 at 15:28
• @HagenvonEitzen I edited the question. – Pichi Wuana Apr 9 '16 at 15:30
• Basically you don't need any extra tinkering with the function if you can just compute a primitive. – Captain Lama Apr 9 '16 at 15:31