0

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)$.

K.defaoite
  • 12,536

2 Answers2

2

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$.

Ross Millikan
  • 374,822
0

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.

saulspatz
  • 53,131