Integrate $\int \frac{\tan ^3\left(\ln \left(x\right)\right)}{x}dx$

calculusintegrationreal-analysistrigonometric-integrals

Integrate:
$$\int \frac{\tan ^3\left(\ln \left(x\right)\right)}{x}dx$$

My attempt:

$$u=\ln(x) \implies \int \tan ^3\left(u\right)du=\int \tan ^2\left(u\right)\tan \left(u\right)du=\int \left(-1+\sec ^2\left(u\right)\right)\tan \left(u\right)du$$

I'm having trouble after this section. My initial idea was to use $u$-subsituition again. So,
$$v=\sec(u) \implies \int \frac{-1+v^2}{v}dv=\int \:-\frac{1}{v}+vdv=-\ln \left|v\right|+\frac{v^2}{2}=-\ln \left|\sec \left(\ln \left(x\right)\right)\right|+\frac{\sec ^2\left(\ln \left(x\right)\right)}{2} + c, c \in \mathbb{R}$$

I'm pretty sure this is correct. I'm curious if there is any other way to solve this (hopefully in an easier manner?)?

Best Answer

Note that$$\int\tan^3x\,\mathrm dx=\int\frac{\sin^3x}{\cos^3 x}\,\mathrm dx=\int\frac{\sin(x)\bigl(1-\cos^2(x)\bigr)}{\cos^3x}\,\mathrm dx.$$So, if you do $\cos x=t$ and $-\sin x\,\mathrm dx=\mathrm dt$, you get$$-\int\frac{1-t^2}{t^3}\,\mathrm dt.$$