# Convergence of an alternating improper integral.

I'm trying to determine the convergence/divergence of two improper integrals, both with the same attribute:

$$\int_2^\infty f(x)\,dx=\int_2^\infty \frac{x-\lfloor x\rfloor-\frac{1}{2}}{\ln{x}}dx$$

$$\int_1^\infty g(x)\,dx=\int_1^\infty \frac{(-1)^{\lfloor x \rfloor}}{x\ln{x}}dx$$

The common attribute these two have is that their numerators are alternating between two constant values as the functions progresses twoards infinity.

Note the numerators are bounded by some constant values, and the denominators are monotonically decreasing. Thus, I thought I could use Dirichlet's test for convergence of improper integrals to determine convergence.

In $f(x)$ I can do that, since both the numerator and denominator are continuous as that's what the test requires for convergence. However, in $g(x)$ I can't, since the numerator isn't continuous.

For the first integral $$\int_2^{\infty} \frac{\{x\}- 1/2}{\ln(x)} dx$$ Define $\displaystyle B_1(x) = \frac{\{x\}^2}{2} - \frac{\{x\}}{2} + \frac1{12}$. Then we get that $$\int_2^{\infty} f(x) dx = \int_2^{\infty} \frac{d(B_1(x))}{\ln(x)} = \left. \frac{B_1(x)}{\ln(x)} \right \rvert_2^{\infty} + \int_2^{\infty} \frac{B_1(x)}{x \ln^2(x)} dx = \frac1{12 \ln(2)} + \int_2^{\infty} \frac{B_1(x)}{x \ln^2(x)} dx$$ which converges clearly since $$\left \lvert \int_2^{\infty} \frac{B_1(x)}{x \ln^2(x)} dx \right \rvert \leq \frac1{12} \left \lvert \int_2^{\infty} \frac{1}{x \ln^2(x)} dx \right \rvert < \infty$$