Guys I even tried looking at the solution, yet I still can't figure it out. Would love some help here.
$$\int\ln^2 x\,dx$$
I know the Int. by parts formula is
$f(x)g'(x)=f(x)g(x)-\int\ f'(x)g(x)$
Now we are supposed to assign $f(x)$ to the part that gets easier when we differentiate it, and $g'(x)$ to something that gets easier once we integrate it.
So I think setting $\ln^2(x)$ to be $f(x)$ would be easier, since differentiating it would get us $\frac{2\ln x}{x}$. Now setting $x$ up to be $g'(x)$ would be a little bit hairy, since integrating it would result in $\frac {x^2}{2}$.
$f(x)=\ln^2(x)$
$f'(x)=\frac{2\ln(x)}{x}$
$g(x)=\frac{x^2}{x}$
$g'(x)=x$
$\ln^2(x)\frac{x^2}{x}-\int\ \frac{2\ln(x)}{x}\frac{x^2}{x}$
Simplifying a little: $\ln^2(x){x}-2\int\ \frac{\ln(x)x^2}{x}$
So it doesn't really seem to work unless I'm doing something wrong, how are we supposed to integrate these?
Any help is appreciated!
Hint:$$\int\ln^2x\,\mathrm dx=\int1\times\ln^2x\,\mathrm dx=x\ln^2x-2\int x\ln(x)\frac1x\,\mathrm dx=x\ln^2x-2\int\ln x\,\mathrm dx.$$