# Evaluate the indefinite integral!

$\displaystyle \int \frac{\tan(\ln(x^5))}{x}\, dx$. Please help me evaluate this! I'm having trouble figuring out what "u" should be using "u" substitution.

-
Write $\ln(x^5)$ as $5 \ln x$ and use $u = \ln x$. –  Umberto P. Dec 3 '13 at 21:26

Put $$u =\ln(x^5) = 5 \ln x$$ So we put $$u = 5 \ln x\implies du = \dfrac 5x\,dx \implies \frac {du}{5} = \frac {dx}{x}$$

Then $$\int \frac{\tan(\ln(x^5))}{x}\, dx = \frac 15\int \tan u\,du\tag{1}$$

Integrating $\int tan u \,du$ is fairly straightforward, if we rewrite $\tan u = \dfrac{\sin u}{\cos u}$:

$$\frac 15\int \tan u\,du = \frac 15 \int \dfrac{\sin u}{\cos u}\,du\tag{2}$$ and then set $w = \cos u \implies dw = -\sin u \,du \iff -dw = \sin u \,du$. Substituting into $(2)$ gives us $$\frac 15 \int \dfrac{\sin u}{\cos u}\,du = -\frac 15 \int \frac{dw}{w} = -\frac 15\ln|w| + C$$

Now it's just a matter of back substituting $w = \cos u$, and then $u = 5\ln x$ to get our final result as a function of $x$.

-