<s>[INST] On the convergence of improper integrals Question
Determine the value of $r$ for which the integral $$\int^{\infty}_1 (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x$$ is convergent and evaluate the integral for that value of $r$.
My working
It is trivial to see that the integral is divergent for $r = 0\ $, so let $r \neq 0\ $.
If $r \neq 0\ $, then
\begin{align}
\int^{\infty}_1 (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x & =
\lim\limits_{a\to\infty}[r\ln(x + 1) - \frac 3 4 \ln|2x^2 + r|]^{x = a}_{x = 1}
\\[5 mm] & =
\lim\limits_{a\to\infty}[r\ln(a + 1) - \frac 3 4 \ln|2a^2 + r| - r\ln 2 + \frac 3 4 \ln|2 + r|]
\\[5 mm] & =
\lim\limits_{a\to\infty}\left(r\ln\frac {a + 1} 2 + \frac 3 4 \ln\left|\frac {2 + r} {2a^2 + r}\right|\right)
\end{align}

This question just appeared in my final calculus examination this afternoon and I got stuck here ):. We have practiced such questions before but I cannot seem to get this one. I would usually proceed by trying L'Hopital's Rule since we want the limit to exist. I know I probably will not be touching calculus for quite a while from now, but I still want to figure this out. Any intuitions as to how I should proceed will be greatly appreciated :)
 [/INST] I have finally managed to answer the question :)

It is trivial to see that the integral is divergent for $r = 0\ $, so let $r \neq 0$.
If $r \neq 0$, note that we can always choose $a$ large enough such that $$\int^{\infty}_1 (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x = \int^a_1 (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x + \int^{\infty}_a (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x,$$ where $$\int^a_1 (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x$$ is always convergent $\forall\ r \in \mathbb {R}$.
Then, the problem reduces to checking the convergence of $$\int^{\infty}_a (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x,$$ where
\begin{align}
\int^{\infty}_a (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x & =
\lim\limits_{b\to\infty}[r\ln(x + 1) - \frac 3 4 \ln(2x^2 + r)]^{x = b}_{x = a}
\\[5 mm] & =
\lim\limits_{b\to\infty}[r\ln(b + 1) - \frac 3 4 \ln(2b^2 + r) - r\ln (a + 1) + \frac 3 4 \ln(2a^2 + r)]
\\[5 mm] & =
\ln \left[\lim\limits_{b\to\infty}\frac {(b + 1)^r} {(2b^2 + r)^{\frac 3 4}}\right] - r\ln (a + 1) + \frac 3 4 \ln(2a^2 + r)
\\[5 mm] & =
\ln \left[\lim\limits_{b\to\infty}\frac {b^{r - \frac 3 2}(1 + \frac 1 b)^r} {(2 + \frac r {b^2})^{\frac 3 4}}\right] - r\ln (a + 1) + \frac 3 4 \ln(2a^2 + r).
\end{align}
Observe that, due to the condition imposed on $a$, the last two terms, namely, $- r\ln (a + 1)$ and $\frac 3 4 \ln (2a^2 + r)$ always exist. Moreover, as $b \rightarrow \infty$, $(1 + \frac 1 b)^r$ and $(2 + \frac r {b^2})^{\frac 3 4}$ are always convergent, so it suffices to check the convergence of $\lim\limits_{b\to\infty}b^{r - \frac 3 2}$ and it is easy to see that $r$ can only take on one value, that is $\frac 3 2$.
Thus, when $r = \frac 3 2$,
\begin{align}
\int^{\infty}_1 (\frac r {x + 1} - \frac {3x} {2x^2 + r})\ \mathrm {d}x & =
\lim\limits_{c\to\infty}[\frac 3 2\ln(x + 1) - \frac 3 4 \ln(2x^2 + \frac 3 2)]^{x = c}_{x = 1}
\\[5 mm] & =
\lim\limits_{c\to\infty}[\frac 3 2\ln(c + 1) - \frac 3 4 \ln\frac {4c^2 + 3} 2 - \frac 3 2\ln 2 + \frac 3 4 \ln\frac 7 2]
\\[5 mm] & =
\frac 3 4\lim\limits_{c\to\infty}[\ln(c + 1)^2 - \ln(4c^2 + 3)] - \frac 3 2\ln 2 + \frac 3 4 \ln 7
\\[5 mm] & =
\frac 3 4\lim\limits_{c\to\infty}\ln\frac {(c + 1)^2} {4c^2 + 3} - \frac 3 2\ln 2 + \frac 3 4 \ln 7
\\[5 mm] & =
\frac 3 4\ln\frac 1 4 - \frac 3 2\ln 2 + \frac 3 4 \ln 7
\\[5 mm] & =
\frac 3 4 \ln 7 - 3\ln 2
\end{align}
</s>