Comparison test for $\int_0^{\pi/2} \frac{x+\cos^2 x}{\sqrt{x+x^2}} \,dx$ $$\int_0^{\pi/2} \frac{x+\cos^2 x}{\sqrt{x+x^2}} \,dx$$
How come up with something to compare it to use the comparison test?
 A: Notice that:
$$\frac{x+\cos^{2}(x)}{\sqrt{x+x^{2}}}\le\frac{x+1}{\sqrt{x+x^{2}}}\le\frac{x+1}{\sqrt{x}}=\sqrt{x}+\frac{1}{\sqrt{x}}.$$
A: To determine convergence we only need to consider what happens near $x=0$.  Roughly, we have
$$\frac{x+\cos^2x}{\sqrt{x+x^2}}\approx\frac{1}{\sqrt{x}}\ ,$$
and since
$$\int_0^{\pi/2} \frac{dx}{\sqrt{x}}$$
converges, we are looking for an upper bound on the integrand.  For $0<x\le\pi/2$ we have
$$\frac{x+\cos^2x}{\sqrt{x+x^2}}\le\frac{(\pi/2)+1}{\sqrt{x}}$$
and this will give a suitable comparison.
A: In the same spirit as user71352 $$\int_0^{\pi/2} \frac{x+\cos^2 x}{\sqrt{x+x^2}} \,dx \lt \int_0^{\pi/2} \frac{x+1}{\sqrt{x+x^2}} \,dx$$ and $$\int \frac{x+1}{\sqrt{x+x^2}} \,dx=\sqrt{x (x+1)}+\sinh ^{-1}\left(\sqrt{x}\right)$$ $$\int_0^{\pi/2} \frac{x+1}{\sqrt{x+x^2}} \,dx=\frac{1}{2} \left(\sqrt{\pi  (2+\pi )}+\log \left(1+\pi +\sqrt{\pi  (2+\pi
   )}\right)\right) \simeq 3.05919$$ while a numerical integration leads to $$\int_0^{\pi/2} \frac{x+\cos^2 x}{\sqrt{x+x^2}} \,dx \simeq 2.50272$$
