Products of logarithms under the integral sign This question is a simplification of a previously asked question: Polylogarithmic integrals
Consider the following type of function:
\begin{equation}
\int \frac{\prod_{i=1}^N \log(x-\beta_i)}{x-\alpha} dx
\end{equation}
For the simple case of $N=2$ we have the following integral,
\begin{equation}
\int \frac{\log(x-B) \log(x-C)}{x-A} dx
\end{equation}
the result of which is already highly complicated. See for example the way the Risch algorithm in Wolfram Alpha tackles it: link. The dream is to generalise this $N=2$ result, but I can't seem to find information, references or some other canonical answer for the result shown in Wolfram Alpha/Mathematica/RUBI. Needless to say, my own efforts to derive the result have failed identically.
Sadly, for the case for $N=3$ logarithms under the integral, Wolfram Alpha and related methods do not even have any answer ready. From what I can see, Wolfram uses a lookup table to determine what the resulting integrand will look like for $N=2$, and there is no $N=3$ entry in the table.
The most verbose "step-by-step" derivation I have found was through RUBI, where RUBI rule 2485 appears to be invoked. This lead me to page 36 in this pdf, which appears to hint at some obscure sequence of integration by parts and substitutions, but I have found nothing that results in the expressions shown in that PDF.
Since I would like to somehow find a structure for higher $N$ of the above more general integral: does anyone have a reference for how to derive the ($N=2$) result shown in Wolfram Alpha or Mathematica? Or perhaps give a derivation of the result themselves? I'm aware I can take the derivative of the Wolfram Alpha result, but this will not give me new information on how to solve when $N=3$, so solutions going from the original integral to the result, as if there is no prior knowledge of the result, are the only ones I can accept.
 A: I have managed to do the first two steps of the attached PDF:
\begin{align*}
\int \frac{\log(a+bx)\log(c+dx)}{x} dx &=\log(a+bx)\log(c+dx)\log\left[-\frac{bx}a\right] - b\int dx \frac{\log\left[-\frac{bx}a\right] \log(c+dx)}{a+bx} - d\int \frac{\log\left[-\frac{bx}a\right] \log(a+bx)}{c+dx} \\
&=\log(a+bx)\log(c+dx)\log\left[-\frac{bx}a\right] - b\int dx \frac{\log\left[-\frac{bx}a\right] \left[\log(c+dx) - \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\right]}{a+bx} -\cdots\\
&\phantom=\cdots- b\int dx \frac{\log\left[-\frac{bx}a\right] \log\left[\frac{a(c+dx)}{c(a+bx)}\right]}{a+bx}- d\int dx\frac{\log\left[-\frac{bx}a\right] \left[\log(a+bx) + \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\right]}{c+dx} + \cdots \\
&\phantom= \cdots+ d \int dx \frac{\log\left[-\frac{bx}a\right] \log\left[\frac{a(c+dx)}{c(a+bx)}\right]}{c+dx} \\
&=\log(a+bx)\log(c+dx)\log\left[-\frac{bx}a\right] - b\int dx \frac{\log\left[-\frac{bx}a\right] \left[\log(c+dx) - \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\right]}{a+bx} -\cdots\\
&\phantom=\cdots- d\left[\log\left[-\frac{bx}a\right] - \log\left[-\frac{dx}{c}\right]\right]\int dx\frac{\log(a+bx) + \log\left[\frac{a(c+dx)}{c(a+bx)}\right]}{c+dx} - \cdots \\
&\phantom= \cdots -d\int dx\frac{\log\left[-\frac{dx}c\right]\left[\log(a+bx) + \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\right]}{c+dx} - \int dx \log\left[-\frac{bx}a\right] \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\left[\frac{ b(c+dx)-d(a+bx)}{(a+bx)(c+dx)}\right]\\
&=\log(a+bx)\log(c+dx)\log\left[-\frac{bx}a\right] - b\int dx \frac{\log\left[-\frac{bx}a\right] \left[\log(c+dx) - \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\right]}{a+bx} -\cdots\\
&\phantom=\cdots- d\left[\log\left[-\frac{bx}a\right] - \log\left[-\frac{dx}{c}\right]\right]\int dx\frac{\log(a+bx) + \log\left[\frac{a(c+dx)}{c(a+bx)}\right]}{c+dx} - \cdots \\
&\phantom= \cdots -d\int dx\frac{\log\left[-\frac{dx}c\right]\left[\log(a+bx) + \log\left[\frac{a(c+dx)}{c(a+bx)}\right]\right]}{c+dx} - (bc-ad)\int dx \frac{\log\left[-\frac{bx}a\right] \log\left[\frac{a(c+dx)}{c(a+bx)}\right]}{(a+bx)(c+dx)}
\end{align*}
This reduces the integral to known integrals.
I have used the "add and subtract" method, and I have exchanged the constant inside the logarithm by twofold partial integration, back and forth. If anything is unclear leave a comment:)
