Areas
A definite integral is the area under a graph, as in Definite integrals. But where the graph is below the axis, that area counts as negative. The car shows why.
Driving backwards
Say the car reverses for a while. Its speed is then negative, so its speed graph is below the axis. Integrating the speed gives where the car ends up: the metres it reversed are taken off the metres it drove forwards. If it drives 50 m forwards and reverses 20 m, it ends up 30 m from where it started. But its wheels have rolled 70 m. To know how far it drove, whichever way, the backwards part must count as positive.
So an integral can be smaller than the area it covers. To find an area, split it where the graph crosses the axis, and turn the sign of the parts below it.
Above and below the axis
The graph of minus x cubed plus 3 x is below the axis from minus 1 to 0, and above it from 0 to 1:
The integral from minus 1 to 1 is 0: the two parts are the same size, and one counts as negative. To get the area, take each part on its own. With the antiderivative minus x to the power 4 over 4 plus 3 x squared over 2, the part from 0 to 1 is 5 over 4, and the part from minus 1 to 0 is minus 5 over 4. Turning the sign of that one, the area is
The places to split are where the graph crosses the axis: the zeros of the function, found by setting it equal to 0.
Between two graphs
The area between two graphs is the integral of the top one minus the bottom one, from where they meet to where they meet again. Take x plus 2 and x squared:
They meet where x squared equals x plus 2, at x equals minus 1 and x equals 2, and the line is on top in between. So the area is
The antiderivative is x squared over 2 plus 2 x minus x cubed over 3. It is 10 over 3 at 2 and minus 7 over 6 at minus 1, so the area is 10 over 3 plus 7 over 6, which is 9 over 2.
Here no splitting is needed, even where the graphs are below the axis. The difference between them, top minus bottom, is positive all the way.
sin and cos
The same works for the graphs of sin and cos. They meet at pi over 4 and 5 pi over 4, and sin is on top in between, so the area is the integral of sine of x minus cosine of x from pi over 4 to 5 pi over 4. The antiderivative minus cosine of x minus sine of x is the square root of 2 at 5 pi over 4 and minus the square root of 2 at pi over 4, so the area is 2 the square root of 2.
Below the axis, an integral counts the area as negative: split where the graph crosses, and turn the sign of those parts. Between two graphs, integrate top minus bottom between where they meet.