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

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

Optimal result

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

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1564\) vs. \(2(261)=522\).

Time = 2.00 (sec) , antiderivative size = 1564, normalized size of antiderivative = 5.99 \[ \int \frac {(c i+d i x) \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} \, dx =\text {Too large to display} \] Input:

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

Output:

(i*((-3*(b*c - a*d)*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b 
*x)/(c + d*x)])^2)/(a + b*x) + 3*d*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c 
 + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])^2 + (6*b*B*c*n*(-A - B*Log[e*( 
(a + b*x)/(c + d*x))^n] + B*n*Log[(a + b*x)/(c + d*x)])*(-(d*(a + b*x)*Log 
[c/d + x]) + d*(a + b*x)*Log[(d*(a + b*x))/(-(b*c) + a*d)] + (b*c - a*d)*( 
1 + Log[(a + b*x)/(c + d*x)])))/((b*c - a*d)*(a + b*x)) + (3*b*B^2*c*n^2*( 
-2*b*c + 2*a*d - 2*d*(a + b*x)*Log[a + b*x] - 2*(b*c - a*d)*Log[(a + b*x)/ 
(c + d*x)] - 2*d*(a + b*x)*Log[a + b*x]*Log[(a + b*x)/(c + d*x)] - (b*c - 
a*d)*Log[(a + b*x)/(c + d*x)]^2 + 2*d*(a + b*x)*Log[c + d*x] - 2*d*(a + b* 
x)*Log[(a + b*x)/(c + d*x)]*Log[(b*c - a*d)/(b*c + b*d*x)] + d*(a + b*x)*( 
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)]) + d*(a + b*x)*(Log[(b*c - a*d)/(b*c + b 
*d*x)]*(2*Log[(d*(a + b*x))/(-(b*c) + a*d)] + Log[(b*c - a*d)/(b*c + b*d*x 
)]) - 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)])))/((b*c - a*d)*(a + b*x)) + 
 3*B*d*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d* 
x)])*(Log[a/b + x]^2 - 2*Log[a/b + x]*Log[a + b*x] - 2*Log[c/d + x]*Log[(d 
*(a + b*x))/(-(b*c) + a*d)] + 2*Log[a + b*x]*((a*d)/(b*c - a*d) + Log[c/d 
+ x] + Log[(a + b*x)/(c + d*x)]) + 2*a*((a + b*x)^(-1) + Log[(a + b*x)/(c 
+ d*x)]/(a + b*x) + (d*Log[c + d*x])/(-(b*c) + a*d)) - 2*PolyLog[2, (b*(c 
+ d*x))/(b*c - a*d)]) + (B^2*d*n^2*((b*c - a*d)*(a + b*x)*Log[a/b + x]^...
 

Rubi [A] (verified)

Time = 0.95 (sec) , antiderivative size = 234, normalized size of antiderivative = 0.90, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {2961, 2780, 2742, 2741, 2779, 2821, 7143}

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 {(c i+d i x) \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} \, dx\)

\(\Big \downarrow \) 2961

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

\(\Big \downarrow \) 2780

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

\(\Big \downarrow \) 2742

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

\(\Big \downarrow \) 2741

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

\(\Big \downarrow \) 2779

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

\(\Big \downarrow \) 2821

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

\(\Big \downarrow \) 7143

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 2741
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> 
Simp[(d*x)^(m + 1)*((a + b*Log[c*x^n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^( 
m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]
 

rule 2742
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbo 
l] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^n])^p/(d*(m + 1))), x] - Simp[b*n* 
(p/(m + 1))   Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b 
, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]
 

rule 2779
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r 
_.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) 
, x] + Simp[b*n*(p/(d*r))   Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 
 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
 

rule 2780
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.))/((d_) + (e_.)* 
(x_)^(r_.)), x_Symbol] :> Simp[1/d   Int[x^m*(a + b*Log[c*x^n])^p, x], x] - 
 Simp[e/d   Int[(x^(m + r)*(a + b*Log[c*x^n])^p)/(d + e*x^r), x], x] /; Fre 
eQ[{a, b, c, d, e, m, n, r}, x] && IGtQ[p, 0] && IGtQ[r, 0] && ILtQ[m, -1]
 

rule 2821
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b 
_.))^(p_.))/(x_), x_Symbol] :> Simp[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c 
*x^n])^p/m), x] + Simp[b*n*(p/m)   Int[PolyLog[2, (-d)*f*x^m]*((a + b*Log[c 
*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 
0] && EqQ[d*e, 1]
 

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]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 
Maple [F]

\[\int \frac {\left (d i x +c i \right ) {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}{\left (b g x +a g \right )^{2}}d x\]

Input:

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

Output:

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

Fricas [F]

\[ \int \frac {(c i+d i x) \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} \, dx=\int { \frac {{\left (d i x + c i\right )} {\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}} \,d x } \] Input:

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

\[ \int \frac {(c i+d i x) \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} \, dx=\int { \frac {{\left (d i x + c i\right )} {\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}} \,d x } \] Input:

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

Output:

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

Giac [F]

\[ \int \frac {(c i+d i x) \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} \, dx=\int { \frac {{\left (d i x + c i\right )} {\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}} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {(c i+d i x) \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} \, dx =\text {Too large to display} \] Input:

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

Output:

(i*(int((log(((a + b*x)**n*e)/(c + d*x)**n)**2*x)/(a**2 + 2*a*b*x + b**2*x 
**2),x)*a**3*b**4*d**2 - int((log(((a + b*x)**n*e)/(c + d*x)**n)**2*x)/(a* 
*2 + 2*a*b*x + b**2*x**2),x)*a**2*b**5*c*d + int((log(((a + b*x)**n*e)/(c 
+ d*x)**n)**2*x)/(a**2 + 2*a*b*x + b**2*x**2),x)*a**2*b**5*d**2*x - int((l 
og(((a + b*x)**n*e)/(c + d*x)**n)**2*x)/(a**2 + 2*a*b*x + b**2*x**2),x)*a* 
b**6*c*d*x + 2*int((log(((a + b*x)**n*e)/(c + d*x)**n)*x)/(a**2 + 2*a*b*x 
+ b**2*x**2),x)*a**4*b**3*d**2 - 2*int((log(((a + b*x)**n*e)/(c + d*x)**n) 
*x)/(a**2 + 2*a*b*x + b**2*x**2),x)*a**3*b**4*c*d + 2*int((log(((a + b*x)* 
*n*e)/(c + d*x)**n)*x)/(a**2 + 2*a*b*x + b**2*x**2),x)*a**3*b**4*d**2*x - 
2*int((log(((a + b*x)**n*e)/(c + d*x)**n)*x)/(a**2 + 2*a*b*x + b**2*x**2), 
x)*a**2*b**5*c*d*x + log(a + b*x)*a**5*d**2 - log(a + b*x)*a**4*b*c*d + lo 
g(a + b*x)*a**4*b*d**2*x - log(a + b*x)*a**3*b**2*c*d*x + 2*log(a + b*x)*a 
**2*b**3*c**2*n + 2*log(a + b*x)*a*b**4*c**2*n**2 + 2*log(a + b*x)*a*b**4* 
c**2*n*x + 2*log(a + b*x)*b**5*c**2*n**2*x - 2*log(c + d*x)*a**2*b**3*c**2 
*n - 2*log(c + d*x)*a*b**4*c**2*n**2 - 2*log(c + d*x)*a*b**4*c**2*n*x - 2* 
log(c + d*x)*b**5*c**2*n**2*x + log(((a + b*x)**n*e)/(c + d*x)**n)**2*a*b* 
*4*c**2 + log(((a + b*x)**n*e)/(c + d*x)**n)**2*a*b**4*c*d*x + 2*log(((a + 
 b*x)**n*e)/(c + d*x)**n)*a**2*b**3*c*d*x - 2*log(((a + b*x)**n*e)/(c + d* 
x)**n)*a*b**4*c**2*x + 2*log(((a + b*x)**n*e)/(c + d*x)**n)*a*b**4*c*d*n*x 
 - 2*log(((a + b*x)**n*e)/(c + d*x)**n)*b**5*c**2*n*x - a**4*b*d**2*x +...