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

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

Optimal result

Integrand size = 30, antiderivative size = 149 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=-\frac {B (b c-a d)^3 i^3 x}{4 b^3}-\frac {B (b c-a d)^2 i^3 (c+d x)^2}{8 b^2 d}-\frac {B (b c-a d) i^3 (c+d x)^3}{12 b d}-\frac {B (b c-a d)^4 i^3 \log (a+b x)}{4 b^4 d}+\frac {i^3 (c+d x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{4 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.81 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {i^3 \left (-\frac {B (b c-a d) \left (6 b d (b c-a d)^2 x+3 b^2 (b c-a d) (c+d x)^2+2 b^3 (c+d x)^3+6 (b c-a d)^3 \log (a+b x)\right )}{6 b^4}+(c+d x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )\right )}{4 d} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.87, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2948, 27, 49, 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 (c i+d i x)^3 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right ) \, dx\)

\(\Big \downarrow \) 2948

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 49

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 49
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] 
&& IGtQ[m, 0] && IGtQ[m + n + 2, 0]
 

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

rule 2948
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ 
)]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*( 
(A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Simp[B*n*((b*c 
- a*d)/(g*(m + 1)))   Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] / 
; FreeQ[{a, b, c, d, e, f, g, A, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c 
- a*d, 0] && NeQ[m, -1] &&  !(EqQ[m, -2] && IntegerQ[n])
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(313\) vs. \(2(139)=278\).

Time = 1.24 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.11

method result size
risch \(\frac {i^{3} \left (d x +c \right )^{4} B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{4 d}+\frac {i^{3} d^{3} A \,x^{4}}{4}+i^{3} d^{2} A c \,x^{3}+\frac {i^{3} d^{3} B a \,x^{3}}{12 b}-\frac {i^{3} d^{2} B c \,x^{3}}{12}+\frac {3 i^{3} d A \,c^{2} x^{2}}{2}-\frac {i^{3} d^{3} B \,a^{2} x^{2}}{8 b^{2}}+\frac {i^{3} d^{2} B a c \,x^{2}}{2 b}-\frac {3 i^{3} d B \,c^{2} x^{2}}{8}+i^{3} A \,c^{3} x -\frac {i^{3} d^{3} B \ln \left (b x +a \right ) a^{4}}{4 b^{4}}+\frac {i^{3} d^{2} B \ln \left (b x +a \right ) a^{3} c}{b^{3}}-\frac {3 i^{3} d B \ln \left (b x +a \right ) a^{2} c^{2}}{2 b^{2}}+\frac {i^{3} B \ln \left (b x +a \right ) a \,c^{3}}{b}-\frac {i^{3} B \ln \left (b x +a \right ) c^{4}}{4 d}+\frac {i^{3} d^{3} B \,a^{3} x}{4 b^{3}}-\frac {i^{3} d^{2} B \,a^{2} c x}{b^{2}}+\frac {3 i^{3} d B a \,c^{2} x}{2 b}-\frac {3 i^{3} B \,c^{3} x}{4}\) \(314\)
parts \(\frac {A \,i^{3} \left (d x +c \right )^{4}}{4 d}-B \,i^{3} \left (d a -b c \right )^{4} e^{4} \left (-\frac {1}{4 b^{3} e^{3} d \left (\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d -b e \right )}+\frac {1}{8 b^{2} e^{2} d \left (\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d -b e \right )^{2}}-\frac {1}{12 b e d \left (\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d -b e \right )^{3}}-\frac {\ln \left (\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d -b e \right )}{4 b^{4} e^{4} d}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) \left (d^{3} \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{3}-4 d^{2} \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} b e +6 \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \,b^{2} e^{2}-4 b^{3} e^{3}\right )}{4 b^{4} e^{4} \left (\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d -b e \right )^{4}}\right )\) \(438\)
derivativedivides \(-\frac {e \left (d a -b c \right ) \left (-\frac {A d \,e^{3} i^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right )}{4 \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{4}}-B \,d^{2} e^{3} i^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) \left (-\frac {1}{12 b e d \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{3}}-\frac {1}{8 b^{2} e^{2} d \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{2}}-\frac {1}{4 b^{3} e^{3} d \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )}+\frac {\ln \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )}{4 b^{4} e^{4} d}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) \left (4 b^{3} e^{3}-6 \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \,b^{2} e^{2}+4 d^{2} \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} b e -d^{3} \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{3}\right )}{4 b^{4} e^{4} \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{4}}\right )\right )}{d^{2}}\) \(548\)
default \(-\frac {e \left (d a -b c \right ) \left (-\frac {A d \,e^{3} i^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right )}{4 \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{4}}-B \,d^{2} e^{3} i^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) \left (-\frac {1}{12 b e d \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{3}}-\frac {1}{8 b^{2} e^{2} d \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{2}}-\frac {1}{4 b^{3} e^{3} d \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )}+\frac {\ln \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )}{4 b^{4} e^{4} d}+\frac {\ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) \left (4 b^{3} e^{3}-6 \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \,b^{2} e^{2}+4 d^{2} \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} b e -d^{3} \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{3}\right )}{4 b^{4} e^{4} \left (b e -\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right ) d \right )^{4}}\right )\right )}{d^{2}}\) \(548\)
parallelrisch \(\frac {-6 B \,a^{4} d^{4} i^{3}+18 B \,b^{4} c^{4} i^{3}+21 B \,a^{3} b c \,d^{3} i^{3}-24 B \,a^{2} b^{2} c^{2} d^{2} i^{3}-9 B a \,b^{3} c^{3} d \,i^{3}+24 B \ln \left (b x +a \right ) a^{3} b c \,d^{3} i^{3}-36 B \ln \left (b x +a \right ) a^{2} b^{2} c^{2} d^{2} i^{3}+24 B \,x^{3} \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) b^{4} c \,d^{3} i^{3}+6 A \,x^{4} b^{4} d^{4} i^{3}+6 B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) b^{4} c^{4} i^{3}-6 B \ln \left (b x +a \right ) a^{4} d^{4} i^{3}-6 B \ln \left (b x +a \right ) b^{4} c^{4} i^{3}-24 A \,b^{4} c^{4} i^{3}+24 B \ln \left (b x +a \right ) a \,b^{3} c^{3} d \,i^{3}+36 B \,x^{2} \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) b^{4} c^{2} d^{2} i^{3}+12 B \,x^{2} a \,b^{3} c \,d^{3} i^{3}+24 B x \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) b^{4} c^{3} d \,i^{3}-24 B x \,a^{2} b^{2} c \,d^{3} i^{3}+36 B x a \,b^{3} c^{2} d^{2} i^{3}+6 B \,x^{4} \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) b^{4} d^{4} i^{3}+24 A \,x^{3} b^{4} c \,d^{3} i^{3}+2 B \,x^{3} a \,b^{3} d^{4} i^{3}-2 B \,x^{3} b^{4} c \,d^{3} i^{3}+36 A \,x^{2} b^{4} c^{2} d^{2} i^{3}-60 A a \,b^{3} c^{3} d \,i^{3}-3 B \,x^{2} a^{2} b^{2} d^{4} i^{3}-9 B \,x^{2} b^{4} c^{2} d^{2} i^{3}+24 A x \,b^{4} c^{3} d \,i^{3}+6 B x \,a^{3} b \,d^{4} i^{3}-18 B x \,b^{4} c^{3} d \,i^{3}}{24 b^{4} d}\) \(566\)

Input:

int((d*i*x+c*i)^3*(A+B*ln(e*(b*x+a)/(d*x+c))),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (139) = 278\).

Time = 0.10 (sec) , antiderivative size = 322, normalized size of antiderivative = 2.16 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {6 \, A b^{4} d^{4} i^{3} x^{4} - 6 \, B b^{4} c^{4} i^{3} \log \left (d x + c\right ) + 2 \, {\left ({\left (12 \, A - B\right )} b^{4} c d^{3} + B a b^{3} d^{4}\right )} i^{3} x^{3} + 3 \, {\left (3 \, {\left (4 \, A - B\right )} b^{4} c^{2} d^{2} + 4 \, B a b^{3} c d^{3} - B a^{2} b^{2} d^{4}\right )} i^{3} x^{2} + 6 \, {\left ({\left (4 \, A - 3 \, B\right )} b^{4} c^{3} d + 6 \, B a b^{3} c^{2} d^{2} - 4 \, B a^{2} b^{2} c d^{3} + B a^{3} b d^{4}\right )} i^{3} x + 6 \, {\left (4 \, B a b^{3} c^{3} d - 6 \, B a^{2} b^{2} c^{2} d^{2} + 4 \, B a^{3} b c d^{3} - B a^{4} d^{4}\right )} i^{3} \log \left (b x + a\right ) + 6 \, {\left (B b^{4} d^{4} i^{3} x^{4} + 4 \, B b^{4} c d^{3} i^{3} x^{3} + 6 \, B b^{4} c^{2} d^{2} i^{3} x^{2} + 4 \, B b^{4} c^{3} d i^{3} x\right )} \log \left (\frac {b e x + a e}{d x + c}\right )}{24 \, b^{4} d} \] Input:

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

Output:

1/24*(6*A*b^4*d^4*i^3*x^4 - 6*B*b^4*c^4*i^3*log(d*x + c) + 2*((12*A - B)*b 
^4*c*d^3 + B*a*b^3*d^4)*i^3*x^3 + 3*(3*(4*A - B)*b^4*c^2*d^2 + 4*B*a*b^3*c 
*d^3 - B*a^2*b^2*d^4)*i^3*x^2 + 6*((4*A - 3*B)*b^4*c^3*d + 6*B*a*b^3*c^2*d 
^2 - 4*B*a^2*b^2*c*d^3 + B*a^3*b*d^4)*i^3*x + 6*(4*B*a*b^3*c^3*d - 6*B*a^2 
*b^2*c^2*d^2 + 4*B*a^3*b*c*d^3 - B*a^4*d^4)*i^3*log(b*x + a) + 6*(B*b^4*d^ 
4*i^3*x^4 + 4*B*b^4*c*d^3*i^3*x^3 + 6*B*b^4*c^2*d^2*i^3*x^2 + 4*B*b^4*c^3* 
d*i^3*x)*log((b*e*x + a*e)/(d*x + c)))/(b^4*d)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 706 vs. \(2 (128) = 256\).

Time = 1.98 (sec) , antiderivative size = 706, normalized size of antiderivative = 4.74 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {A d^{3} i^{3} x^{4}}{4} - \frac {B a i^{3} \left (a d - 2 b c\right ) \left (a^{2} d^{2} - 2 a b c d + 2 b^{2} c^{2}\right ) \log {\left (x + \frac {B a^{4} c d^{3} i^{3} - 4 B a^{3} b c^{2} d^{2} i^{3} + 6 B a^{2} b^{2} c^{3} d i^{3} + \frac {B a^{2} d i^{3} \left (a d - 2 b c\right ) \left (a^{2} d^{2} - 2 a b c d + 2 b^{2} c^{2}\right )}{b} - 5 B a b^{3} c^{4} i^{3} - B a c i^{3} \left (a d - 2 b c\right ) \left (a^{2} d^{2} - 2 a b c d + 2 b^{2} c^{2}\right )}{B a^{4} d^{4} i^{3} - 4 B a^{3} b c d^{3} i^{3} + 6 B a^{2} b^{2} c^{2} d^{2} i^{3} - 4 B a b^{3} c^{3} d i^{3} - B b^{4} c^{4} i^{3}} \right )}}{4 b^{4}} - \frac {B c^{4} i^{3} \log {\left (x + \frac {B a^{4} c d^{3} i^{3} - 4 B a^{3} b c^{2} d^{2} i^{3} + 6 B a^{2} b^{2} c^{3} d i^{3} - 4 B a b^{3} c^{4} i^{3} - \frac {B b^{4} c^{5} i^{3}}{d}}{B a^{4} d^{4} i^{3} - 4 B a^{3} b c d^{3} i^{3} + 6 B a^{2} b^{2} c^{2} d^{2} i^{3} - 4 B a b^{3} c^{3} d i^{3} - B b^{4} c^{4} i^{3}} \right )}}{4 d} + x^{3} \left (A c d^{2} i^{3} + \frac {B a d^{3} i^{3}}{12 b} - \frac {B c d^{2} i^{3}}{12}\right ) + x^{2} \cdot \left (\frac {3 A c^{2} d i^{3}}{2} - \frac {B a^{2} d^{3} i^{3}}{8 b^{2}} + \frac {B a c d^{2} i^{3}}{2 b} - \frac {3 B c^{2} d i^{3}}{8}\right ) + x \left (A c^{3} i^{3} + \frac {B a^{3} d^{3} i^{3}}{4 b^{3}} - \frac {B a^{2} c d^{2} i^{3}}{b^{2}} + \frac {3 B a c^{2} d i^{3}}{2 b} - \frac {3 B c^{3} i^{3}}{4}\right ) + \left (B c^{3} i^{3} x + \frac {3 B c^{2} d i^{3} x^{2}}{2} + B c d^{2} i^{3} x^{3} + \frac {B d^{3} i^{3} x^{4}}{4}\right ) \log {\left (\frac {e \left (a + b x\right )}{c + d x} \right )} \] Input:

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

Output:

A*d**3*i**3*x**4/4 - B*a*i**3*(a*d - 2*b*c)*(a**2*d**2 - 2*a*b*c*d + 2*b** 
2*c**2)*log(x + (B*a**4*c*d**3*i**3 - 4*B*a**3*b*c**2*d**2*i**3 + 6*B*a**2 
*b**2*c**3*d*i**3 + B*a**2*d*i**3*(a*d - 2*b*c)*(a**2*d**2 - 2*a*b*c*d + 2 
*b**2*c**2)/b - 5*B*a*b**3*c**4*i**3 - B*a*c*i**3*(a*d - 2*b*c)*(a**2*d**2 
 - 2*a*b*c*d + 2*b**2*c**2))/(B*a**4*d**4*i**3 - 4*B*a**3*b*c*d**3*i**3 + 
6*B*a**2*b**2*c**2*d**2*i**3 - 4*B*a*b**3*c**3*d*i**3 - B*b**4*c**4*i**3)) 
/(4*b**4) - B*c**4*i**3*log(x + (B*a**4*c*d**3*i**3 - 4*B*a**3*b*c**2*d**2 
*i**3 + 6*B*a**2*b**2*c**3*d*i**3 - 4*B*a*b**3*c**4*i**3 - B*b**4*c**5*i** 
3/d)/(B*a**4*d**4*i**3 - 4*B*a**3*b*c*d**3*i**3 + 6*B*a**2*b**2*c**2*d**2* 
i**3 - 4*B*a*b**3*c**3*d*i**3 - B*b**4*c**4*i**3))/(4*d) + x**3*(A*c*d**2* 
i**3 + B*a*d**3*i**3/(12*b) - B*c*d**2*i**3/12) + x**2*(3*A*c**2*d*i**3/2 
- B*a**2*d**3*i**3/(8*b**2) + B*a*c*d**2*i**3/(2*b) - 3*B*c**2*d*i**3/8) + 
 x*(A*c**3*i**3 + B*a**3*d**3*i**3/(4*b**3) - B*a**2*c*d**2*i**3/b**2 + 3* 
B*a*c**2*d*i**3/(2*b) - 3*B*c**3*i**3/4) + (B*c**3*i**3*x + 3*B*c**2*d*i** 
3*x**2/2 + B*c*d**2*i**3*x**3 + B*d**3*i**3*x**4/4)*log(e*(a + b*x)/(c + d 
*x))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 439 vs. \(2 (139) = 278\).

Time = 0.04 (sec) , antiderivative size = 439, normalized size of antiderivative = 2.95 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {1}{4} \, A d^{3} i^{3} x^{4} + A c d^{2} i^{3} x^{3} + \frac {3}{2} \, A c^{2} d i^{3} x^{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 )} B c^{3} i^{3} + \frac {3}{2} \, {\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 )} B c^{2} d i^{3} + \frac {1}{2} \, {\left (2 \, x^{3} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} B c d^{2} i^{3} + \frac {1}{24} \, {\left (6 \, x^{4} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) - \frac {6 \, a^{4} \log \left (b x + a\right )}{b^{4}} + \frac {6 \, c^{4} \log \left (d x + c\right )}{d^{4}} - \frac {2 \, {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} x^{3} - 3 \, {\left (b^{3} c^{2} d - a^{2} b d^{3}\right )} x^{2} + 6 \, {\left (b^{3} c^{3} - a^{3} d^{3}\right )} x}{b^{3} d^{3}}\right )} B d^{3} i^{3} + A c^{3} i^{3} x \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1506 vs. \(2 (139) = 278\).

Time = 0.27 (sec) , antiderivative size = 1506, normalized size of antiderivative = 10.11 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\text {Too large to display} \] Input:

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

Output:

1/24*(6*(B*b^5*c^5*e^5*i^3 - 5*B*a*b^4*c^4*d*e^5*i^3 + 10*B*a^2*b^3*c^3*d^ 
2*e^5*i^3 - 10*B*a^3*b^2*c^2*d^3*e^5*i^3 + 5*B*a^4*b*c*d^4*e^5*i^3 - B*a^5 
*d^5*e^5*i^3)*log((b*e*x + a*e)/(d*x + c))/(b^4*d*e^4 - 4*(b*e*x + a*e)*b^ 
3*d^2*e^3/(d*x + c) + 6*(b*e*x + a*e)^2*b^2*d^3*e^2/(d*x + c)^2 - 4*(b*e*x 
 + a*e)^3*b*d^4*e/(d*x + c)^3 + (b*e*x + a*e)^4*d^5/(d*x + c)^4) + (6*A*b^ 
8*c^5*e^5*i^3 - 11*B*b^8*c^5*e^5*i^3 - 30*A*a*b^7*c^4*d*e^5*i^3 + 55*B*a*b 
^7*c^4*d*e^5*i^3 + 60*A*a^2*b^6*c^3*d^2*e^5*i^3 - 110*B*a^2*b^6*c^3*d^2*e^ 
5*i^3 - 60*A*a^3*b^5*c^2*d^3*e^5*i^3 + 110*B*a^3*b^5*c^2*d^3*e^5*i^3 + 30* 
A*a^4*b^4*c*d^4*e^5*i^3 - 55*B*a^4*b^4*c*d^4*e^5*i^3 - 6*A*a^5*b^3*d^5*e^5 
*i^3 + 11*B*a^5*b^3*d^5*e^5*i^3 + 26*(b*e*x + a*e)*B*b^7*c^5*d*e^4*i^3/(d* 
x + c) - 130*(b*e*x + a*e)*B*a*b^6*c^4*d^2*e^4*i^3/(d*x + c) + 260*(b*e*x 
+ a*e)*B*a^2*b^5*c^3*d^3*e^4*i^3/(d*x + c) - 260*(b*e*x + a*e)*B*a^3*b^4*c 
^2*d^4*e^4*i^3/(d*x + c) + 130*(b*e*x + a*e)*B*a^4*b^3*c*d^5*e^4*i^3/(d*x 
+ c) - 26*(b*e*x + a*e)*B*a^5*b^2*d^6*e^4*i^3/(d*x + c) - 21*(b*e*x + a*e) 
^2*B*b^6*c^5*d^2*e^3*i^3/(d*x + c)^2 + 105*(b*e*x + a*e)^2*B*a*b^5*c^4*d^3 
*e^3*i^3/(d*x + c)^2 - 210*(b*e*x + a*e)^2*B*a^2*b^4*c^3*d^4*e^3*i^3/(d*x 
+ c)^2 + 210*(b*e*x + a*e)^2*B*a^3*b^3*c^2*d^5*e^3*i^3/(d*x + c)^2 - 105*( 
b*e*x + a*e)^2*B*a^4*b^2*c*d^6*e^3*i^3/(d*x + c)^2 + 21*(b*e*x + a*e)^2*B* 
a^5*b*d^7*e^3*i^3/(d*x + c)^2 + 6*(b*e*x + a*e)^3*B*b^5*c^5*d^3*e^2*i^3/(d 
*x + c)^3 - 30*(b*e*x + a*e)^3*B*a*b^4*c^4*d^4*e^2*i^3/(d*x + c)^3 + 60...
 

Mupad [B] (verification not implemented)

Time = 27.08 (sec) , antiderivative size = 566, normalized size of antiderivative = 3.80 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=x\,\left (\frac {\left (4\,a\,d+4\,b\,c\right )\,\left (\frac {\left (\frac {d^2\,i^3\,\left (4\,A\,a\,d+16\,A\,b\,c+B\,a\,d-B\,b\,c\right )}{4\,b}-\frac {A\,d^2\,i^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,b}\right )\,\left (4\,a\,d+4\,b\,c\right )}{4\,b\,d}-\frac {c\,d\,i^3\,\left (4\,A\,a\,d+6\,A\,b\,c+B\,a\,d-B\,b\,c\right )}{b}+\frac {A\,a\,c\,d^2\,i^3}{b}\right )}{4\,b\,d}+\frac {c^2\,i^3\,\left (12\,A\,a\,d+8\,A\,b\,c+3\,B\,a\,d-3\,B\,b\,c\right )}{2\,b}-\frac {a\,c\,\left (\frac {d^2\,i^3\,\left (4\,A\,a\,d+16\,A\,b\,c+B\,a\,d-B\,b\,c\right )}{4\,b}-\frac {A\,d^2\,i^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,b}\right )}{b\,d}\right )-x^2\,\left (\frac {\left (\frac {d^2\,i^3\,\left (4\,A\,a\,d+16\,A\,b\,c+B\,a\,d-B\,b\,c\right )}{4\,b}-\frac {A\,d^2\,i^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,b}\right )\,\left (4\,a\,d+4\,b\,c\right )}{8\,b\,d}-\frac {c\,d\,i^3\,\left (4\,A\,a\,d+6\,A\,b\,c+B\,a\,d-B\,b\,c\right )}{2\,b}+\frac {A\,a\,c\,d^2\,i^3}{2\,b}\right )+\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\,\left (B\,c^3\,i^3\,x+\frac {3\,B\,c^2\,d\,i^3\,x^2}{2}+B\,c\,d^2\,i^3\,x^3+\frac {B\,d^3\,i^3\,x^4}{4}\right )+x^3\,\left (\frac {d^2\,i^3\,\left (4\,A\,a\,d+16\,A\,b\,c+B\,a\,d-B\,b\,c\right )}{12\,b}-\frac {A\,d^2\,i^3\,\left (4\,a\,d+4\,b\,c\right )}{12\,b}\right )-\frac {\ln \left (a+b\,x\right )\,\left (B\,a^4\,d^3\,i^3-4\,B\,a^3\,b\,c\,d^2\,i^3+6\,B\,a^2\,b^2\,c^2\,d\,i^3-4\,B\,a\,b^3\,c^3\,i^3\right )}{4\,b^4}+\frac {A\,d^3\,i^3\,x^4}{4}-\frac {B\,c^4\,i^3\,\ln \left (c+d\,x\right )}{4\,d} \] Input:

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

Output:

x*(((4*a*d + 4*b*c)*((((d^2*i^3*(4*A*a*d + 16*A*b*c + B*a*d - B*b*c))/(4*b 
) - (A*d^2*i^3*(4*a*d + 4*b*c))/(4*b))*(4*a*d + 4*b*c))/(4*b*d) - (c*d*i^3 
*(4*A*a*d + 6*A*b*c + B*a*d - B*b*c))/b + (A*a*c*d^2*i^3)/b))/(4*b*d) + (c 
^2*i^3*(12*A*a*d + 8*A*b*c + 3*B*a*d - 3*B*b*c))/(2*b) - (a*c*((d^2*i^3*(4 
*A*a*d + 16*A*b*c + B*a*d - B*b*c))/(4*b) - (A*d^2*i^3*(4*a*d + 4*b*c))/(4 
*b)))/(b*d)) - x^2*((((d^2*i^3*(4*A*a*d + 16*A*b*c + B*a*d - B*b*c))/(4*b) 
 - (A*d^2*i^3*(4*a*d + 4*b*c))/(4*b))*(4*a*d + 4*b*c))/(8*b*d) - (c*d*i^3* 
(4*A*a*d + 6*A*b*c + B*a*d - B*b*c))/(2*b) + (A*a*c*d^2*i^3)/(2*b)) + log( 
(e*(a + b*x))/(c + d*x))*((B*d^3*i^3*x^4)/4 + B*c^3*i^3*x + (3*B*c^2*d*i^3 
*x^2)/2 + B*c*d^2*i^3*x^3) + x^3*((d^2*i^3*(4*A*a*d + 16*A*b*c + B*a*d - B 
*b*c))/(12*b) - (A*d^2*i^3*(4*a*d + 4*b*c))/(12*b)) - (log(a + b*x)*(B*a^4 
*d^3*i^3 - 4*B*a*b^3*c^3*i^3 + 6*B*a^2*b^2*c^2*d*i^3 - 4*B*a^3*b*c*d^2*i^3 
))/(4*b^4) + (A*d^3*i^3*x^4)/4 - (B*c^4*i^3*log(c + d*x))/(4*d)
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 477, normalized size of antiderivative = 3.20 \[ \int (c i+d i x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {i \left (-6 a^{3} b \,d^{4} x +3 a^{2} b^{2} d^{4} x^{2}-2 a \,b^{3} d^{4} x^{3}+18 b^{4} c^{3} d x +9 b^{4} c^{2} d^{2} x^{2}+2 b^{4} c \,d^{3} x^{3}-24 \,\mathrm {log}\left (d x +c \right ) a^{3} b c \,d^{3}+36 \,\mathrm {log}\left (d x +c \right ) a^{2} b^{2} c^{2} d^{2}-24 \,\mathrm {log}\left (d x +c \right ) a \,b^{3} c^{3} d +24 a^{2} b^{2} c \,d^{3} x -36 a \,b^{3} c^{2} d^{2} x -12 a \,b^{3} c \,d^{3} x^{2}-6 a \,b^{3} d^{4} x^{4}+36 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) a^{2} b^{2} c^{2} d^{2}-24 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) a \,b^{3} c^{3} d -24 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) b^{4} c \,d^{3} x^{3}-24 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) b^{4} c^{3} d x -24 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) a^{3} b c \,d^{3}-36 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) b^{4} c^{2} d^{2} x^{2}-24 a \,b^{3} c^{3} d x -36 a \,b^{3} c^{2} d^{2} x^{2}-24 a \,b^{3} c \,d^{3} x^{3}-6 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) b^{4} d^{4} x^{4}+6 \,\mathrm {log}\left (\frac {b e x +a e}{d x +c}\right ) a^{4} d^{4}+6 \,\mathrm {log}\left (d x +c \right ) a^{4} d^{4}+6 \,\mathrm {log}\left (d x +c \right ) b^{4} c^{4}\right )}{24 b^{3} d} \] Input:

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

Output:

(i*(6*log(c + d*x)*a**4*d**4 - 24*log(c + d*x)*a**3*b*c*d**3 + 36*log(c + 
d*x)*a**2*b**2*c**2*d**2 - 24*log(c + d*x)*a*b**3*c**3*d + 6*log(c + d*x)* 
b**4*c**4 + 6*log((a*e + b*e*x)/(c + d*x))*a**4*d**4 - 24*log((a*e + b*e*x 
)/(c + d*x))*a**3*b*c*d**3 + 36*log((a*e + b*e*x)/(c + d*x))*a**2*b**2*c** 
2*d**2 - 24*log((a*e + b*e*x)/(c + d*x))*a*b**3*c**3*d - 24*log((a*e + b*e 
*x)/(c + d*x))*b**4*c**3*d*x - 36*log((a*e + b*e*x)/(c + d*x))*b**4*c**2*d 
**2*x**2 - 24*log((a*e + b*e*x)/(c + d*x))*b**4*c*d**3*x**3 - 6*log((a*e + 
 b*e*x)/(c + d*x))*b**4*d**4*x**4 - 6*a**3*b*d**4*x + 24*a**2*b**2*c*d**3* 
x + 3*a**2*b**2*d**4*x**2 - 24*a*b**3*c**3*d*x - 36*a*b**3*c**2*d**2*x**2 
- 36*a*b**3*c**2*d**2*x - 24*a*b**3*c*d**3*x**3 - 12*a*b**3*c*d**3*x**2 - 
6*a*b**3*d**4*x**4 - 2*a*b**3*d**4*x**3 + 18*b**4*c**3*d*x + 9*b**4*c**2*d 
**2*x**2 + 2*b**4*c*d**3*x**3))/(24*b**3*d)