# Evaluating indefinite integral using substitution

I have the following integral to evaluate. I'm not sure whether to use the reverse chain rule or integration by parts, as my calculation hits a bit of a snag. Any suggestions would be appreciated!

$$\int{\frac{\ln{x}\sec^2{((\ln{x})^2)}}{x}\,\,dx}$$

My calculation involves the reverse chain rule for the following substitutions:

$$\int{g'(f(x))\cdot f(x)}\,\,dx = g(f(x)) + c$$

However, I can't figure a way to neatly factor $(\ln(x))^2$ as it just becomes messy when I integrate or find derivatives. Is there a simpler method, perhaps an identity I'm overlooking here?

Thanks!

## 3 Answers

Let $\{\ln(x)\}^2=u\implies2\dfrac{\ln(x)}x\ dx=du$

We have $\dfrac12\cdot\int\sec^2(u)\ du=\dfrac12\cdot\tan u+K$

• OK, so does (ln(x))^2 evaluate to 2ln(x)? I was trying to find out but every other forum seemed to suggest that it wasn't correct and would just become very messy by hand. – thisisanon Apr 11 '15 at 15:24
• @ptikobj, See en.wikipedia.org/wiki/Chain_rule – lab bhattacharjee Apr 11 '15 at 15:26
• Brilliant. Thank you! I see one of my attempts actually arrived at this answer, but I wasn't sure whether it was correct. I often get derivatives and antiderivatives mixed up. – thisisanon Apr 11 '15 at 15:38

The derivative of $(\log{x})^2$ is $$\frac{2\log{x}}{x}$$ using the chain rule, so setting $u=(\log{x})^2$, we have $du = 2x^{-1}\log{x} \, dx$, and hence the integral becomes $$\left. \frac{1}{2}\int \sec^2{u} \, du \right|_{u=(\log{x})^2} = \left. \frac{1}{2}\tan{u} \right|_{u=(\log{x})^2} + C = \frac{1}{2} \tan{((\log{x})^2)} +C$$

You can use two iterations of substitution. First, $u=\ln(x)$ and $du=\frac1x dx$. After that, $v=u^{2}$ and $dv=2udu$. Then you can solve it.