I was recently learning about improper integrals, so I am not that advanced, and I asked myself whether there is some function $f(x)$ for which $\int_a^b f(x)dx$ with the limits being $a$ or $b$, it doesn't matter, converges while $\sum_{i=1}^\infty f(i)$ diverges.
I have found similar questions being asked like this one but there are usually the other way around, so the integral is divergent and the sum convergent, like with $f(x)=\sin(\pi x)$.
- 12,536
-
3Let $f(x) = 0$ for non-integer $x$ and let $f(n) = 1/n$ for positive integers $n$. If you want something continuous, You can add little line segments in the graph from $0$ to these integer points so the graph of $f$ is a series of spiky triangles. The integral will converge as long as the triangles get narrow enough (you can arrange for the $n$th base to be $1/2^n$, for example) but this won't change how high they go or the divergence of the sum. – leslie townes Mar 01 '21 at 15:12
-
1Was the integral supposed to be over a bounded domain? It seems you meant $\int_a^\infty f(x) dx$. – Theo Bendit Mar 01 '21 at 15:13
-
Yes or some other improper integral like $\int_0^6 \frac{1} {x}dx$ – Mar 01 '21 at 15:14
-
It isn't clear to me why one owuld expect any relation between the infinite sum and the integral of $f$ over a bounded interval. I assumed $\int_a^{\infty}$ in my example above. – leslie townes Mar 01 '21 at 15:15
-
1$\sin(x^2)$ is a continuous example. – metamorphy Mar 01 '21 at 15:15
-
I mean... $f(x)=1$ with $a=0$ and $b=1$? – Mar 01 '21 at 15:18
-
Does this answer your question? https://math.stackexchange.com/a/2532382/42969 – Martin R Mar 01 '21 at 15:21
-
Does this answer your question? How can I show whether the series $\sum\limits_{n=1}^\infty \frac{(-1)^n}{n(2+(-1)^n)} $ converges or diverges? – amWhy Mar 01 '21 at 17:41
2 Answers
As written, it is easy because the integral is over a finite interval. $f(x)=1$ suffices. It is a little harder if you make the integral $\int_1^\infty$ but not much. We know that the sum of $\frac 1i$ diverges but we can make the integral converge by making a bump at each natural and making the bumps get narrower and narrower.
$$f(x)=\begin {cases} \frac 1k & x\in [k-\frac 1k,k+\frac 1k],k \in \Bbb N \\0&\text{otherwise} \end {cases}$$
will work. The area of each rectangle is $\frac 1{k^2}$ and we know the sum of that converges. As leslie townes pointed out, you could also just make $f(x)=\frac 1k$ at the naturals and $0$ elsewhere, which makes the integral identically $0$.
- 374,822
I'm not sure what $a$ and $b$ are supposed to be, but I'll assume $a=1$ and $b=\infty$. A simple example is $$f(x)=\cases{1,&$x\in \mathbb{N}$\\0,&$x\notin \mathbb{N}$}$$
You can modify this example to make $f$ continuous, by making it piecewise linear, or even $C^\infty$ by using bump functions.
- 53,131