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

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

Optimal result

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

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(207\) vs. \(2(85)=170\).

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

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

Output:

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

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.85, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {2962, 2741}

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

\(\Big \downarrow \) 2962

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

\(\Big \downarrow \) 2741

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

Input:

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

Output:

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

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 2962
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ 
)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Sy 
mbol] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q   Subst[Int[x^m*((A + 
 B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; 
 FreeQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && EqQ[n + mn, 0] && IGt 
Q[n, 0] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i, 0] && I 
ntegersQ[m, q]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(173\) vs. \(2(81)=162\).

Time = 1.34 (sec) , antiderivative size = 174, normalized size of antiderivative = 2.05

method result size
norman \(\frac {-\frac {2 A a d g +2 A b c g -B a d g -B b c g}{4 i \,d^{2}}-\frac {\left (2 A b g -B b g \right ) x}{2 i d}-\frac {B \,a^{2} g \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{2 i \left (d a -b c \right )}-\frac {B \,b^{2} g \,x^{2} \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{2 \left (d a -b c \right ) i}-\frac {B a b g x \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{i \left (d a -b c \right )}}{i^{2} \left (d x +c \right )^{2}}\) \(174\)
derivativedivides \(-\frac {e \left (d a -b c \right ) \left (\frac {g \,d^{2} A \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 \left (d a -b c \right )^{2} e^{3} i^{3}}+\frac {g \,d^{2} B \left (\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )}{2}-\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2}}{4}\right )}{\left (d a -b c \right )^{2} e^{3} i^{3}}\right )}{d^{2}}\) \(181\)
default \(-\frac {e \left (d a -b c \right ) \left (\frac {g \,d^{2} A \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2}}{2 \left (d a -b c \right )^{2} e^{3} i^{3}}+\frac {g \,d^{2} B \left (\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )}{2}-\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2}}{4}\right )}{\left (d a -b c \right )^{2} e^{3} i^{3}}\right )}{d^{2}}\) \(181\)
parallelrisch \(-\frac {2 A \,a^{2} b \,d^{4} g -2 A \,b^{3} c^{2} d^{2} g -B \,a^{2} b \,d^{4} g +B \,b^{3} c^{2} d^{2} g +2 B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) a^{2} b \,d^{4} g +2 B \,x^{2} \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) b^{3} d^{4} g +4 A x a \,b^{2} d^{4} g -4 A x \,b^{3} c \,d^{3} g -2 B x a \,b^{2} d^{4} g +2 B x \,b^{3} c \,d^{3} g +4 B x \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right ) a \,b^{2} d^{4} g}{4 i^{3} \left (d x +c \right )^{2} b \,d^{4} \left (d a -b c \right )}\) \(206\)
risch \(-\frac {B g \left (2 b d x +d a +b c \right ) \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{2 d^{2} i^{3} \left (d x +c \right )^{2}}-\frac {g \left (2 B \ln \left (b x +a \right ) b^{2} d^{2} x^{2}-2 B \ln \left (-d x -c \right ) b^{2} d^{2} x^{2}+4 B \ln \left (b x +a \right ) b^{2} c d x -4 B \ln \left (-d x -c \right ) b^{2} c d x +4 A a b \,d^{2} x -4 A \,b^{2} c d x +2 B \ln \left (b x +a \right ) b^{2} c^{2}-2 B \ln \left (-d x -c \right ) b^{2} c^{2}-2 B a b \,d^{2} x +2 B \,b^{2} c d x +2 A \,a^{2} d^{2}-2 A \,b^{2} c^{2}-B \,a^{2} d^{2}+B \,b^{2} c^{2}\right )}{4 d^{2} i^{3} \left (d x +c \right )^{2} \left (d a -b c \right )}\) \(249\)
parts \(\frac {g A \left (-\frac {d a -b c}{2 d^{2} \left (d x +c \right )^{2}}-\frac {b}{d^{2} \left (d x +c \right )}\right )}{i^{3}}-\frac {g B d \left (a \left (\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )}{2}-\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2}}{4}\right )-\frac {b c \left (\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2} \ln \left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )}{2}-\frac {\left (\frac {b e}{d}+\frac {\left (d a -b c \right ) e}{d \left (d x +c \right )}\right )^{2}}{4}\right )}{d}\right )}{i^{3} \left (d a -b c \right )^{2} e^{2}}\) \(255\)
orering \(-\frac {\left (d x +c \right ) \left (-2 d^{2} b^{2} x^{3}-3 x^{2} a b \,d^{2}+3 x^{2} b^{2} c d +6 x a c d b +5 a^{2} c d -a b \,c^{2}\right ) \left (b g x +a g \right ) \left (A +B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )\right )}{4 c \left (d a -b c \right ) d \left (b x +a \right ) \left (d i x +c i \right )^{3}}-\frac {\left (-b d \,x^{2}+a c \right ) \left (d x +c \right )^{2} \left (\frac {b g \left (A +B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )\right )}{\left (d i x +c i \right )^{3}}+\frac {\left (b g x +a g \right ) B \left (\frac {e b}{d x +c}-\frac {e \left (b x +a \right ) d}{\left (d x +c \right )^{2}}\right ) \left (d x +c \right )}{e \left (b x +a \right ) \left (d i x +c i \right )^{3}}-\frac {3 \left (b g x +a g \right ) \left (A +B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )\right ) d i}{\left (d i x +c i \right )^{4}}\right )}{4 c \left (d a -b c \right ) d}\) \(294\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 185 vs. \(2 (81) = 162\).

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

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

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 382 vs. \(2 (71) = 142\).

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 567 vs. \(2 (81) = 162\).

Time = 0.06 (sec) , antiderivative size = 567, normalized size of antiderivative = 6.67 \[ \int \frac {(a g+b g x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{(c i+d i x)^3} \, dx=-\frac {1}{4} \, B b g {\left (\frac {2 \, {\left (2 \, d x + c\right )} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right )}{d^{4} i^{3} x^{2} + 2 \, c d^{3} i^{3} x + c^{2} d^{2} i^{3}} - \frac {b c^{2} - 3 \, a c d + 2 \, {\left (b c d - 2 \, a d^{2}\right )} x}{{\left (b c d^{4} - a d^{5}\right )} i^{3} x^{2} + 2 \, {\left (b c^{2} d^{3} - a c d^{4}\right )} i^{3} x + {\left (b c^{3} d^{2} - a c^{2} d^{3}\right )} i^{3}} - \frac {2 \, {\left (b^{2} c - 2 \, a b d\right )} \log \left (b x + a\right )}{{\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} i^{3}} + \frac {2 \, {\left (b^{2} c - 2 \, a b d\right )} \log \left (d x + c\right )}{{\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} i^{3}}\right )} + \frac {1}{4} \, B a g {\left (\frac {2 \, b d x + 3 \, b c - a d}{{\left (b c d^{3} - a d^{4}\right )} i^{3} x^{2} + 2 \, {\left (b c^{2} d^{2} - a c d^{3}\right )} i^{3} x + {\left (b c^{3} d - a c^{2} d^{2}\right )} i^{3}} - \frac {2 \, \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right )}{d^{3} i^{3} x^{2} + 2 \, c d^{2} i^{3} x + c^{2} d i^{3}} + \frac {2 \, b^{2} \log \left (b x + a\right )}{{\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} i^{3}} - \frac {2 \, b^{2} \log \left (d x + c\right )}{{\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} i^{3}}\right )} - \frac {{\left (2 \, d x + c\right )} A b g}{2 \, {\left (d^{4} i^{3} x^{2} + 2 \, c d^{3} i^{3} x + c^{2} d^{2} i^{3}\right )}} - \frac {A a g}{2 \, {\left (d^{3} i^{3} x^{2} + 2 \, c d^{2} i^{3} x + c^{2} d i^{3}\right )}} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

(g*i*( - 2*log(a + b*x)*a*b**2*c**2 - 4*log(a + b*x)*a*b**2*c*d*x - 2*log( 
a + b*x)*a*b**2*d**2*x**2 + 2*log(c + d*x)*a*b**2*c**2 + 4*log(c + d*x)*a* 
b**2*c*d*x + 2*log(c + d*x)*a*b**2*d**2*x**2 - 2*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*b**2*c**2 + 2*log((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))*b**3* 
c*d*x**2 - 2*a**3*c*d + 2*a**2*b*c**2 + a**2*b*c*d + 2*a**2*b*d**2*x**2 - 
a*b**2*c**2 - 2*a*b**2*c*d*x**2 - a*b**2*d**2*x**2 + b**3*c*d*x**2))/(4*c* 
d*(a*c**2*d + 2*a*c*d**2*x + a*d**3*x**2 - b*c**3 - 2*b*c**2*d*x - b*c*d** 
2*x**2))