How to integrate $\int\frac{e^{2x}-1}{\sqrt{e^{3x}+e^x} } \mathop{dx}$

calculusindefinite-integralsintegration

How can I evaluate this integral $$\int\dfrac{e^{2x}-1}{\sqrt{e^{3x}+e^x} } \mathop{dx}=\;\;?$$

My attempt:

I tried using substitution $e^x=\tan\theta$, $e^x\ dx=\sec^2\theta\ d\theta$, $dx=\sec\theta \csc\theta \ d\theta.$
$$\int\dfrac{\tan^2\theta-1}{\sqrt{\tan^3\theta+\tan\theta } }\ \sec\theta \csc\theta\ d\theta $$

$$=\int\dfrac{\tan^2\theta-1}{\sec\theta\sqrt{\tan\theta } }\ \sec\theta \csc\theta d\theta. $$
I used $\tan\theta= \dfrac{1}{\cot\theta}$
$$=\int\dfrac{1-\cot^2\theta}{\cot^{3/2}\theta }\csc\theta d\theta $$
$$=\int(\cot^{-3/2}\theta-\sqrt{\cot\theta} )\csc\theta d\theta. $$
I got stuck here. I can't see whether further substitution will work or not. Will integration by parts work?

Please help me solve this integral. I am learning calculus. Thank in advance.

Best Answer

Take out $e^x$ from numerator and denominator as follows $$\int\dfrac{e^{2x}-1}{\sqrt{e^{3x}+e^x} } \ dx=\int\dfrac{e^x(e^{x}-e^{-x})}{\sqrt{e^{2x}(e^{x}+e^{-x})} } dx$$ $$=\int\dfrac{e^x(e^{x}-e^{-x})}{e^x\sqrt{e^{x}+e^{-x}} } dx$$ $$=\int\dfrac{(e^{x}-e^{-x})dx}{\sqrt{e^{x}+e^{-x}} } $$ $$=\int\dfrac{d(e^{x}+e^{-x})}{\sqrt{e^{x}+e^{-x}} } $$ $$=2\sqrt{e^{x}+e^{-x}}+C $$