# Deciding if these two improper integrals diverge or converge. (comparison test)

I have two integrals to decide and prove if they converge or diverge, I solved them (or tried), but I'm unsure of my solution and got some questions:

$$1)$$ $$\int_1^3\frac {\sin(1-x)}{(x-1)^2}\,dx$$ What I tried to do: I said that this integral is less than $$\int_1^3\frac{1}{(x-1)^2}\,dx,$$ and if I substitute $$t= x-1$$, I will get $$\int_0^2\frac {1}{t^2}\,dt,$$ which diverges. Now I know that I can't say that my integral diverges using this fact, sadly I couldn't finish it.

$$2)$$ $$\int_1^\infty\frac{\ln(1+e^x)-x}{x^2}\,dx$$

What I did: I found the limit $$\lim_{x\to\infty}\frac {\ln(1+e^x)}{x} = 1,$$ so I decided to take the function $$\frac {1}{x}$$ (I checked the limit with my integrand and got $$1$$), and $$\frac {1}{x}$$ diverges so my integral has to diverge.

I feel like I went a little far, I tried a couple functions, and most of them failed or weren't good for comparison test, I would really appreciate any explanation and if someone can approve my answers or point out my mistakes.

• I think that the first one diverges for a different reason, namely that $\sin x\to x$ when $x\to 0$. I think the second one should converge, you probably won't get $\frac 1x$ if you consider the whole numerator... Jan 20 at 21:49
• More specific for the second one: note that $$\ln(1+e^x)-x=\ln\left(\frac{1+e^x}{e^x}\right)$$ Jan 20 at 21:58
• $\int_1^3\frac{1}{(x-1)^2}\,dx$ diverges and $\frac{\sin (1-x)}{(x-1)^2}\le \frac{1}{(x-1)^2}$ means that $\frac{\sin (1-x)}{(x-1)^2}$ could converge. Your explanation of the first integral divergence is not valid. Jan 20 at 21:58
• Note that $\sin x \geqslant \frac{2x}{\pi}$ and, thus, $\frac{\sin x}{x^2} \geqslant \frac{2}{\pi x}$ for $0 \leqslant x \leqslant \frac{\pi}{2}$ .
– RRL
Jan 20 at 22:24
• Also $\int_1^3 \frac{\sin(1-x)}{(x-1)^2} \,dx = -\int_0^{\pi/2}\frac{\sin x}{x^2}\, dx - \int_{\pi/2}^{2}\frac{\sin x}{x^2}\, dx$.
– RRL
Jan 20 at 22:24

$$\frac{\sin(1-x)}{(x-1)^2} = \frac{\sin(-(x-1))}{(x-1)^2} = -\frac{\sin(x-1)}{(x-1)^2} \sim -\frac{1}{x-1} ~~~~~ \text{as} ~~~~~ x\to 1$$
$$\frac{\ln(1 + e^x) - x}{x^2} \to 0$$
as $$x\to +\infty$$ hence the second integral does converge.