How can i solve $\int \frac{x^3+2x-7}{\sqrt{x^2+1}}\ dx?$ How can i solve following $$\int \frac{x^3+2x-7}{\sqrt{x^2+1}}\ dx?$$
My work:
I substituted $x=\tan\theta$, $dx=\sec^2\theta d\theta $
integral becomes
$\int \dfrac{\tan^3\theta+2\tan \theta-7}{\sqrt{\tan^2\theta+1}}\ \sec^2\theta d\theta$
$\int \dfrac{\tan\theta(\tan^2\theta+1)+\tan \theta-7}{\sec\theta}\sec^2\theta d\theta$
$\int (\tan\theta(\sec^2\theta)+\tan \theta-7)\sec\theta d\theta$
$\int \tan\theta\sec^3\theta\ d\theta+\int \sec\theta \tan \theta\ d\theta-7\int \sec\theta d\theta$
$\int \tan\theta\sec^3\theta+\sec\theta -7\ln|\sec\theta+\tan\theta|+C$
I got stuck here in solving first part of above integral. I can't see the way to solve it. please help me solve it by substitution or other method. thanks
 A: $$\int \frac{x^3+2x-7}{\sqrt{x^2+1}}\ dx$$
$$=\int \frac{x(x^2+1)+x-7}{\sqrt{x^2+1}}\ dx$$
$$=\int x\sqrt{x^2+1}\ dx+\int \frac{x}{\sqrt{x^2+1}}\ dx-\int \frac{7}{\sqrt{x^2+1}}\ dx$$
$$=\frac12\int \sqrt{x^2+1}\ d(x^2+1)+\frac12\int \frac{d(x^2+1)}{\sqrt{x^2+1}}-7\int \frac{dx}{\sqrt{x^2+1}}$$
$$=\frac13(x^2+1)^{3/2}+\sqrt{x^2+1}-7\sinh^{-1}(x)+C$$
A: You're almost there.
$$\int \tan \theta \sec^3 \theta d \theta = \int \frac {\sin \theta}{\cos^4 \theta} d \theta = -\int \frac{du}{u^4}=\frac 13 u^{-3} = \frac {\sec^3 \theta}{3}+ C$$
Since $x= \tan \theta, x^2+1=\sec^2 \theta$, so
$$\frac{\sec^3 \theta}{3} + C = \frac{\sqrt{(x^2+1)^3}}{3}+C.$$
A: \begin{aligned}
\frac{x^{3}+2 x-7}{\sqrt{x^{2}+1}} d x &=\int \frac{x^{3}+2 x-7}{x} d \sqrt{x^{2}+1} \\
&=\int\left(x^{2}+2-\frac{7}{x}\right) d \sqrt{x^{2}+1} \\
&=\int\left(x^{2}+1\right) d \sqrt{x^{2}+1}+\sqrt{x^{2}+1}-7 \int \frac{d \sqrt{x^{2}+1}}{x}\\
&=\frac{\left(x^{2}+1\right)^{\frac{3}{2}}}{3}+\sqrt{x^{2}+1}-7 \int \frac{d \sqrt{x^{2}+1}}{\sqrt{\left(\sqrt{x^{2}+1}\right)^{2}-1}} \\
&=\frac{\left(x^{2}+1\right)^{\frac{3}{2}}}{3}+\sqrt{x^{2}+1}+\frac{7}{2} \ln \left|\frac{\sqrt{x^{2}+1}+1}{\sqrt{x^{2}+1}-1}\right| +C\\
&=\frac{\sqrt{x^{2}+1}}{3}\left(x^{2}+4\right)+\frac{7}{2} \ln \left|\frac{\sqrt{x^{2}+1}+1}{\sqrt{x^{2}+1}-1}\right|+C
\end{aligned}
