# What is the antiderivative of ln(x)^2+x?

Oct 20, 2016

$\int {\left(\ln x\right)}^{2} + x \mathrm{dx} = x {\left(\ln x\right)}^{2} + 2 x + \frac{1}{2} {x}^{2} + C$

#### Explanation:

You should learn the IBP formula:
$\int u \frac{\mathrm{dv}}{\mathrm{dx}} \mathrm{dx} = u v - \int v \frac{\mathrm{du}}{\mathrm{dx}} \mathrm{dx}$

So essentially we are looking for one function that simplifies when it is differentiated, and one that simplifies when integrated (or at least is integrable).

In this case we ca already integrate $x$ so we use IBP to integrate $\ln {\left(x\right)}^{2}$, we also need to know that $\int \ln x \mathrm{dx} = x \ln x - x$ (either learn or use IBP):

Let $\left\{\begin{matrix}u = \ln x & \implies & \frac{\mathrm{du}}{\mathrm{dx}} = \frac{1}{x} \\ \frac{\mathrm{dv}}{\mathrm{dx}} = \ln x & \implies & v = x \ln x - x\end{matrix}\right.$

Then IBP gives;
$\int \ln x \ln x \mathrm{dx} = \ln x \left(x \ln x - x\right) - \int \left(x \ln x - x\right) \frac{1}{x} \mathrm{dx}$
$\therefore \int {\left(\ln x\right)}^{2} \mathrm{dx} = x {\left(\ln x\right)}^{2} - x \ln x - \int \left(\ln x - 1\right) \mathrm{dx}$
$\therefore \int {\left(\ln x\right)}^{2} \mathrm{dx} = x {\left(\ln x\right)}^{2} - x \ln x - \left(x \ln x - x - x\right)$
$\therefore \int {\left(\ln x\right)}^{2} \mathrm{dx} = x {\left(\ln x\right)}^{2} - x \ln x + x \ln x + 2 x$

And so we have:
$\therefore \int {\left(\ln x\right)}^{2} + x \mathrm{dx} = x {\left(\ln x\right)}^{2} + 2 x + \frac{1}{2} {x}^{2} + C$