Answer:
![\displaystyle \int (\ln(x))^2\, dx=x(\ln(x)^2-2\ln(x)+2)+C](https://img.qammunity.org/2021/formulas/mathematics/college/votprigwb9vcyt42i3nxp0fhwwk38svc8x.png)
Explanation:
We want to evaluate the integral:
![\displaystyle \int\left(\ln x\right)^2 \, dx](https://img.qammunity.org/2021/formulas/mathematics/college/os70j7f69qngaucp1ty78p68bmbggkk62c.png)
We can use Integration by Parts. Rewriting the integral yields:
![\displaystyle =\int 1\cdot (\ln(x))^2\, dx](https://img.qammunity.org/2021/formulas/mathematics/college/9r956h04u7bry5x3vtmcil71jbb57ogfd6.png)
Recall that IBP is given by:
![\displaystyle \int u\, dv = uv - \int v \, du](https://img.qammunity.org/2021/formulas/mathematics/college/7il8l9k86brum3cech4z737dcg7nb0k5p6.png)
Let u be (ln(x))². And let dv be (1) dx. Therefore:
![\displaystyle du = 2\ln x \cdot (1)/(x)\, dx](https://img.qammunity.org/2021/formulas/mathematics/college/cjamxsye624d5lr2gftbsleeovs0mummgy.png)
Simplify:
![\displaystyle du=(2\ln(x))/(x)\, dx](https://img.qammunity.org/2021/formulas/mathematics/college/occ8wber8qhkqukbsz32g8p2wxz2egd0g6.png)
And:
![dv=(1)dx\Rightarrow v = x](https://img.qammunity.org/2021/formulas/mathematics/college/dp9puqpwj4plwa0tyqjhaijxuyz41glftl.png)
Therefore:
![\displaystyle \int (\ln(x))^2\, dx=\underbrace{\ln(x)^2}_(u)\underbrace{x}_(v)-\int\underbrace{x}_(v)\cdot \underbrace{(2\ln(x))/(x)\, dx}_(du)](https://img.qammunity.org/2021/formulas/mathematics/college/aopi3x3dqxdakblotacgd23b2sstf8n7io.png)
Simplify:
![\displaystyle =x\ln(x)^2-2 \int\ln(x)\, dx](https://img.qammunity.org/2021/formulas/mathematics/college/5enxj6gcbghkb1izusx99enrjxm53tdkaf.png)
We can perform IBP again. Let u = ln(x) and v = 1. Hence:
![\displaystyle du = (1)/(x) \, dx](https://img.qammunity.org/2021/formulas/mathematics/college/m55q38k940osuel9iklyl5il7hgsgk0f2x.png)
And:
![dv=(1)dx\Rightarrow v = x](https://img.qammunity.org/2021/formulas/mathematics/college/dp9puqpwj4plwa0tyqjhaijxuyz41glftl.png)
Thus:
![\displaystyle =x\ln(x)^2-2\left(x\ln(x)-\int (x)(1)/(x)\, dx\right)](https://img.qammunity.org/2021/formulas/mathematics/college/nahqb9h33h7zcpn6dnn8v2r0xwsh8pvixr.png)
Simplify:
![\displaystyle =x\ln(x)^2-2\left(x\ln(x)-\int (1)\, dx\right)](https://img.qammunity.org/2021/formulas/mathematics/college/1no71swphjfeexkgn6m1hjvna267r6p5ol.png)
Evaluate:
![=x\ln(x)^2-2(x\ln(x)-x)+C](https://img.qammunity.org/2021/formulas/mathematics/college/bxcgcq2l8xhftvlly2rn5fhisa8n29gcxf.png)
Simplify:
![\displaystyle =x\ln(x)^2-2x\ln(x)+2x](https://img.qammunity.org/2021/formulas/mathematics/college/382bhp66r2sf2oho24me0l05lbmuywi0z8.png)
Factor:
![=x(\ln(x)^2-2\ln(x)+2)](https://img.qammunity.org/2021/formulas/mathematics/college/rlf5kypkpizu62x0f6dolx14oj5mhnyoc4.png)
Therefore:
![\displaystyle \int (\ln(x))^2\, dx=x(\ln(x)^2-2\ln(x)+2)+C](https://img.qammunity.org/2021/formulas/mathematics/college/votprigwb9vcyt42i3nxp0fhwwk38svc8x.png)