<s>[INST] Calculate the integral of $\frac{1}{x^2 +x + \sqrt x}$ How to correctly calculate the integral:
$$\int_0^\infty \frac{1}{x^2 +x + \sqrt x}dx$$
Edit: I tried to figure out if the limit exists:
Step 1: break the integral to two parts: from 0 to 1, from 1 to infinity.
Step 2: use limit comparison test for both of the integral: the first integral compared at 1 to 1/sqrt(x) and the second is compared at infinity to 1/x^2.
Step 3: conclude that both converge, hence the original integral also converges.
Step 4: (this is the one im trying to figure out, how to actually calculate it, because the limit exists).
 [/INST] $$\int \frac{dx}{x^2 +x + \sqrt x}=2\int \frac{dy}{y^3 +y + 1}$$
Write
$$\frac{1}{y^3 +y + 1}=\frac 1{(y-a)(y-b)(y-c)}$$ Use partial fraction decomposition
$$\frac{1}{y^3 +y + 1}=\frac{1}{(a-b) (a-c) (y-a)}+\frac{1}{(b-a) (b-c) (y-b)}+\frac{1}{(c-a) (c-b) (y-c)}$$ Then three logarithms to be recombined before using the bounds.
Look how nice is the real root of the cubic
$$a=-\frac{2}{\sqrt{3}}\sinh \left(\frac{1}{3} \sinh ^{-1}\left(\frac{3 \sqrt{3}}{2}\right)\right)$$ Then from Vieta
$$b=-\frac{a}{2}-i\frac{\sqrt{a^3+4}}{2 \sqrt{|a|}}\quad \text{and} \quad c=-\frac{a}{2}+i\frac{ \sqrt{a^3+4}}{2 \sqrt{|a|}}$$
</s>