\(\int \frac {\log ^2(e (\frac {a+b x}{c+d x})^n) \log (h (f+g x)^m)}{(a+b x) (c+d x)} \, dx\) [68]

Optimal result
Mathematica [B] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 45, antiderivative size = 496 \[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\frac {m \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{3 (b c-a d) n}+\frac {\log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{3 (b c-a d) n}-\frac {m \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{3 (b c-a d) n}+\frac {m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{b c-a d}-\frac {m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{b c-a d}-\frac {2 m n \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{b c-a d}+\frac {2 m n \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (3,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{b c-a d}+\frac {2 m n^2 \operatorname {PolyLog}\left (4,\frac {d (a+b x)}{b (c+d x)}\right )}{b c-a d}-\frac {2 m n^2 \operatorname {PolyLog}\left (4,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{b c-a d} \] Output:

1/3*m*ln(e*((b*x+a)/(d*x+c))^n)^3*ln((-a*d+b*c)/b/(d*x+c))/(-a*d+b*c)/n+1/ 
3*ln(e*((b*x+a)/(d*x+c))^n)^3*ln(h*(g*x+f)^m)/(-a*d+b*c)/n-1/3*m*ln(e*((b* 
x+a)/(d*x+c))^n)^3*ln(1-(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d*x+c))/(-a*d+b*c)/ 
n+m*ln(e*((b*x+a)/(d*x+c))^n)^2*polylog(2,d*(b*x+a)/b/(d*x+c))/(-a*d+b*c)- 
m*ln(e*((b*x+a)/(d*x+c))^n)^2*polylog(2,(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d*x 
+c))/(-a*d+b*c)-2*m*n*ln(e*((b*x+a)/(d*x+c))^n)*polylog(3,d*(b*x+a)/b/(d*x 
+c))/(-a*d+b*c)+2*m*n*ln(e*((b*x+a)/(d*x+c))^n)*polylog(3,(-c*g+d*f)*(b*x+ 
a)/(-a*g+b*f)/(d*x+c))/(-a*d+b*c)+2*m*n^2*polylog(4,d*(b*x+a)/b/(d*x+c))/( 
-a*d+b*c)-2*m*n^2*polylog(4,(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d*x+c))/(-a*d+b 
*c)
 

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(25557\) vs. \(2(496)=992\).

Time = 7.93 (sec) , antiderivative size = 25557, normalized size of antiderivative = 51.53 \[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\text {Result too large to show} \] Input:

Integrate[(Log[e*((a + b*x)/(c + d*x))^n]^2*Log[h*(f + g*x)^m])/((a + b*x) 
*(c + d*x)),x]
 

Output:

Result too large to show
 

Rubi [A] (verified)

Time = 1.50 (sec) , antiderivative size = 519, normalized size of antiderivative = 1.05, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {2989, 2953, 2804, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\log \left (h (f+g x)^m\right ) \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a+b x) (c+d x)} \, dx\)

\(\Big \downarrow \) 2989

\(\displaystyle \frac {\log \left (h (f+g x)^m\right ) \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3 n (b c-a d)}-\frac {g m \int \frac {\log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x}dx}{3 n (b c-a d)}\)

\(\Big \downarrow \) 2953

\(\displaystyle \frac {\log \left (h (f+g x)^m\right ) \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3 n (b c-a d)}-\frac {g m \int \frac {\log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{\left (b-\frac {d (a+b x)}{c+d x}\right ) \left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{3 n}\)

\(\Big \downarrow \) 2804

\(\displaystyle \frac {\log \left (h (f+g x)^m\right ) \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3 n (b c-a d)}-\frac {g m \int \left (\frac {d \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(b c-a d) g \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {(c g-d f) \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(b c-a d) g \left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )}\right )d\frac {a+b x}{c+d x}}{3 n}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\log \left (h (f+g x)^m\right ) \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3 n (b c-a d)}-\frac {g m \left (-\frac {6 n^2 \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (3,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g (b c-a d)}+\frac {3 n \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g (b c-a d)}+\frac {\log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (1-\frac {(a+b x) (d f-c g)}{(c+d x) (b f-a g)}\right )}{g (b c-a d)}+\frac {6 n^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right ) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{g (b c-a d)}-\frac {3 n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{g (b c-a d)}-\frac {\log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \log ^3\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{g (b c-a d)}+\frac {6 n^3 \operatorname {PolyLog}\left (4,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g (b c-a d)}-\frac {6 n^3 \operatorname {PolyLog}\left (4,\frac {d (a+b x)}{b (c+d x)}\right )}{g (b c-a d)}\right )}{3 n}\)

Input:

Int[(Log[e*((a + b*x)/(c + d*x))^n]^2*Log[h*(f + g*x)^m])/((a + b*x)*(c + 
d*x)),x]
 

Output:

(Log[e*((a + b*x)/(c + d*x))^n]^3*Log[h*(f + g*x)^m])/(3*(b*c - a*d)*n) - 
(g*m*(-((Log[e*((a + b*x)/(c + d*x))^n]^3*Log[1 - (d*(a + b*x))/(b*(c + d* 
x))])/((b*c - a*d)*g)) + (Log[e*((a + b*x)/(c + d*x))^n]^3*Log[1 - ((d*f - 
 c*g)*(a + b*x))/((b*f - a*g)*(c + d*x))])/((b*c - a*d)*g) - (3*n*Log[e*(( 
a + b*x)/(c + d*x))^n]^2*PolyLog[2, (d*(a + b*x))/(b*(c + d*x))])/((b*c - 
a*d)*g) + (3*n*Log[e*((a + b*x)/(c + d*x))^n]^2*PolyLog[2, ((d*f - c*g)*(a 
 + b*x))/((b*f - a*g)*(c + d*x))])/((b*c - a*d)*g) + (6*n^2*Log[e*((a + b* 
x)/(c + d*x))^n]*PolyLog[3, (d*(a + b*x))/(b*(c + d*x))])/((b*c - a*d)*g) 
- (6*n^2*Log[e*((a + b*x)/(c + d*x))^n]*PolyLog[3, ((d*f - c*g)*(a + b*x)) 
/((b*f - a*g)*(c + d*x))])/((b*c - a*d)*g) - (6*n^3*PolyLog[4, (d*(a + b*x 
))/(b*(c + d*x))])/((b*c - a*d)*g) + (6*n^3*PolyLog[4, ((d*f - c*g)*(a + b 
*x))/((b*f - a*g)*(c + d*x))])/((b*c - a*d)*g)))/(3*n)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2804
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{ 
u = ExpandIntegrand[(a + b*Log[c*x^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] / 
; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]
 

rule 2953
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)   Sub 
st[Int[(b*f - a*g - (d*f - c*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m + 2 
)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n} 
, x] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]
 

rule 2989
Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.)) 
^(r_.)]^(s_.)*Log[(i_.)*((j_.)*((g_.) + (h_.)*(x_))^(t_.))^(u_.)]*(v_), x_S 
ymbol] :> With[{k = Simplify[v*(a + b*x)*(c + d*x)]}, Simp[k*Log[i*(j*(g + 
h*x)^t)^u]*(Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s + 1)/(p*r*(s + 1)*(b*c 
- a*d))), x] - Simp[k*h*t*(u/(p*r*(s + 1)*(b*c - a*d)))   Int[Log[e*(f*(a + 
 b*x)^p*(c + d*x)^q)^r]^(s + 1)/(g + h*x), x], x] /; FreeQ[k, x]] /; FreeQ[ 
{a, b, c, d, e, f, g, h, i, j, p, q, r, s, t, u}, x] && NeQ[b*c - a*d, 0] & 
& EqQ[p + q, 0] && NeQ[s, -1]
 
Maple [F]

\[\int \frac {\ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} \ln \left (h \left (g x +f \right )^{m}\right )}{\left (b x +a \right ) \left (d x +c \right )}d x\]

Input:

int(ln(e*((b*x+a)/(d*x+c))^n)^2*ln(h*(g*x+f)^m)/(b*x+a)/(d*x+c),x)
 

Output:

int(ln(e*((b*x+a)/(d*x+c))^n)^2*ln(h*(g*x+f)^m)/(b*x+a)/(d*x+c),x)
 

Fricas [F]

\[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\int { \frac {\log \left ({\left (g x + f\right )}^{m} h\right ) \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )^{2}}{{\left (b x + a\right )} {\left (d x + c\right )}} \,d x } \] Input:

integrate(log(e*((b*x+a)/(d*x+c))^n)^2*log(h*(g*x+f)^m)/(b*x+a)/(d*x+c),x, 
 algorithm="fricas")
 

Output:

integral(log((g*x + f)^m*h)*log(e*((b*x + a)/(d*x + c))^n)^2/(b*d*x^2 + a* 
c + (b*c + a*d)*x), x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\text {Timed out} \] Input:

integrate(ln(e*((b*x+a)/(d*x+c))**n)**2*ln(h*(g*x+f)**m)/(b*x+a)/(d*x+c),x 
)
 

Output:

Timed out
 

Maxima [F]

\[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\int { \frac {\log \left ({\left (g x + f\right )}^{m} h\right ) \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )^{2}}{{\left (b x + a\right )} {\left (d x + c\right )}} \,d x } \] Input:

integrate(log(e*((b*x+a)/(d*x+c))^n)^2*log(h*(g*x+f)^m)/(b*x+a)/(d*x+c),x, 
 algorithm="maxima")
 

Output:

1/3*(n^2*log(b*x + a)^3 - n^2*log(d*x + c)^3 - 3*n*log(b*x + a)^2*log(e) + 
 3*(n^2*log(b*x + a) - n*log(e))*log(d*x + c)^2 + 3*(log(b*x + a) - log(d* 
x + c))*log((b*x + a)^n)^2 + 3*(log(b*x + a) - log(d*x + c))*log((d*x + c) 
^n)^2 + 3*log(b*x + a)*log(e)^2 - 3*(n^2*log(b*x + a)^2 - 2*n*log(b*x + a) 
*log(e) + log(e)^2)*log(d*x + c) - 3*(n*log(b*x + a)^2 + n*log(d*x + c)^2 
- 2*(n*log(b*x + a) - log(e))*log(d*x + c) - 2*log(b*x + a)*log(e))*log((b 
*x + a)^n) + 3*(n*log(b*x + a)^2 + n*log(d*x + c)^2 - 2*(n*log(b*x + a) - 
log(e))*log(d*x + c) - 2*(log(b*x + a) - log(d*x + c))*log((b*x + a)^n) - 
2*log(b*x + a)*log(e))*log((d*x + c)^n))*log((g*x + f)^m)/(b*c - a*d) - in 
tegrate(-1/3*(3*b*c*f*log(e)^2*log(h) - 3*a*d*f*log(e)^2*log(h) - (b*d*g*m 
*n^2*x^2 + a*c*g*m*n^2 + (b*c*g*m*n^2 + a*d*g*m*n^2)*x)*log(b*x + a)^3 + ( 
b*d*g*m*n^2*x^2 + a*c*g*m*n^2 + (b*c*g*m*n^2 + a*d*g*m*n^2)*x)*log(d*x + c 
)^3 + 3*(b*d*g*m*n*x^2*log(e) + a*c*g*m*n*log(e) + (b*c*g*m*n*log(e) + a*d 
*g*m*n*log(e))*x)*log(b*x + a)^2 + 3*(b*d*g*m*n*x^2*log(e) + a*c*g*m*n*log 
(e) + (b*c*g*m*n*log(e) + a*d*g*m*n*log(e))*x - (b*d*g*m*n^2*x^2 + a*c*g*m 
*n^2 + (b*c*g*m*n^2 + a*d*g*m*n^2)*x)*log(b*x + a))*log(d*x + c)^2 + 3*(b* 
c*f*log(h) - a*d*f*log(h) + (b*c*g*log(h) - a*d*g*log(h))*x - (b*d*g*m*x^2 
 + a*c*g*m + (b*c*g*m + a*d*g*m)*x)*log(b*x + a) + (b*d*g*m*x^2 + a*c*g*m 
+ (b*c*g*m + a*d*g*m)*x)*log(d*x + c))*log((b*x + a)^n)^2 + 3*(b*c*f*log(h 
) - a*d*f*log(h) + (b*c*g*log(h) - a*d*g*log(h))*x - (b*d*g*m*x^2 + a*c...
 

Giac [F]

\[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\int { \frac {\log \left ({\left (g x + f\right )}^{m} h\right ) \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )^{2}}{{\left (b x + a\right )} {\left (d x + c\right )}} \,d x } \] Input:

integrate(log(e*((b*x+a)/(d*x+c))^n)^2*log(h*(g*x+f)^m)/(b*x+a)/(d*x+c),x, 
 algorithm="giac")
 

Output:

integrate(log((g*x + f)^m*h)*log(e*((b*x + a)/(d*x + c))^n)^2/((b*x + a)*( 
d*x + c)), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\int \frac {\ln \left (h\,{\left (f+g\,x\right )}^m\right )\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2}{\left (a+b\,x\right )\,\left (c+d\,x\right )} \,d x \] Input:

int((log(h*(f + g*x)^m)*log(e*((a + b*x)/(c + d*x))^n)^2)/((a + b*x)*(c + 
d*x)),x)
 

Output:

int((log(h*(f + g*x)^m)*log(e*((a + b*x)/(c + d*x))^n)^2)/((a + b*x)*(c + 
d*x)), x)
 

Reduce [F]

\[ \int \frac {\log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log \left (h (f+g x)^m\right )}{(a+b x) (c+d x)} \, dx=\int \frac {\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right )^{2} \mathrm {log}\left (h \left (g x +f \right )^{m}\right )}{b d \,x^{2}+a d x +b c x +a c}d x \] Input:

int(log(e*((b*x+a)/(d*x+c))^n)^2*log(h*(g*x+f)^m)/(b*x+a)/(d*x+c),x)
 

Output:

int((log(((a + b*x)**n*e)/(c + d*x)**n)**2*log((f + g*x)**m*h))/(a*c + a*d 
*x + b*c*x + b*d*x**2),x)