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

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

Optimal result

Integrand size = 30, antiderivative size = 203 \[ \int (c i+d i x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=-\frac {B (b c-a d) i (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{b^2}+\frac {i (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{2 d}+\frac {B^2 (b c-a d)^2 i \log (c+d x)}{b^2 d}+\frac {B (b c-a d)^2 i \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{b^2 d}-\frac {B^2 (b c-a d)^2 i \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b^2 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.01 \[ \int (c i+d i x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\frac {i \left ((c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2-\frac {B (b c-a d) \left ((-b B c+a B d) \log ^2(a+b x)+2 \left (A b d x+B d (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )+(-b B c+a B d) \log (c+d x)\right )+2 (b c-a d) \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )+B \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )+2 B (b c-a d) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )}{b^2}\right )}{2 d} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.12, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {2952, 2756, 2789, 2751, 16, 2779, 2838}

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

\(\Big \downarrow \) 2952

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

\(\Big \downarrow \) 2756

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

\(\Big \downarrow \) 2789

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

\(\Big \downarrow \) 2751

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

\(\Big \downarrow \) 16

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

\(\Big \downarrow \) 2779

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

\(\Big \downarrow \) 2838

\(\displaystyle i (b c-a d)^2 \left (\frac {\left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{2 d \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {B \left (\frac {\frac {B \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{b}}{b}+\frac {d \left (\frac {(a+b x) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{b (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {B \log \left (b-\frac {d (a+b x)}{c+d x}\right )}{b d}\right )}{b}\right )}{d}\right )\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 16
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + 
b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
 

rule 2751
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x 
_Symbol] :> Simp[x*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/d), x] - Simp[b* 
(n/d)   Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q, r}, 
x] && EqQ[r*(q + 1) + 1, 0]
 

rule 2756
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), 
x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/(e*(q + 1))), x] 
- Simp[b*n*(p/(e*(q + 1)))   Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^(p - 
 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, 
 -1] && (EqQ[p, 1] || (IntegersQ[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] & 
& NeQ[q, 1]))
 

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 2789
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/ 
(x_), x_Symbol] :> Simp[1/d   Int[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/x 
), x], x] - Simp[e/d   Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; Free 
Q[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2952
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ 
)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^( 
m + 1)*(g/d)^m   Subst[Int[(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] && EqQ[ 
n + mn, 0] && IGtQ[n, 0] && NeQ[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[d*f 
 - c*g, 0] && (GtQ[p, 0] || LtQ[m, -1])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

integrate((d*i*x+c*i)*(A+B*log(e*(b*x+a)/(d*x+c)))^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((b*e*x + a*e)/(d* 
x + c))^2 + 2*(A*B*d*i*x + A*B*c*i)*log((b*e*x + a*e)/(d*x + c)), x)
 

Sympy [F(-1)]

Timed out. \[ \int (c i+d i x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 633 vs. \(2 (200) = 400\).

Time = 0.12 (sec) , antiderivative size = 633, normalized size of antiderivative = 3.12 \[ \int (c i+d i x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\frac {1}{2} \, A^{2} d i x^{2} + 2 \, {\left (x \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} A B c i + {\left (x^{2} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) - \frac {a^{2} \log \left (b x + a\right )}{b^{2}} + \frac {c^{2} \log \left (d x + c\right )}{d^{2}} - \frac {{\left (b c - a d\right )} x}{b d}\right )} A B d i + A^{2} c i x - \frac {{\left ({\left (i \log \left (e\right ) - i\right )} b c^{2} + a c d i\right )} B^{2} \log \left (d x + c\right )}{b d} - \frac {{\left (b^{2} c^{2} i - 2 \, a b c d i + a^{2} d^{2} i\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B^{2}}{b^{2} d} + \frac {B^{2} b^{2} d^{2} i x^{2} \log \left (e\right )^{2} + 2 \, {\left (a b d^{2} i \log \left (e\right ) + {\left (i \log \left (e\right )^{2} - i \log \left (e\right )\right )} b^{2} c d\right )} B^{2} x + {\left (B^{2} b^{2} d^{2} i x^{2} + 2 \, B^{2} b^{2} c d i x + {\left (2 \, a b c d i - a^{2} d^{2} i\right )} B^{2}\right )} \log \left (b x + a\right )^{2} + {\left (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\right )} \log \left (d x + c\right )^{2} + 2 \, {\left (B^{2} b^{2} d^{2} i x^{2} \log \left (e\right ) + {\left ({\left (2 \, i \log \left (e\right ) - i\right )} b^{2} c d + a b d^{2} i\right )} B^{2} x + {\left ({\left (2 \, i \log \left (e\right ) - i\right )} a b c d - {\left (i \log \left (e\right ) - i\right )} a^{2} d^{2}\right )} B^{2}\right )} \log \left (b x + a\right ) - 2 \, {\left (B^{2} b^{2} d^{2} i x^{2} \log \left (e\right ) + {\left ({\left (2 \, i \log \left (e\right ) - i\right )} b^{2} c d + a b d^{2} i\right )} B^{2} x + {\left (B^{2} b^{2} d^{2} i x^{2} + 2 \, B^{2} b^{2} c d i x + {\left (2 \, a b c d i - a^{2} d^{2} i\right )} B^{2}\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )}{2 \, b^{2} d} \] Input:

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

Output:

1/2*A^2*d*i*x^2 + 2*(x*log(b*e*x/(d*x + c) + a*e/(d*x + c)) + a*log(b*x + 
a)/b - c*log(d*x + c)/d)*A*B*c*i + (x^2*log(b*e*x/(d*x + c) + a*e/(d*x + c 
)) - a^2*log(b*x + a)/b^2 + c^2*log(d*x + c)/d^2 - (b*c - a*d)*x/(b*d))*A* 
B*d*i + A^2*c*i*x - ((i*log(e) - i)*b*c^2 + a*c*d*i)*B^2*log(d*x + c)/(b*d 
) - (b^2*c^2*i - 2*a*b*c*d*i + a^2*d^2*i)*(log(b*x + a)*log((b*d*x + a*d)/ 
(b*c - a*d) + 1) + dilog(-(b*d*x + a*d)/(b*c - a*d)))*B^2/(b^2*d) + 1/2*(B 
^2*b^2*d^2*i*x^2*log(e)^2 + 2*(a*b*d^2*i*log(e) + (i*log(e)^2 - i*log(e))* 
b^2*c*d)*B^2*x + (B^2*b^2*d^2*i*x^2 + 2*B^2*b^2*c*d*i*x + (2*a*b*c*d*i - a 
^2*d^2*i)*B^2)*log(b*x + a)^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(d*x + c)^2 + 2*(B^2*b^2*d^2*i*x^2*log(e) + ((2*i*log(e) 
- i)*b^2*c*d + a*b*d^2*i)*B^2*x + ((2*i*log(e) - i)*a*b*c*d - (i*log(e) - 
i)*a^2*d^2)*B^2)*log(b*x + a) - 2*(B^2*b^2*d^2*i*x^2*log(e) + ((2*i*log(e) 
 - i)*b^2*c*d + a*b*d^2*i)*B^2*x + (B^2*b^2*d^2*i*x^2 + 2*B^2*b^2*c*d*i*x 
+ (2*a*b*c*d*i - a^2*d^2*i)*B^2)*log(b*x + a))*log(d*x + c))/(b^2*d)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int (c i+d i x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\int \left (c\,i+d\,i\,x\right )\,{\left (A+B\,\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\right )}^2 \,d x \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

(i*( - 2*int((log((a*e + b*e*x)/(c + d*x))*x)/(a*c + a*d*x + b*c*x + b*d*x 
**2),x)*a**2*b**2*d**3 + 4*int((log((a*e + b*e*x)/(c + d*x))*x)/(a*c + a*d 
*x + b*c*x + b*d*x**2),x)*a*b**3*c*d**2 - 2*int((log((a*e + b*e*x)/(c + d* 
x))*x)/(a*c + a*d*x + b*c*x + b*d*x**2),x)*b**4*c**2*d - 2*log(c + d*x)*a* 
*3*d**2 + 4*log(c + d*x)*a**2*b*c*d + 2*log(c + d*x)*a**2*b*d**2 - 2*log(c 
 + d*x)*a*b**2*c**2 - 4*log(c + d*x)*a*b**2*c*d + 2*log(c + d*x)*b**3*c**2 
 + log((a*e + b*e*x)/(c + d*x))**2*a*b**2*c*d + 2*log((a*e + b*e*x)/(c + d 
*x))**2*b**3*c*d*x + log((a*e + b*e*x)/(c + d*x))**2*b**3*d**2*x**2 - 2*lo 
g((a*e + b*e*x)/(c + d*x))*a**3*d**2 + 4*log((a*e + b*e*x)/(c + d*x))*a**2 
*b*c*d + 2*log((a*e + b*e*x)/(c + d*x))*a**2*b*d**2 + 4*log((a*e + b*e*x)/ 
(c + d*x))*a*b**2*c*d*x - 2*log((a*e + b*e*x)/(c + d*x))*a*b**2*c*d + 2*lo 
g((a*e + b*e*x)/(c + d*x))*a*b**2*d**2*x**2 + 2*log((a*e + b*e*x)/(c + d*x 
))*a*b**2*d**2*x - 2*log((a*e + b*e*x)/(c + d*x))*b**3*c*d*x + 2*a**2*b*c* 
d*x + a**2*b*d**2*x**2 + 2*a**2*b*d**2*x - 2*a*b**2*c*d*x))/(2*b*d)