Given the following equation (in rads):
$f(x) = \cos(x^2-2x)$
The graph of its derivative will look like this:
I would like to find the total area between limited by the graph and the $x$ axis where $0\leq x\leq 2$.
I integrated the derivative:
$$\int_0 ^2 f(x)'dx = f(x) |^2 _0 = \cos(2^2 -2\cdot 2) - \cos(0^2 - 2\cdot 0) = 0$$
This tells me that both the negative and positive part of the graph at the given range are equal to one another. Now, here's what I don't understand:
At first, I assumed that since the two parts are equal:
$$\cos(2^2 -2\cdot 2) = \cos(0^2 - 2\cdot 0)$$
I could calculate either one of them, then multiply by 2 to get the answer to my question. This is incorrect, and I would like to know why. Both parts are equal to 1 (which already looks wrong if you eyeball the area in the graph), while the correct answer is ~0.46 for both the negative and positive part, which was derived by integrating $0\leq x \leq 1$ or $1\leq x \leq 2$ separately. Multiplying this by 2 gives us the area of the graph in the requested range.
Why does my first method fail?
Apologies in advance if my question is not clear enough.
$$\int_0^2f'(x)dx=\int_0^2-(2x-2)\sin(x^2-2x)dx=\left[\cos(x^2-2x)\right]_0^2=\cos(0)-\cos(0)=0$$ Whilst the two parts are equal: $$\cos(2^2-2*2)=\cos(0^2-2*0)$$ we cannot just multiply one of them by two as there is no logic behind this, the reason why we minus one from the other is because of the fundamental theorem of calculus: $$\int_a^bf(x)dx=F(b)-F(a)$$ and in our case it just so happens that $$F(b)=F(a)$$ The correct way to break up this integral would be: $$I=\left|\int_0^1f'(x)dx\right|+\left|\int_1^2f'(x)dx\right|$$ or you could write this as: $$I=\int_0^2\left|f(x)\right|dx$$