<s>[INST] Find the integral $\int \frac{(\ln(x))^2}{x^3} \, dx$ $$\int \frac{(\ln(x))^2}{x^3} \, dx $$
Starting off with Integration by Parts
$$
\begin{align}
u = \ln(x)^2 &~~~ dv = x^{-3} \\\\
du = 2\ln(x)dx &~~~ v = \frac{x^{-2}}{-2}
\end{align}
$$
$$
\begin{align}
\int \frac{(\ln(x))^2}{x^3} &= (\ln(x))^2 \left( \frac{-x^{-2}}{2} \right) -\frac{2}{2} \int \frac{\ln(x)}{x^2}
\end{align}
$$
Integration by parts again...
$$
\begin{align}
u = \ln(x)  &\hspace{10mm} dv = \frac{1}{x^2} \\\\
du = \frac{1}{x}dx &\hspace{10mm} v = -\frac{1}{x} \\\\
-\frac{2}{2} \int \frac{\ln(x)}{x^2} &= -\ln(x) \left(\frac{1}{x} \right) + \int \frac{1}{x^2}dx \\\\ 
\end{align}
$$
Integration by parts several times $\int \frac{1}{x^2}dx \rightarrow \int \frac{1}{x} \rightarrow \ln(x) + C$
Combining everything together, I get 
$$
\int \frac{(\ln(x))^2}{x^3} = (\ln(x))^2 \left( \frac{-x^{-2}}{2} \right) -\ln(x) \left(\frac{1}{x} \right) - \ln(x) + C\\\\
= -\frac{(\ln(x))^2}{2x^2} - \frac{\ln(x)}{x} - \ln(x) + C
$$
Is there a shorter way I could have done this? I think I got the right answer, but I am not really sure either. Checking my answer via differentiate doesn't seem like a feasible test strategy and even without time constraints still seems too complex for my level right now (but then maybe this is why I need the practice)
 [/INST] Let's prove by induction $$\displaystyle I_p(n)=\int\dfrac{\ln(x)^n}{x^p}\mathop{dx}=\dfrac{P_n(\ln(x))}{x^{p-1}}$$ where $P_n$ is a polynomial of degree $n$.
We will assume in the following $p>1$, so we can carry on integration by parts.
$\displaystyle I_p(0)=\int \dfrac{\mathop{dx}}{x^p}=\dfrac{1-p}{x^{p-1}}$ thus $P_0(x)=1-p$ is a polynomial of degree $0$
$\displaystyle I_p(n+1)=\int\dfrac{\ln(x)^{n+1}}{x^p}\mathop{dx}=\left[\ln(x)^{n+1}\times\dfrac{1-p}{x^{p-1}}\right]-\int \dfrac{(n+1)\ln(x)^n}{x}\dfrac {1-p}{x^{p-1}}\mathop{dx}=\alpha\dfrac{\ln(x)^{n+1}}{x^{p-1}}+\beta I_p(n)$
By induction hypothesis $P_{n+1}(x)=\alpha x^{n+1}+\beta P_n(x)$ is a polynomial of degree $n+1$ and the induction is verified.

Of course we could have calculated the exact coefficients, but it makes it harder to remember the formula. In fact we were just interested in the general form of the result.

In our case we have $\displaystyle I_3(2)=\int\dfrac{\ln(x)^2}{x^3}\mathop{dx}=\dfrac{a\ln(x)^2+b\ln(x)+c}{x^2}$

Derivate it and identify the coefficients : $x^3\times {I_3}'(2)=-2a\ln(x)^2-(2b-2a)\ln(x)-(2c-b)\iff\begin{cases}-2a=1\\2b-2a=0\\2c-b=0\end{cases}\iff \begin{cases}a=-\frac 12\\b=-\frac 12\\c=-\frac 14\end{cases}$
</s>