How can I evaluate the following integral $$\int \frac{x^3+2x-7}{\sqrt{x^2+1}}\mathrm dx$$ My work:
I substituted $x=\tan\theta$, $\mathrm dx=\sec^2\theta \mathrm d\theta $
The integral becomes $$\int \dfrac{\tan^3\theta+2\tan \theta-7}{\sqrt{\tan^2\theta+1}}\ \sec^2\theta\mathrm d\theta$$ $$=\int \dfrac{\tan\theta(\tan^2\theta+1)+\tan \theta-7}{\sec\theta}\sec^2\theta \mathrm d\theta$$ $$=\int (\tan\theta(\sec^2\theta)+\tan \theta-7)\sec\theta \mathrm d\theta$$ $$=\int \tan\theta\sec^3\theta\mathrm d\theta+\int \sec\theta \tan \theta\mathrm d\theta-7\int \sec\theta \mathrm d\theta$$ $$=\int \tan\theta\sec^3\theta\mathrm d\theta+\sec\theta -7\ln|\sec\theta+\tan\theta|+C$$
I got stuck here in evaluating the above integral. I can't see any way to evaluate it. Please help me evaluate it by substitution or some other method.