\(\int \frac {(A+B \log (e (\frac {a+b x}{c+d x})^n))^2}{(a g+b g x)^3} \, dx\) [16]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 35, antiderivative size = 288 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=\frac {2 B^2 d n^2 (c+d x)}{(b c-a d)^2 g^3 (a+b x)}-\frac {b B^2 n^2 (c+d x)^2}{4 (b c-a d)^2 g^3 (a+b x)^2}+\frac {2 B d n (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^2 g^3 (a+b x)}-\frac {b B n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 (b c-a d)^2 g^3 (a+b x)^2}+\frac {d (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d)^2 g^3 (a+b x)}-\frac {b (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 (b c-a d)^2 g^3 (a+b x)^2} \] Output:

2*B^2*d*n^2*(d*x+c)/(-a*d+b*c)^2/g^3/(b*x+a)-1/4*b*B^2*n^2*(d*x+c)^2/(-a*d 
+b*c)^2/g^3/(b*x+a)^2+2*B*d*n*(d*x+c)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(-a* 
d+b*c)^2/g^3/(b*x+a)-1/2*b*B*n*(d*x+c)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/( 
-a*d+b*c)^2/g^3/(b*x+a)^2+d*(d*x+c)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(-a* 
d+b*c)^2/g^3/(b*x+a)-1/2*b*(d*x+c)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(-a 
*d+b*c)^2/g^3/(b*x+a)^2
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.33 (sec) , antiderivative size = 463, normalized size of antiderivative = 1.61 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=-\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {B n \left (2 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+4 d (-b c+a d) (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-4 d^2 (a+b x)^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+4 d^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-4 B d n (a+b x) (b c-a d+d (a+b x) \log (a+b x)-d (a+b x) \log (c+d x))+B n \left ((b c-a d)^2+2 d (-b c+a d) (a+b x)-2 d^2 (a+b x)^2 \log (a+b x)+2 d^2 (a+b x)^2 \log (c+d x)\right )+2 B d^2 n (a+b x)^2 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )-2 B d^2 n (a+b x)^2 \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{(b c-a d)^2}}{4 b g^3 (a+b x)^2} \] Input:

Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(a*g + b*g*x)^3,x]
 

Output:

-1/4*(2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2 + (B*n*(2*(b*c - a*d)^2*( 
A + B*Log[e*((a + b*x)/(c + d*x))^n]) + 4*d*(-(b*c) + a*d)*(a + b*x)*(A + 
B*Log[e*((a + b*x)/(c + d*x))^n]) - 4*d^2*(a + b*x)^2*Log[a + b*x]*(A + B* 
Log[e*((a + b*x)/(c + d*x))^n]) + 4*d^2*(a + b*x)^2*(A + B*Log[e*((a + b*x 
)/(c + d*x))^n])*Log[c + d*x] - 4*B*d*n*(a + b*x)*(b*c - a*d + d*(a + b*x) 
*Log[a + b*x] - d*(a + b*x)*Log[c + d*x]) + B*n*((b*c - a*d)^2 + 2*d*(-(b* 
c) + a*d)*(a + b*x) - 2*d^2*(a + b*x)^2*Log[a + b*x] + 2*d^2*(a + b*x)^2*L 
og[c + d*x]) + 2*B*d^2*n*(a + b*x)^2*(Log[a + b*x]*(Log[a + b*x] - 2*Log[( 
b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)]) - 
 2*B*d^2*n*(a + b*x)^2*((2*Log[(d*(a + b*x))/(-(b*c) + a*d)] - Log[c + d*x 
])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)])))/(b*c - a*d)^2 
)/(b*g^3*(a + b*x)^2)
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 224, normalized size of antiderivative = 0.78, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {2949, 2795, 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 {\left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{(a g+b g x)^3} \, dx\)

\(\Big \downarrow \) 2949

\(\displaystyle \frac {\int \frac {(c+d x)^3 \left (b-\frac {d (a+b x)}{c+d x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^3}d\frac {a+b x}{c+d x}}{g^3 (b c-a d)^2}\)

\(\Big \downarrow \) 2795

\(\displaystyle \frac {\int \left (\frac {b (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^3}-\frac {d (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x)^2}\right )d\frac {a+b x}{c+d x}}{g^3 (b c-a d)^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {b B n (c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (a+b x)^2}+\frac {2 B d n (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-\frac {b (c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 (a+b x)^2}+\frac {d (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{a+b x}-\frac {b B^2 n^2 (c+d x)^2}{4 (a+b x)^2}+\frac {2 B^2 d n^2 (c+d x)}{a+b x}}{g^3 (b c-a d)^2}\)

Input:

Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(a*g + b*g*x)^3,x]
 

Output:

((2*B^2*d*n^2*(c + d*x))/(a + b*x) - (b*B^2*n^2*(c + d*x)^2)/(4*(a + b*x)^ 
2) + (2*B*d*n*(c + d*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(a + b*x) 
- (b*B*n*(c + d*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(2*(a + b*x)^ 
2) + (d*(c + d*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(a + b*x) - (b 
*(c + d*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(2*(a + b*x)^2))/(( 
b*c - a*d)^2*g^3)
 

Defintions of rubi rules used

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

rule 2795
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + 
(e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ 
c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b 
, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 
] && IntegerQ[m] && IntegerQ[r]))
 

rule 2949
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^(m + 
1)*(g/b)^m   Subst[Int[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] && Ne 
Q[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[b*f - a*g, 0] && (GtQ[p, 0] || Lt 
Q[m, -1])
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(671\) vs. \(2(282)=564\).

Time = 4.71 (sec) , antiderivative size = 672, normalized size of antiderivative = 2.33

method result size
parallelrisch \(-\frac {-8 B^{2} a \,b^{4} c \,d^{2} n^{3}+6 A B \,a^{2} b^{3} d^{3} n^{2}+2 A B \,b^{5} c^{2} d \,n^{2}-4 A^{2} a \,b^{4} c \,d^{2} n -8 A B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{4} d^{3} n -8 A B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{4} c \,d^{2} n +7 B^{2} a^{2} b^{3} d^{3} n^{3}+B^{2} b^{5} c^{2} d \,n^{3}+2 A^{2} a^{2} b^{3} d^{3} n +2 A^{2} b^{5} c^{2} d n -4 A B \,x^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} d^{3} n -4 B^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} a \,b^{4} d^{3} n -8 B^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{4} d^{3} n^{2}-4 B^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} c \,d^{2} n^{2}+4 A B x a \,b^{4} d^{3} n^{2}-4 A B x \,b^{5} c \,d^{2} n^{2}-4 B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} a \,b^{4} c \,d^{2} n -8 B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{4} c \,d^{2} n^{2}+4 A B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} c^{2} d n -8 A B a \,b^{4} c \,d^{2} n^{2}-2 B^{2} x^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{5} d^{3} n -6 B^{2} x^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} d^{3} n^{2}+6 B^{2} x a \,b^{4} d^{3} n^{3}-6 B^{2} x \,b^{5} c \,d^{2} n^{3}+2 B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{5} c^{2} d n +2 B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} c^{2} d \,n^{2}}{4 g^{3} \left (b x +a \right )^{2} n \left (a^{2} d^{2}-2 a c d b +c^{2} b^{2}\right ) b^{4} d}\) \(672\)

Input:

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x,method=_RETURNVERBOS 
E)
 

Output:

-1/4*(-8*B^2*a*b^4*c*d^2*n^3+6*A*B*a^2*b^3*d^3*n^2+2*A*B*b^5*c^2*d*n^2-4*A 
^2*a*b^4*c*d^2*n-8*A*B*x*ln(e*((b*x+a)/(d*x+c))^n)*a*b^4*d^3*n-8*A*B*ln(e* 
((b*x+a)/(d*x+c))^n)*a*b^4*c*d^2*n+7*B^2*a^2*b^3*d^3*n^3+B^2*b^5*c^2*d*n^3 
+2*A^2*a^2*b^3*d^3*n+2*A^2*b^5*c^2*d*n-4*A*B*x^2*ln(e*((b*x+a)/(d*x+c))^n) 
*b^5*d^3*n-4*B^2*x*ln(e*((b*x+a)/(d*x+c))^n)^2*a*b^4*d^3*n-8*B^2*x*ln(e*(( 
b*x+a)/(d*x+c))^n)*a*b^4*d^3*n^2-4*B^2*x*ln(e*((b*x+a)/(d*x+c))^n)*b^5*c*d 
^2*n^2+4*A*B*x*a*b^4*d^3*n^2-4*A*B*x*b^5*c*d^2*n^2-4*B^2*ln(e*((b*x+a)/(d* 
x+c))^n)^2*a*b^4*c*d^2*n-8*B^2*ln(e*((b*x+a)/(d*x+c))^n)*a*b^4*c*d^2*n^2+4 
*A*B*ln(e*((b*x+a)/(d*x+c))^n)*b^5*c^2*d*n-8*A*B*a*b^4*c*d^2*n^2-2*B^2*x^2 
*ln(e*((b*x+a)/(d*x+c))^n)^2*b^5*d^3*n-6*B^2*x^2*ln(e*((b*x+a)/(d*x+c))^n) 
*b^5*d^3*n^2+6*B^2*x*a*b^4*d^3*n^3-6*B^2*x*b^5*c*d^2*n^3+2*B^2*ln(e*((b*x+ 
a)/(d*x+c))^n)^2*b^5*c^2*d*n+2*B^2*ln(e*((b*x+a)/(d*x+c))^n)*b^5*c^2*d*n^2 
)/g^3/(b*x+a)^2/n/(a^2*d^2-2*a*b*c*d+b^2*c^2)/b^4/d
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 651 vs. \(2 (282) = 564\).

Time = 0.09 (sec) , antiderivative size = 651, normalized size of antiderivative = 2.26 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=-\frac {2 \, A^{2} b^{2} c^{2} - 4 \, A^{2} a b c d + 2 \, A^{2} a^{2} d^{2} + {\left (B^{2} b^{2} c^{2} - 8 \, B^{2} a b c d + 7 \, B^{2} a^{2} d^{2}\right )} n^{2} + 2 \, {\left (B^{2} b^{2} c^{2} - 2 \, B^{2} a b c d + B^{2} a^{2} d^{2}\right )} \log \left (e\right )^{2} - 2 \, {\left (B^{2} b^{2} d^{2} n^{2} x^{2} + 2 \, B^{2} a b d^{2} n^{2} x - {\left (B^{2} b^{2} c^{2} - 2 \, B^{2} a b c d\right )} n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} + 2 \, {\left (A B b^{2} c^{2} - 4 \, A B a b c d + 3 \, A B a^{2} d^{2}\right )} n - 2 \, {\left (3 \, {\left (B^{2} b^{2} c d - B^{2} a b d^{2}\right )} n^{2} + 2 \, {\left (A B b^{2} c d - A B a b d^{2}\right )} n\right )} x + 2 \, {\left (2 \, A B b^{2} c^{2} - 4 \, A B a b c d + 2 \, A B a^{2} d^{2} - 2 \, {\left (B^{2} b^{2} c d - B^{2} a b d^{2}\right )} n x + {\left (B^{2} b^{2} c^{2} - 4 \, B^{2} a b c d + 3 \, B^{2} a^{2} d^{2}\right )} n - 2 \, {\left (B^{2} b^{2} d^{2} n x^{2} + 2 \, B^{2} a b d^{2} n x - {\left (B^{2} b^{2} c^{2} - 2 \, B^{2} a b c d\right )} n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right ) + 2 \, {\left ({\left (B^{2} b^{2} c^{2} - 4 \, B^{2} a b c d\right )} n^{2} - {\left (3 \, B^{2} b^{2} d^{2} n^{2} + 2 \, A B b^{2} d^{2} n\right )} x^{2} + 2 \, {\left (A B b^{2} c^{2} - 2 \, A B a b c d\right )} n - 2 \, {\left (2 \, A B a b d^{2} n + {\left (B^{2} b^{2} c d + 2 \, B^{2} a b d^{2}\right )} n^{2}\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{4 \, {\left ({\left (b^{5} c^{2} - 2 \, a b^{4} c d + a^{2} b^{3} d^{2}\right )} g^{3} x^{2} + 2 \, {\left (a b^{4} c^{2} - 2 \, a^{2} b^{3} c d + a^{3} b^{2} d^{2}\right )} g^{3} x + {\left (a^{2} b^{3} c^{2} - 2 \, a^{3} b^{2} c d + a^{4} b d^{2}\right )} g^{3}\right )}} \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x, algorithm="f 
ricas")
 

Output:

-1/4*(2*A^2*b^2*c^2 - 4*A^2*a*b*c*d + 2*A^2*a^2*d^2 + (B^2*b^2*c^2 - 8*B^2 
*a*b*c*d + 7*B^2*a^2*d^2)*n^2 + 2*(B^2*b^2*c^2 - 2*B^2*a*b*c*d + B^2*a^2*d 
^2)*log(e)^2 - 2*(B^2*b^2*d^2*n^2*x^2 + 2*B^2*a*b*d^2*n^2*x - (B^2*b^2*c^2 
 - 2*B^2*a*b*c*d)*n^2)*log((b*x + a)/(d*x + c))^2 + 2*(A*B*b^2*c^2 - 4*A*B 
*a*b*c*d + 3*A*B*a^2*d^2)*n - 2*(3*(B^2*b^2*c*d - B^2*a*b*d^2)*n^2 + 2*(A* 
B*b^2*c*d - A*B*a*b*d^2)*n)*x + 2*(2*A*B*b^2*c^2 - 4*A*B*a*b*c*d + 2*A*B*a 
^2*d^2 - 2*(B^2*b^2*c*d - B^2*a*b*d^2)*n*x + (B^2*b^2*c^2 - 4*B^2*a*b*c*d 
+ 3*B^2*a^2*d^2)*n - 2*(B^2*b^2*d^2*n*x^2 + 2*B^2*a*b*d^2*n*x - (B^2*b^2*c 
^2 - 2*B^2*a*b*c*d)*n)*log((b*x + a)/(d*x + c)))*log(e) + 2*((B^2*b^2*c^2 
- 4*B^2*a*b*c*d)*n^2 - (3*B^2*b^2*d^2*n^2 + 2*A*B*b^2*d^2*n)*x^2 + 2*(A*B* 
b^2*c^2 - 2*A*B*a*b*c*d)*n - 2*(2*A*B*a*b*d^2*n + (B^2*b^2*c*d + 2*B^2*a*b 
*d^2)*n^2)*x)*log((b*x + a)/(d*x + c)))/((b^5*c^2 - 2*a*b^4*c*d + a^2*b^3* 
d^2)*g^3*x^2 + 2*(a*b^4*c^2 - 2*a^2*b^3*c*d + a^3*b^2*d^2)*g^3*x + (a^2*b^ 
3*c^2 - 2*a^3*b^2*c*d + a^4*b*d^2)*g^3)
 

Sympy [F]

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

integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))**2/(b*g*x+a*g)**3,x)
 

Output:

(Integral(A**2/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x) + Integ 
ral(B**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(a**3 + 3*a**2*b*x + 3 
*a*b**2*x**2 + b**3*x**3), x) + Integral(2*A*B*log(e*(a/(c + d*x) + b*x/(c 
 + d*x))**n)/(a**3 + 3*a**2*b*x + 3*a*b**2*x**2 + b**3*x**3), x))/g**3
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 861 vs. \(2 (282) = 564\).

Time = 0.08 (sec) , antiderivative size = 861, normalized size of antiderivative = 2.99 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx =\text {Too large to display} \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x, algorithm="m 
axima")
 

Output:

1/2*A*B*n*((2*b*d*x - b*c + 3*a*d)/((b^4*c - a*b^3*d)*g^3*x^2 + 2*(a*b^3*c 
 - a^2*b^2*d)*g^3*x + (a^2*b^2*c - a^3*b*d)*g^3) + 2*d^2*log(b*x + a)/((b^ 
3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^3) - 2*d^2*log(d*x + c)/((b^3*c^2 - 2*a 
*b^2*c*d + a^2*b*d^2)*g^3)) + 1/4*(2*n*((2*b*d*x - b*c + 3*a*d)/((b^4*c - 
a*b^3*d)*g^3*x^2 + 2*(a*b^3*c - a^2*b^2*d)*g^3*x + (a^2*b^2*c - a^3*b*d)*g 
^3) + 2*d^2*log(b*x + a)/((b^3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^3) - 2*d^2 
*log(d*x + c)/((b^3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^3))*log(e*(b*x/(d*x + 
 c) + a/(d*x + c))^n) - (b^2*c^2 - 8*a*b*c*d + 7*a^2*d^2 + 2*(b^2*d^2*x^2 
+ 2*a*b*d^2*x + a^2*d^2)*log(b*x + a)^2 + 2*(b^2*d^2*x^2 + 2*a*b*d^2*x + a 
^2*d^2)*log(d*x + c)^2 - 6*(b^2*c*d - a*b*d^2)*x - 6*(b^2*d^2*x^2 + 2*a*b* 
d^2*x + a^2*d^2)*log(b*x + a) + 2*(3*b^2*d^2*x^2 + 6*a*b*d^2*x + 3*a^2*d^2 
 - 2*(b^2*d^2*x^2 + 2*a*b*d^2*x + a^2*d^2)*log(b*x + a))*log(d*x + c))*n^2 
/(a^2*b^3*c^2*g^3 - 2*a^3*b^2*c*d*g^3 + a^4*b*d^2*g^3 + (b^5*c^2*g^3 - 2*a 
*b^4*c*d*g^3 + a^2*b^3*d^2*g^3)*x^2 + 2*(a*b^4*c^2*g^3 - 2*a^2*b^3*c*d*g^3 
 + a^3*b^2*d^2*g^3)*x))*B^2 - 1/2*B^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^ 
n)^2/(b^3*g^3*x^2 + 2*a*b^2*g^3*x + a^2*b*g^3) - A*B*log(e*(b*x/(d*x + c) 
+ a/(d*x + c))^n)/(b^3*g^3*x^2 + 2*a*b^2*g^3*x + a^2*b*g^3) - 1/2*A^2/(b^3 
*g^3*x^2 + 2*a*b^2*g^3*x + a^2*b*g^3)
 

Giac [A] (verification not implemented)

Time = 0.83 (sec) , antiderivative size = 478, normalized size of antiderivative = 1.66 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=-\frac {1}{4} \, {\left (\frac {2 \, {\left (B^{2} b n^{2} - \frac {2 \, {\left (b x + a\right )} B^{2} d n^{2}}{d x + c}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2}}{\frac {{\left (b x + a\right )}^{2} b c g^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{2} a d g^{3}}{{\left (d x + c\right )}^{2}}} + \frac {2 \, {\left (B^{2} b n^{2} - \frac {4 \, {\left (b x + a\right )} B^{2} d n^{2}}{d x + c} + 2 \, B^{2} b n \log \left (e\right ) - \frac {4 \, {\left (b x + a\right )} B^{2} d n \log \left (e\right )}{d x + c} + 2 \, A B b n - \frac {4 \, {\left (b x + a\right )} A B d n}{d x + c}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{\frac {{\left (b x + a\right )}^{2} b c g^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{2} a d g^{3}}{{\left (d x + c\right )}^{2}}} + \frac {B^{2} b n^{2} - \frac {8 \, {\left (b x + a\right )} B^{2} d n^{2}}{d x + c} + 2 \, B^{2} b n \log \left (e\right ) - \frac {8 \, {\left (b x + a\right )} B^{2} d n \log \left (e\right )}{d x + c} + 2 \, B^{2} b \log \left (e\right )^{2} - \frac {4 \, {\left (b x + a\right )} B^{2} d \log \left (e\right )^{2}}{d x + c} + 2 \, A B b n - \frac {8 \, {\left (b x + a\right )} A B d n}{d x + c} + 4 \, A B b \log \left (e\right ) - \frac {8 \, {\left (b x + a\right )} A B d \log \left (e\right )}{d x + c} + 2 \, A^{2} b - \frac {4 \, {\left (b x + a\right )} A^{2} d}{d x + c}}{\frac {{\left (b x + a\right )}^{2} b c g^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{2} a d g^{3}}{{\left (d x + c\right )}^{2}}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x, algorithm="g 
iac")
 

Output:

-1/4*(2*(B^2*b*n^2 - 2*(b*x + a)*B^2*d*n^2/(d*x + c))*log((b*x + a)/(d*x + 
 c))^2/((b*x + a)^2*b*c*g^3/(d*x + c)^2 - (b*x + a)^2*a*d*g^3/(d*x + c)^2) 
 + 2*(B^2*b*n^2 - 4*(b*x + a)*B^2*d*n^2/(d*x + c) + 2*B^2*b*n*log(e) - 4*( 
b*x + a)*B^2*d*n*log(e)/(d*x + c) + 2*A*B*b*n - 4*(b*x + a)*A*B*d*n/(d*x + 
 c))*log((b*x + a)/(d*x + c))/((b*x + a)^2*b*c*g^3/(d*x + c)^2 - (b*x + a) 
^2*a*d*g^3/(d*x + c)^2) + (B^2*b*n^2 - 8*(b*x + a)*B^2*d*n^2/(d*x + c) + 2 
*B^2*b*n*log(e) - 8*(b*x + a)*B^2*d*n*log(e)/(d*x + c) + 2*B^2*b*log(e)^2 
- 4*(b*x + a)*B^2*d*log(e)^2/(d*x + c) + 2*A*B*b*n - 8*(b*x + a)*A*B*d*n/( 
d*x + c) + 4*A*B*b*log(e) - 8*(b*x + a)*A*B*d*log(e)/(d*x + c) + 2*A^2*b - 
 4*(b*x + a)*A^2*d/(d*x + c))/((b*x + a)^2*b*c*g^3/(d*x + c)^2 - (b*x + a) 
^2*a*d*g^3/(d*x + c)^2))*(b*c/(b*c - a*d)^2 - a*d/(b*c - a*d)^2)
 

Mupad [B] (verification not implemented)

Time = 27.62 (sec) , antiderivative size = 506, normalized size of antiderivative = 1.76 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx=-{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2\,\left (\frac {B^2}{2\,b\,\left (a^2\,g^3+2\,a\,b\,g^3\,x+b^2\,g^3\,x^2\right )}-\frac {B^2\,d^2}{2\,b\,g^3\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )-\frac {\frac {2\,A^2\,a\,d-2\,A^2\,b\,c+7\,B^2\,a\,d\,n^2-B^2\,b\,c\,n^2+6\,A\,B\,a\,d\,n-2\,A\,B\,b\,c\,n}{2\,\left (a\,d-b\,c\right )}+\frac {d\,x\,\left (3\,b\,B^2\,n^2+2\,A\,b\,B\,n\right )}{a\,d-b\,c}}{2\,a^2\,b\,g^3+4\,a\,b^2\,g^3\,x+2\,b^3\,g^3\,x^2}-\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (\frac {A\,B}{a^2\,b\,g^3+2\,a\,b^2\,g^3\,x+b^3\,g^3\,x^2}+\frac {B^2\,d^2\,\left (\frac {b\,g^3\,n\,\left (a\,d-b\,c\right )\,\left (2\,a\,d-b\,c\right )}{2\,d^2}+\frac {b^2\,g^3\,n\,x\,\left (a\,d-b\,c\right )}{d}+\frac {a\,b\,g^3\,n\,\left (a\,d-b\,c\right )}{2\,d}\right )}{b\,g^3\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )\,\left (a^2\,b\,g^3+2\,a\,b^2\,g^3\,x+b^3\,g^3\,x^2\right )}\right )-\frac {B\,d^2\,n\,\mathrm {atan}\left (\frac {\left (2\,b\,d\,x-\frac {2\,b^3\,c^2\,g^3-2\,a^2\,b\,d^2\,g^3}{2\,b\,g^3\,\left (a\,d-b\,c\right )}\right )\,1{}\mathrm {i}}{a\,d-b\,c}\right )\,\left (2\,A+3\,B\,n\right )\,1{}\mathrm {i}}{b\,g^3\,{\left (a\,d-b\,c\right )}^2} \] Input:

int((A + B*log(e*((a + b*x)/(c + d*x))^n))^2/(a*g + b*g*x)^3,x)
 

Output:

- log(e*((a + b*x)/(c + d*x))^n)^2*(B^2/(2*b*(a^2*g^3 + b^2*g^3*x^2 + 2*a* 
b*g^3*x)) - (B^2*d^2)/(2*b*g^3*(a^2*d^2 + b^2*c^2 - 2*a*b*c*d))) - ((2*A^2 
*a*d - 2*A^2*b*c + 7*B^2*a*d*n^2 - B^2*b*c*n^2 + 6*A*B*a*d*n - 2*A*B*b*c*n 
)/(2*(a*d - b*c)) + (d*x*(3*B^2*b*n^2 + 2*A*B*b*n))/(a*d - b*c))/(2*a^2*b* 
g^3 + 2*b^3*g^3*x^2 + 4*a*b^2*g^3*x) - log(e*((a + b*x)/(c + d*x))^n)*((A* 
B)/(a^2*b*g^3 + b^3*g^3*x^2 + 2*a*b^2*g^3*x) + (B^2*d^2*((b*g^3*n*(a*d - b 
*c)*(2*a*d - b*c))/(2*d^2) + (b^2*g^3*n*x*(a*d - b*c))/d + (a*b*g^3*n*(a*d 
 - b*c))/(2*d)))/(b*g^3*(a^2*d^2 + b^2*c^2 - 2*a*b*c*d)*(a^2*b*g^3 + b^3*g 
^3*x^2 + 2*a*b^2*g^3*x))) - (B*d^2*n*atan(((2*b*d*x - (2*b^3*c^2*g^3 - 2*a 
^2*b*d^2*g^3)/(2*b*g^3*(a*d - b*c)))*1i)/(a*d - b*c))*(2*A + 3*B*n)*1i)/(b 
*g^3*(a*d - b*c)^2)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 973, normalized size of antiderivative = 3.38 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x)^3} \, dx =\text {Too large to display} \] Input:

int((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^3,x)
 

Output:

(4*log(a + b*x)*a**4*b*d**2*n + 4*log(a + b*x)*a**3*b**2*d**2*n**2 + 8*log 
(a + b*x)*a**3*b**2*d**2*n*x + 2*log(a + b*x)*a**2*b**3*c*d*n**2 + 8*log(a 
 + b*x)*a**2*b**3*d**2*n**2*x + 4*log(a + b*x)*a**2*b**3*d**2*n*x**2 + 4*l 
og(a + b*x)*a*b**4*c*d*n**2*x + 4*log(a + b*x)*a*b**4*d**2*n**2*x**2 + 2*l 
og(a + b*x)*b**5*c*d*n**2*x**2 - 4*log(c + d*x)*a**4*b*d**2*n - 4*log(c + 
d*x)*a**3*b**2*d**2*n**2 - 8*log(c + d*x)*a**3*b**2*d**2*n*x - 2*log(c + d 
*x)*a**2*b**3*c*d*n**2 - 8*log(c + d*x)*a**2*b**3*d**2*n**2*x - 4*log(c + 
d*x)*a**2*b**3*d**2*n*x**2 - 4*log(c + d*x)*a*b**4*c*d*n**2*x - 4*log(c + 
d*x)*a*b**4*d**2*n**2*x**2 - 2*log(c + d*x)*b**5*c*d*n**2*x**2 + 4*log(((a 
 + b*x)**n*e)/(c + d*x)**n)**2*a**2*b**3*c*d + 4*log(((a + b*x)**n*e)/(c + 
 d*x)**n)**2*a**2*b**3*d**2*x - 2*log(((a + b*x)**n*e)/(c + d*x)**n)**2*a* 
b**4*c**2 + 2*log(((a + b*x)**n*e)/(c + d*x)**n)**2*a*b**4*d**2*x**2 - 4*l 
og(((a + b*x)**n*e)/(c + d*x)**n)*a**4*b*d**2 + 8*log(((a + b*x)**n*e)/(c 
+ d*x)**n)*a**3*b**2*c*d - 4*log(((a + b*x)**n*e)/(c + d*x)**n)*a**3*b**2* 
d**2*n - 4*log(((a + b*x)**n*e)/(c + d*x)**n)*a**2*b**3*c**2 + 6*log(((a + 
 b*x)**n*e)/(c + d*x)**n)*a**2*b**3*c*d*n - 2*log(((a + b*x)**n*e)/(c + d* 
x)**n)*a*b**4*c**2*n + 2*log(((a + b*x)**n*e)/(c + d*x)**n)*a*b**4*d**2*n* 
x**2 - 2*log(((a + b*x)**n*e)/(c + d*x)**n)*b**5*c*d*n*x**2 - 2*a**5*d**2 
+ 4*a**4*b*c*d - 4*a**4*b*d**2*n - 2*a**3*b**2*c**2 + 6*a**3*b**2*c*d*n - 
4*a**3*b**2*d**2*n**2 - 2*a**2*b**3*c**2*n + 5*a**2*b**3*c*d*n**2 + 2*a...