# Integration By Parts (Logarithm)

$$\int(2x+3)\ln (x)dx$$

My attempts, $$=\int(2x\ln (x)+3\ln (x))dx$$ $$=2\int x\ln (x)dx+3\int \ln(x)dx$$

For $x\ln (x)$, integrate by parts,then I got $$=x^2\ln (x)-\int (x) dx+3\int \ln(x)dx$$ $$=x^2\ln (x)-\frac{x^2}{2}+3\int \ln(x)dx$$

For $\ln(x)$, integrate by parts, then I got

$$=x^2\ln (x)-\frac{x^2}{2}+3x\ln (x)-3\int 1dx$$ $$=x^2\ln (x)-\frac{x^2}{2}+3x\ln (x)-3x+c$$ $$=\frac{1}{2}x(-x+2(x+3)\ln (x)-6)+c$$

But the given answer in book is $x^2\ln (x)-\frac{x^2}{2}+\frac{3}{x}+c$. What did I do wrong?

• Have you tried simplifying your answer? – Prasun Biswas Apr 4 '15 at 7:59
• $\frac{d}{dx}(x^2\ln x-\frac{x^2}{2}+\frac{3}{x})=2x\ln x-\frac{3}{x^2}\neq(2x+3)\ln x$ – user228113 Apr 4 '15 at 8:02

Bookish answer is wrong: $$\left(x^2\ln (x)-\frac{x^2}{2}+\frac{3}{x}+c\right)'=2x\log x-\frac3{x^2}$$ And yours: $$\left(\frac{1}{2}x(-x+2(x+3)\ln (x)-6)+c\right)'=2x\log x+3\log x=(2x+3)\log x$$
$$\int(2x+3)\ln x\ dx=\ln x\int(2x+3)\ dx-\int\left[\frac{d(\ln x)}{dx}\int(2x+3)\ dx\right]dx$$