system
Given the following post, respond as if you're commenting on Reddit:
human
Why doesn't the integral from 0 to infinity of sinx dx equal zero?

Hello. Kind of stumped on this problem from a conceptual stand point. If you graph sinx, each area above the x- axis should cancel out with the area below the x-axis so I'm not sure why we can't say it's equal to zero.
gpt
What is the sum of 2-2+2-2+2-2+2-2+2-2+... ? If we group it up like

* (2-2) + (2-2) + (2-2) + ...

then we should get zero, but if we group it up as

* 2 - (2 - 2) - (2 - 2) - (2 - 2) -...

Then we should get 2. Because it depends on how we choose to group things up, something that shouldn't matter in addition, we say that this sum is undefined, has no value. The value you get depends on how you get there, so if you just have the sum, with no instructions on how to get to the end, then you don't know what the sum should be. Even though you *can* make it so that each +2 is cancelled out by a -2, you don't *have to*, you can choose it so that all by one of the +2s is canceled.

Same thing with the integral of sin(x) over x=0 to infinity. Each "bump" has area 2, and if you sum it up by the bumps, you get 2-2+2-2+2-2+2-2+... But, as we saw above, this doesn't have a value unless you give explicit instruction on how you're combining these, which we don't have when working with just an integral. So the integral is undefined.

More rigorously, the integral of f(x) from x=0 to infinity is defined to be the limit at infinity of the function 

* F(x) = integral of f(t)dt for t=0 to x

For f(x)=sin(x), this is equal to F(x)=1-cos(x), so it oscillates without decreasing in amplitude as you go out towards infinity, and so has no limit at infinity. So the integral is undefined.