<s>[INST] Integration using "method of judicious guessing" My calculus-book gives an example of integration using the method of judicious guessing. But I do not intuit the method very well. 
QUESTION: How does the derivative of $f_{mn}(x)$ "suggest that we try" $I=Px^4\left(\log {x}\right)^2 +Qx^4\log{x}+Rx^4+C$? Where does this trial formula come from?
The example goes as follows:

Find the derivative of $f_{mn}(x)=x^m\left(\log {x}\right)^n$ and use the result to suggest a trial formula for $I=\int x^3\left(\log {x}\right)^2dx$. Thus evaluate this integral.
Solution: We have
  $$f'_{mn}(x)=mx^{m-1}\left(\log {x}\right)^n+nx^{m-1}\left(\log {x}\right)^{n-1}.$$
  This suggests that we try
  $$I=Px^4\left(\log {x}\right)^2+Qx^4\log{x}+Rx^4+C$$
  for constants $P$, $Q$, $R$ and $C$. Differentiating we get
  $$\frac{dI}{dx} = 4Px^3\left(\log {x}\right)^2 + 2Px^3\log{x} + 4Qx^3\log{x} + Qx^3 + 4Rx^3 = x^3\left(\log {x}\right)^2,$$
  solving for $P$, $Q$ and $R$ we arrive at the right answer:
  $$\int x^3\left(\log {x}\right)^2dx=\frac{1}{4}x^4\left(\log {x}\right)^2-\frac{1}{8}x^4\log{x}+\frac{1}{32}x^4+C.$$

Please note my level of mathematics is still "in development": I am learning without a teacher.

BACKGROUND: In my efforts I did notice the following, which also results in the right answer:
$$\frac{d}{dx}x^m\left(\log {x}\right)^n=mx^{m-1}\left(\log {x}\right)^n+nx^{m-1}\left(\log {x}\right)^{n-1}.$$
Integrating both sides we get:
$$x^m\left(\log {x}\right)^n=m\int x^{m-1}\left(\log {x}\right)^n dx+n\int x^{m-1}\left(\log {x}\right)^{n-1}dx.$$
Now we can define $g_{mn}(x)$ as follows:
$$g_{mn}\left(x\right)=\int x^{m-1}\left(\log {x}\right)^n dx=\frac{1}{m}x^m\left(\log {x}\right)^n-\frac{n}{m}\int x^{m-1}\left(\log {x}\right)^{n-1}dx.$$
Taking $m=4$ and $n=2$ we get:
\begin{align}
I&=\int x^3\left(\log {x}\right)^2dx=g_{42}(x)=\frac{1}{4}x^4\left(\log {x}\right)^2-\frac{1}{2}\int x^3\log{x}\,dx\\
&=\frac{1}{4}x^4\left(\log {x}\right)^2-\frac{1}{2}g_{41}(x)=\frac{1}{4}x^4\left(\log {x}\right)^2-\frac{1}{8}x^4\log{x}+\frac{1}{32}x^4+C.
\end{align}
 [/INST] Note that$$
f_{m, n}'(x) = mx^{m - 1} (\ln x)^n + nx^{m - 1} (\ln x)^{n - 1} = P_{m, n}(x, \ln x),
$$
where $P_{m, n}(x, y) = mx^{m - 1} y^n + nx^{m - 1} y^{n - 1}$ is a polynomial of $x$ and $y$, and $\deg_x P_{m, n} = m - 1$, $\deg_y P_{m, n} = n$.
First, the primitive function of $f_{m_0, n_0}(x) = x^{m_0} (\ln x)^{n_0}$ can be guessed as a linear combination of some $f_{m, n}$'s plus a constant $C$. Next, note that $P_{m, n}$ is a monomial of degree $m - 1$ with respect to $x$, i.e. $P_{m, n}(x, y) = x^{m - 1} Q_{m, n}(y)$, thus the combination should be of $f_{m, n}$'s all with $m = m_0 + 1$. Now, since $\deg_y P_{m, n} = n$, then the $f_{m_0 + 1, n}$'s in the combination should satisfy $0 \leqslant n \leqslant n_0$. Therefore, the guessed form is$$
F_{m_0, n_0}(x) = \sum_{k = 0}^{n_0} a_k f_{m_0 + 1, n}(x) + C.
$$
</s>