f(x) = sum[n = 0 to infinity]((1/2)^n sin((1/20)^n pi x))
It converges because each successive term is bounded by [-1/2, +1/2]. But if you integrate it you get: f(x) = sum[n = 0 to infinity](10^n / pi cos((1/20)^n pi x))
(Well... you get that if you play fast and loose about swapping the order of the integral and the sum)Which diverges because the input to the cosine function limits to 0 as n -> infinity, so the cos limits to 1, and we get 10+100+1000+10000...
But if you integrate from two points and delay doing the limit until after then you get
F(x1, x2)
= sum[n = 0 to infinity](10^n / pi (cos((1/20)^n pi x2) - cos((1/20)^n pi x1)))
= sum[n = 0 to infinity](10^n / pi (2*sin(pi/2 (1/20)^n (x1-x2))*sin(pi/2 (1/20)^n (x1+x2)))
Which, for large n, acts like: ~= sum[n = 0 to infinity](10^n / pi (2*(pi/2 (1/20)^n (x1-x2))*(pi/2 (1/20)^n (x1+x2)))
= sum[n = 0 to infinity]((1/40)^n pi/2 *(x1-x2)(x1+x2))
Which converges.Apologies for any math mistakes. This was all off the cuff. I wouldn't be surprised if some of the more general integration or summation strategies can also handle this case.
You can only do that with a definite integral (under conditions).
Using your reasoning, even a function like exp(x) would not integrate, because the terms in the integral of its series expansion would all go to zero as n -> infinity.
Another way to think about this is that each term in the indefinite integral you wrote has an arbitrary constant of integration, which can depend on n, that you did not include. This constant precludes you from actually finding the limit.
1. Can you give me any function whose derivative is the function I specified? (i.e. I give you permission to force all the integration constants to zero)
2. Can you compute the area under the curve from `x1` to `x2` of the function I specified?
3. Do you agree that you can do (2) but not (1)?
If you can't show it's continuous almost everywhere (as noted by @clintonc) then it is not Riemann-integrable, therefore its integral will not exist. That would be the answer to (1).
If you go through some manipulations (i.e., (2)) and get an expression that seems correct, but the underlying function is not actually Riemann-integrable (as in (1)), then I'd suggest your manipulations have fooled you.
So, do you know the answers to these questions?
So I don't expect to be able to show lack of Riemann-integrable-ness via that route. ... I just don't think it has an antiderivative.
... wait, this makes no sense. I've made a mistake because if the function is continuous then it must have an antiderivative by the first fundamental theorem of calculus. I will have to actually do the epsilon-delta proof and find out where I made the tricky mistake. Probably something to do with that infinity...
Also, as hinted upthread, just change
f(x) = - sum[n = 0 to infinity](10^n / pi cos((1/20)^n pi x))
to
f(x) = - sum[n = 0 to infinity](10^n / pi (cos((1/20)^n pi x) - 1))
That gives you an actual formula for the antiderivative that converges at every point.