# Integration by parts: $\int x\ln x^2 \,dx$

Problem: $\int x\ln x^2 \,dx$

So what I did first was make $u = \ln x^2$ and $dv = x$

Then I solved by getting the derivative of $u$ and the anti derivative of $dv$ and I got $du = 1/x^2$ and $v = x^2/2$ then I did the formula $$\int udv = uv - \int vdu$$ which then after plugging in the numbers and simplifying got me

$$\frac{ x^2}{2}\ln x^2 - \frac{1}{2x} +C$$

Is this the right way to do the problem and answer?

• double check your du. you missed the chain rule Sep 13, 2014 at 20:34
• Is it really $\ln(x^2)$? If so, why not write it as $2\ln x$? Sep 13, 2014 at 20:37
• Is it $x\ln(x^2)$ or $x\ln(x)^2$? Sep 13, 2014 at 20:37
• It is puzzling because your answer doesn't seem to work for either possibility! :) Sep 13, 2014 at 20:38
• -1 Time these ambiguities were fixed! Sep 13, 2014 at 20:46

First note that $\ln(x^2)=2\ln(x)$. Now we have $$u=2\ln(x), \ \ du = \frac{2}{x}dx, \ \ dv=xdx, \ \ v=\frac{x^2}{2}$$ Integration by parts tells us that $$\int\! 2x\ln(x) \, \mathrm{d}x=2\ln(x) \cdot \frac{x^2}{2}-\int\! \frac{2}{x} \cdot \frac{x^2}{2} \, \mathrm{d}x$$ $$=\ln(x) \cdot x^2-\int\! x \, \mathrm{d}x$$ $$=\ln(x) \cdot x^2-\frac{x^2}{2}+C$$
Assuming it's $x \ln^2(x)$(because this way the second case will be also evaluated in here anyway) Hints; $$\int f \mathrm{d}g = fg-\int g \mathrm{d}f$$ $$f=\ln^2 x, \mathrm{d}f=\frac{2\ln x}{x} \mathrm{d}x, g=\frac{x^2}{2}, \mathrm{d}g=x \mathrm{d}x$$
$$f=\ln x, \mathrm{d}f=\frac{1}{x} \mathrm{d}x, g=\frac{x^2}{2}, \mathrm{d}g=x \mathrm{d}x$$
Another way of approaching things like $x^2a(x)$, where $a(x)$ is awkward is simply to differentiate $x^2a(x)$ and see if that helps. You can often make an obvious combination of such terms work fast. Eg what is $\int x^2\ln x$? Try $x^2\ln x$. You get $2x\ln x + \dots$. Well that was obviously silly. You try $x^3\ln x$. You get $3x^2\ln x+x^2$. Done. It is obvious how to turn that into the required answer. Getting rid of the unwanted \$x^2 and fixing the 3 are both easy.