# Why 2nd derivative is “squared” to represent wigglyness in GAM?

In David Miller's presentation (here, slide 21), he drew 1st derivative and 2nd derivative of a function. Then he said (slide 22) that grey part can is :

$$\int (\frac{\partial ^{2}f(x)}{\partial x^{2}})^{2}dx$$

My question is: the grey area should not have the "squared" to calculate its area, why not the below form:

$$\int (\frac{\partial ^{2}f(x)}{\partial x^{2}})dx$$

Consider one cycle of a sine wave: $$\sin(x)$$ on the interval $$[0,2\pi]$$. We can agree this is "wiggly", right?
The second derivative is $$-\sin(x)$$. Integrate that over $$[0,2\pi]$$ and you get zero "wiggliness".