Symmetry about the origin (odd functions) won't work -- this will always make the integral either exactly zero, or not converge. Every bit of area to the right of the y-axis (if not infinite) will be cancelled by an equivalent but negative area on the left side, since f(-x) = -f(x) by this symmetry.

Examples: integral over x/(e^x^2) is zero. Integral over x, 1/x and 1/x^3 don't converge.

So a function must be even (symmetric about y-axis), or neither even nor odd, to possibly give a finite and non-zero integral. If even, then the area from -infinity to infinity is double the area from 0 to infinity, since f(-x) = f(x). Examples:

Integral over cos(x) doesn't converge, since it continues to oscillate as x-->infinity. (Area is incomputable).

1/x^2 doesn't converge because it blows up too much at origin. (Area is infinite).

1/(e^x^2) yields the square root of pi. (Cousin to the normal distribution. Area is finite since it decays very fast.)

Our friend sin(1/x)/x is even and gives pi.

sin(x)/x also gives pi, but in this case it's a bit easier to visually see how since there is no nasty singularity.