Improper integral depending on parameter Find the value of the constant $C$ for which the integral $$\int \limits_{0}^{\infty}\left (\dfrac{1}{\sqrt{x^2+4}}-\dfrac{C}{x+2}\right)dx$$ converges. Evaluate the integral for this value of $C$.
I have some difficulties with above problem. I know some methods such as $x+2 \sim x$ and $\sqrt{x^2+4}\sim x$ for $x \to \infty$. But I would like to see the rigorous proof.
Can anyone please show it?
Would very thankful for that.
 A: Hint:
$$
\int_0^a\Big(\frac{1}{\sqrt{x^2+4}}-\frac{C}{x+2}\Big)\,dx=\left[\ln(x+\sqrt{x^2+4})-C\ln(x+2)\right]_0^a=\ln\left(\frac{a+\sqrt{a^2+4}}{(a+2)^C}\right)+\text{const}
$$
A: Look what happens close to the bounds using Taylor expansions.
Close to $x=0$
$$\frac{1}{\sqrt{x^2+4}}-\frac{c}{x+2}=\left(\frac{1}{2}-\frac{c}{2}\right)+\frac{c x}{4}+O\left(x^2\right)$$
For large values of $x$
$$\frac{1}{\sqrt{x^2+4}}-\frac{c}{x+2}=\frac{1-c}{x}+O\left(\frac{1}{x^2}\right)$$
I am sure that you can conclude from here.
A: First we have,
$\int_0^\infty \frac{1}{\sqrt{x^+4}}-\frac{C}{x+2}$
$=\int_0^\infty \frac{x+2-C\sqrt{x^2+4}}{(x+2)(\sqrt{x^2+4}}$
$=\int_0^\infty \frac{x+2-Cx\sqrt{1+\frac{4}{x^2}}}{(x^2+2x)(\sqrt{1+\frac{4}{x^2}}})$
$=\int_0^\infty \frac{x(1-C\sqrt{1+\frac{4}{x^2}})+1}{x^2\sqrt{1+\frac{4}{x^2}}+x\sqrt{1+\frac{4}{x^2}}}$
For this to converge we must have the coefficient of the x in the numerator going to 0 as $x\to\infty$(otherwise the integral will diverge by limit comparison with $\int\frac{1}{x}$).SO
$\lim_{x\to\infty}(1-C\sqrt{1+\frac{4}{x^2}})=1-C$ $\Rightarrow C=1$
