I have some missing points about improper integrals, for instance, are we allowed to say:
1) $\int_{1}^{\infty}\frac{log(x+7)}{x}dx = \sum_{n=1}^{\infty}(\int_{n}^{n+1}\frac{log(x+7)}{x}dx)$
Actually, it really makes sense for me. However, if this holds then the following should also be true:
I know $\int_{0}^{\infty}sinx$ diverges, but $\int_{0}^{\infty}sinx = \sum_{0}^{\infty} (\int_{2\pi n}^{2\pi (n+1)}sinx) = \sum_{0}^{\infty} 0 = 0.$
Why is this false? Maybe my problem is not about integrals, it is about series?
I could have equally wrote $$\int_0^\infty\sin x\,dx=\sum_{n=0}^\infty\int_{n\pi}^{(n+1)\pi}\sin x\,dx=2-2+2-2+2-\dots$$ which is Grandi's series, and can be made to sum to $0$ or $2$ depending on how you put the brackets, so is really divergent.
Never replace an infinite-domain integral with an infinite sum of finite-domain integrals unless the integrand is non-negative over the entire domain. So the first example would be fine.