# 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

• Excuse me what is the integral? The first of the title or $\int \frac{x^3+2x-7}{\sqrt{x^2+1}}\ dx$? Jul 6, 2020 at 23:25
• There's a 1 at the end of the title and a 7 at the end of the problem statement. That's the discrepancy @Sebastiano is pointing out. Jul 7, 2020 at 0:07
• @RobertShore: that was my mistake. thank you sir.
– user805532
Jul 7, 2020 at 0:46
• @RobertShore I have deleted my answer considering that there is $-7$ instead of $-1$ even if the resolution criterion is the same. Jul 7, 2020 at 11:17

$$\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$$

• I like your cleverness in solving the exercises.😉😉😉😉😉 Jul 7, 2020 at 11:18

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.$$

• can you give final answer if you substitute back to $x$?
– user805532
Jul 7, 2020 at 1:00
• Yes. I've edited to add. Jul 7, 2020 at 4:31

\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}