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

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

Optimal result

Integrand size = 45, antiderivative size = 199 \[ \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)^2 (c i+d i x)} \, dx=-\frac {2 b B^2 n^2 (c+d x)}{(b c-a d)^2 g^2 i (a+b x)}-\frac {2 b B 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^2 i (a+b x)}-\frac {b (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^2 i (a+b x)}-\frac {d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^3}{3 B (b c-a d)^2 g^2 i n} \] Output:

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(793\) vs. \(2(199)=398\).

Time = 0.76 (sec) , antiderivative size = 793, normalized size of antiderivative = 3.98 \[ \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)^2 (c i+d i x)} \, dx=-\frac {B^2 d n^2 \log ^3\left (\frac {a+b x}{c+d x}\right )}{3 (b c-a d)^2 g^2 i}+\frac {2 B n \log \left (\frac {a+b x}{c+d x}\right ) \left (A+B n+B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )\right )}{(-b c+a d) g^2 i (a+b x)}+\frac {\log ^2\left (\frac {a+b x}{c+d x}\right ) \left (-a A B d n-b B^2 c n^2-A b B d n x-b B^2 d n^2 x-a B^2 d n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )-b B^2 d n x \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )\right )}{(-b c+a d)^2 g^2 i (a+b x)}+\frac {-A^2-2 A B n-2 B^2 n^2-2 A B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )-2 B^2 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )-B^2 \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )^2}{(b c-a d) g^2 i (a+b x)}-\frac {d \log (a+b x) \left (A^2+2 A B n+2 B^2 n^2+2 A B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+2 B^2 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+B^2 \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )^2\right )}{(b c-a d)^2 g^2 i}+\frac {d \left (A^2+2 A B n+2 B^2 n^2+2 A B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+2 B^2 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+B^2 \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )^2\right ) \log (c+d x)}{(b c-a d)^2 g^2 i} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.49 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.76, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2961, 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)^2 (c i+d i x)} \, dx\)

\(\Big \downarrow \) 2961

\(\displaystyle \frac {\int \frac {(c+d x)^2 \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)^2}d\frac {a+b x}{c+d x}}{g^2 i (b c-a d)^2}\)

\(\Big \downarrow \) 2795

\(\displaystyle \frac {\int \left (\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}{(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}{a+b x}\right )d\frac {a+b x}{c+d x}}{g^2 i (b c-a d)^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {d \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^3}{3 B n}-\frac {b (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 {2 b B 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 {2 b B^2 n^2 (c+d x)}{a+b x}}{g^2 i (b c-a d)^2}\)

Input:

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

Output:

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

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 2961
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q   Subst[Int[x^m*((A + B*L 
og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(508\) vs. \(2(197)=394\).

Time = 5.10 (sec) , antiderivative size = 509, normalized size of antiderivative = 2.56

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

Input:

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)^2/(d*i*x+c*i),x,method=_ 
RETURNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 428 vs. \(2 (197) = 394\).

Time = 0.09 (sec) , antiderivative size = 428, normalized size of antiderivative = 2.15 \[ \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)^2 (c i+d i x)} \, dx=-\frac {3 \, A^{2} b c - 3 \, A^{2} a d + {\left (B^{2} b d n^{2} x + B^{2} a d n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{3} + 6 \, {\left (B^{2} b c - B^{2} a d\right )} n^{2} + 3 \, {\left (B^{2} b c - B^{2} a d + {\left (B^{2} b d x + B^{2} a d\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right )^{2} + 3 \, {\left (B^{2} b c n^{2} + A B a d n + {\left (B^{2} b d n^{2} + A B b d n\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} + 6 \, {\left (A B b c - A B a d\right )} n + 3 \, {\left (2 \, A B b c - 2 \, A B a d + {\left (B^{2} b d n x + B^{2} a d n\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} + 2 \, {\left (B^{2} b c - B^{2} a d\right )} n + 2 \, {\left (B^{2} b c n + A B a d + {\left (B^{2} b d n + A B b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right ) + 3 \, {\left (2 \, B^{2} b c n^{2} + 2 \, A B b c n + A^{2} a d + {\left (2 \, B^{2} b d n^{2} + 2 \, A B b d n + A^{2} b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{3 \, {\left ({\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} g^{2} i x + {\left (a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2}\right )} g^{2} i\right )}} \] Input:

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

Output:

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

Sympy [F(-1)]

Timed out. \[ \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)^2 (c i+d i x)} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1018 vs. \(2 (197) = 394\).

Time = 0.10 (sec) , antiderivative size = 1018, normalized size of antiderivative = 5.12 \[ \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)^2 (c i+d i x)} \, 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)^2/(d*i*x+c*i),x, 
algorithm="maxima")
 

Output:

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

Giac [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)^2 (c i+d i x)} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (b g x + a g\right )}^{2} {\left (d i x + c i\right )}} \,d x } \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 27.16 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.81 \[ \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)^2 (c i+d i x)} \, dx={\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2\,\left (\frac {B^2}{\left (a\,d-b\,c\right )\,\left (a\,g^2\,i+b\,g^2\,i\,x\right )}-\frac {B\,d\,\left (A+B\,n\right )}{g^2\,i\,n\,{\left (a\,d-b\,c\right )}^2}\right )+\frac {A^2+2\,A\,B\,n+2\,B^2\,n^2}{\left (a\,d-b\,c\right )\,\left (a\,g^2\,i+b\,g^2\,i\,x\right )}+\frac {2\,B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (A+B\,n\right )}{\left (a\,d-b\,c\right )\,\left (a\,g^2\,i+b\,g^2\,i\,x\right )}-\frac {B^2\,d\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^3}{3\,g^2\,i\,n\,{\left (a\,d-b\,c\right )}^2}+\frac {d\,\mathrm {atan}\left (\frac {d\,\left (2\,b\,d\,x+\frac {a^2\,d^2\,g^2\,i-b^2\,c^2\,g^2\,i}{g^2\,i\,\left (a\,d-b\,c\right )}\right )\,\left (A^2+2\,A\,B\,n+2\,B^2\,n^2\right )\,1{}\mathrm {i}}{\left (a\,d-b\,c\right )\,\left (d\,A^2+2\,d\,A\,B\,n+2\,d\,B^2\,n^2\right )}\right )\,\left (A^2+2\,A\,B\,n+2\,B^2\,n^2\right )\,2{}\mathrm {i}}{g^2\,i\,{\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)^2*(c*i + d*i*x 
)),x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 612, normalized size of antiderivative = 3.08 \[ \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)^2 (c i+d i x)} \, 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)^2/(d*i*x+c*i),x)
 

Output:

(i*(3*log(a + b*x)*a**4*d*n + 3*log(a + b*x)*a**3*b*d*n*x + 6*log(a + b*x) 
*a**2*b**2*c*n**2 + 6*log(a + b*x)*a*b**3*c*n**3 + 6*log(a + b*x)*a*b**3*c 
*n**2*x + 6*log(a + b*x)*b**4*c*n**3*x - 3*log(c + d*x)*a**4*d*n - 3*log(c 
 + d*x)*a**3*b*d*n*x - 6*log(c + d*x)*a**2*b**2*c*n**2 - 6*log(c + d*x)*a* 
b**3*c*n**3 - 6*log(c + d*x)*a*b**3*c*n**2*x - 6*log(c + d*x)*b**4*c*n**3* 
x + log(((a + b*x)**n*e)/(c + d*x)**n)**3*a**2*b**2*d + log(((a + b*x)**n* 
e)/(c + d*x)**n)**3*a*b**3*d*x + 3*log(((a + b*x)**n*e)/(c + d*x)**n)**2*a 
**3*b*d + 3*log(((a + b*x)**n*e)/(c + d*x)**n)**2*a**2*b**2*d*x + 3*log((( 
a + b*x)**n*e)/(c + d*x)**n)**2*a*b**3*c*n + 3*log(((a + b*x)**n*e)/(c + d 
*x)**n)**2*a*b**3*d*n*x + 6*log(((a + b*x)**n*e)/(c + d*x)**n)*a**2*b**2*d 
*n*x - 6*log(((a + b*x)**n*e)/(c + d*x)**n)*a*b**3*c*n*x + 6*log(((a + b*x 
)**n*e)/(c + d*x)**n)*a*b**3*d*n**2*x - 6*log(((a + b*x)**n*e)/(c + d*x)** 
n)*b**4*c*n**2*x + 3*a**3*b*d*n*x - 3*a**2*b**2*c*n*x + 6*a**2*b**2*d*n**2 
*x - 6*a*b**3*c*n**2*x + 6*a*b**3*d*n**3*x - 6*b**4*c*n**3*x))/(3*a*g**2*n 
*(a**3*d**2 - 2*a**2*b*c*d + a**2*b*d**2*x + a*b**2*c**2 - 2*a*b**2*c*d*x 
+ b**3*c**2*x))