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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.50 (sec) , antiderivative size = 172, normalized size of antiderivative = 0.98 \[ \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(f+g x)^3} \, dx=\frac {-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(f+g x)^2}+2 B (b c-a d) \left (\frac {b^2 \log (a+b x)}{(b c-a d) (b f-a g)^2}+\frac {\frac {g (-d f+c g)}{(b f-a g) (f+g x)}+\frac {d^2 \log (c+d x)}{-b c+a d}-\frac {g (-2 b d f+b c g+a d g) \log (f+g x)}{(b f-a g)^2}}{(d f-c g)^2}\right )}{2 g} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.06, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2948, 93, 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 {B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A}{(f+g x)^3} \, dx\)

\(\Big \downarrow \) 2948

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

\(\Big \downarrow \) 93

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 93
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), 
x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre 
eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
 

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. \(628\) vs. \(2(173)=346\).

Time = 1.89 (sec) , antiderivative size = 629, normalized size of antiderivative = 3.59

method result size
derivativedivides \(-\frac {-d^{3} A \left (-\frac {1}{\left (c g -d f \right )^{2} \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )}-\frac {g}{2 \left (c g -d f \right )^{2} \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )^{2}}\right )+\frac {\frac {B a \,d^{3} g^{2}-B b c \,d^{2} g^{2}}{g^{2} \left (a g -b f \right ) \left (d x +c \right )^{2}}+\frac {b^{2} \left (c g -d f \right ) B d \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{\left (a^{2} g^{2}-2 a b f g +b^{2} f^{2}\right ) \left (d x +c \right )}-\frac {B a \,d^{3} g^{2}-B b c \,d^{2} g^{2}}{g \left (a c \,g^{2}-a d f g -b c f g +b d \,f^{2}\right ) \left (d x +c \right )}+\frac {B d \left (a^{2} d^{2} g -2 a b \,d^{2} f -b^{2} c^{2} g +2 b^{2} c d f \right ) \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{2 \left (a^{2} g^{2}-2 a b f g +b^{2} f^{2}\right ) \left (d x +c \right )^{2}}-\frac {b^{2} g B d \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{2 \left (a^{2} g^{2}-2 a b f g +b^{2} f^{2}\right )}}{\left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )^{2}}-\frac {B d \left (a^{2} d^{2} g -2 a b \,d^{2} f -b^{2} c^{2} g +2 b^{2} c d f \right ) \ln \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )}{a^{2} c^{2} g^{4}-2 a^{2} c d f \,g^{3}+a^{2} d^{2} f^{2} g^{2}-2 a b \,c^{2} f \,g^{3}+4 a b c d \,f^{2} g^{2}-2 a b \,d^{2} f^{3} g +b^{2} c^{2} f^{2} g^{2}-2 b^{2} c d \,f^{3} g +b^{2} d^{2} f^{4}}}{d}\) \(629\)
default \(-\frac {-d^{3} A \left (-\frac {1}{\left (c g -d f \right )^{2} \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )}-\frac {g}{2 \left (c g -d f \right )^{2} \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )^{2}}\right )+\frac {\frac {B a \,d^{3} g^{2}-B b c \,d^{2} g^{2}}{g^{2} \left (a g -b f \right ) \left (d x +c \right )^{2}}+\frac {b^{2} \left (c g -d f \right ) B d \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{\left (a^{2} g^{2}-2 a b f g +b^{2} f^{2}\right ) \left (d x +c \right )}-\frac {B a \,d^{3} g^{2}-B b c \,d^{2} g^{2}}{g \left (a c \,g^{2}-a d f g -b c f g +b d \,f^{2}\right ) \left (d x +c \right )}+\frac {B d \left (a^{2} d^{2} g -2 a b \,d^{2} f -b^{2} c^{2} g +2 b^{2} c d f \right ) \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{2 \left (a^{2} g^{2}-2 a b f g +b^{2} f^{2}\right ) \left (d x +c \right )^{2}}-\frac {b^{2} g B d \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{2 \left (a^{2} g^{2}-2 a b f g +b^{2} f^{2}\right )}}{\left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )^{2}}-\frac {B d \left (a^{2} d^{2} g -2 a b \,d^{2} f -b^{2} c^{2} g +2 b^{2} c d f \right ) \ln \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right )}{a^{2} c^{2} g^{4}-2 a^{2} c d f \,g^{3}+a^{2} d^{2} f^{2} g^{2}-2 a b \,c^{2} f \,g^{3}+4 a b c d \,f^{2} g^{2}-2 a b \,d^{2} f^{3} g +b^{2} c^{2} f^{2} g^{2}-2 b^{2} c d \,f^{3} g +b^{2} d^{2} f^{4}}}{d}\) \(629\)
risch \(\text {Expression too large to display}\) \(1037\)
parallelrisch \(\text {Expression too large to display}\) \(1586\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

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

Time = 43.45 (sec) , antiderivative size = 1036, normalized size of antiderivative = 5.92 \[ \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(f+g x)^3} \, dx =\text {Too large to display} \] Input:

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

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

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

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

Output:

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

Giac [B] (verification not implemented)

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

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

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

Output:

B*b^3*log(abs(b*x + a))/(b^3*f^2*g - 2*a*b^2*f*g^2 + a^2*b*g^3) - B*d^3*lo 
g(abs(d*x + c))/(d^3*f^2*g - 2*c*d^2*f*g^2 + c^2*d*g^3) + (2*B*b^2*c*d*f - 
 2*B*a*b*d^2*f - B*b^2*c^2*g + B*a^2*d^2*g)*log(g*x + f)/(b^2*d^2*f^4 - 2* 
b^2*c*d*f^3*g - 2*a*b*d^2*f^3*g + b^2*c^2*f^2*g^2 + 4*a*b*c*d*f^2*g^2 + a^ 
2*d^2*f^2*g^2 - 2*a*b*c^2*f*g^3 - 2*a^2*c*d*f*g^3 + a^2*c^2*g^4) - 1/2*B*l 
og((b^2*e*x^2 + 2*a*b*e*x + a^2*e)/(d^2*x^2 + 2*c*d*x + c^2))/(g^3*x^2 + 2 
*f*g^2*x + f^2*g) - 1/2*(2*B*b*c*g^2*x - 2*B*a*d*g^2*x + A*b*d*f^2 - A*b*c 
*f*g + 2*B*b*c*f*g - A*a*d*f*g - 2*B*a*d*f*g + A*a*c*g^2)/(b*d*f^2*g^3*x^2 
 - b*c*f*g^4*x^2 - a*d*f*g^4*x^2 + a*c*g^5*x^2 + 2*b*d*f^3*g^2*x - 2*b*c*f 
^2*g^3*x - 2*a*d*f^2*g^3*x + 2*a*c*f*g^4*x + b*d*f^4*g - b*c*f^3*g^2 - a*d 
*f^3*g^2 + a*c*f^2*g^3)
 

Mupad [B] (verification not implemented)

Time = 28.23 (sec) , antiderivative size = 412, normalized size of antiderivative = 2.35 \[ \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(f+g x)^3} \, dx=\frac {\ln \left (f+g\,x\right )\,\left (g\,\left (B\,a^2\,d^2-B\,b^2\,c^2\right )-2\,B\,a\,b\,d^2\,f+2\,B\,b^2\,c\,d\,f\right )}{a^2\,c^2\,g^4-2\,a^2\,c\,d\,f\,g^3+a^2\,d^2\,f^2\,g^2-2\,a\,b\,c^2\,f\,g^3+4\,a\,b\,c\,d\,f^2\,g^2-2\,a\,b\,d^2\,f^3\,g+b^2\,c^2\,f^2\,g^2-2\,b^2\,c\,d\,f^3\,g+b^2\,d^2\,f^4}-\frac {\frac {A\,a\,c\,g^2+A\,b\,d\,f^2-A\,a\,d\,f\,g-A\,b\,c\,f\,g-2\,B\,a\,d\,f\,g+2\,B\,b\,c\,f\,g}{2\,\left (a\,c\,g^2+b\,d\,f^2-a\,d\,f\,g-b\,c\,f\,g\right )}-\frac {x\,\left (B\,a\,d\,g^2-B\,b\,c\,g^2\right )}{a\,c\,g^2+b\,d\,f^2-a\,d\,f\,g-b\,c\,f\,g}}{f^2\,g+2\,f\,g^2\,x+g^3\,x^2}+\frac {B\,b^2\,\ln \left (a+b\,x\right )}{a^2\,g^3-2\,a\,b\,f\,g^2+b^2\,f^2\,g}-\frac {B\,d^2\,\ln \left (c+d\,x\right )}{c^2\,g^3-2\,c\,d\,f\,g^2+d^2\,f^2\,g}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )}{2\,g\,\left (f^2+2\,f\,g\,x+g^2\,x^2\right )} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 2695, normalized size of antiderivative = 15.40 \[ \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(f+g x)^3} \, dx =\text {Too large to display} \] Input:

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

Output:

( - 2*log(a + b*x)*a**2*b*c**2*f**2*g**4 - 4*log(a + b*x)*a**2*b*c**2*f*g* 
*5*x - 2*log(a + b*x)*a**2*b*c**2*g**6*x**2 + 4*log(a + b*x)*a**2*b*c*d*f* 
*3*g**3 + 8*log(a + b*x)*a**2*b*c*d*f**2*g**4*x + 4*log(a + b*x)*a**2*b*c* 
d*f*g**5*x**2 - 2*log(a + b*x)*a**2*b*d**2*f**4*g**2 - 4*log(a + b*x)*a**2 
*b*d**2*f**3*g**3*x - 2*log(a + b*x)*a**2*b*d**2*f**2*g**4*x**2 + 4*log(a 
+ b*x)*a*b**2*c**2*f**3*g**3 + 8*log(a + b*x)*a*b**2*c**2*f**2*g**4*x + 4* 
log(a + b*x)*a*b**2*c**2*f*g**5*x**2 - 8*log(a + b*x)*a*b**2*c*d*f**4*g**2 
 - 16*log(a + b*x)*a*b**2*c*d*f**3*g**3*x - 8*log(a + b*x)*a*b**2*c*d*f**2 
*g**4*x**2 + 4*log(a + b*x)*a*b**2*d**2*f**5*g + 8*log(a + b*x)*a*b**2*d** 
2*f**4*g**2*x + 4*log(a + b*x)*a*b**2*d**2*f**3*g**3*x**2 + 2*log(c + d*x) 
*a**2*b*c**2*f**2*g**4 + 4*log(c + d*x)*a**2*b*c**2*f*g**5*x + 2*log(c + d 
*x)*a**2*b*c**2*g**6*x**2 - 4*log(c + d*x)*a**2*b*c*d*f**3*g**3 - 8*log(c 
+ d*x)*a**2*b*c*d*f**2*g**4*x - 4*log(c + d*x)*a**2*b*c*d*f*g**5*x**2 - 4* 
log(c + d*x)*a*b**2*c**2*f**3*g**3 - 8*log(c + d*x)*a*b**2*c**2*f**2*g**4* 
x - 4*log(c + d*x)*a*b**2*c**2*f*g**5*x**2 + 8*log(c + d*x)*a*b**2*c*d*f** 
4*g**2 + 16*log(c + d*x)*a*b**2*c*d*f**3*g**3*x + 8*log(c + d*x)*a*b**2*c* 
d*f**2*g**4*x**2 + 2*log(c + d*x)*b**3*c**2*f**4*g**2 + 4*log(c + d*x)*b** 
3*c**2*f**3*g**3*x + 2*log(c + d*x)*b**3*c**2*f**2*g**4*x**2 - 4*log(c + d 
*x)*b**3*c*d*f**5*g - 8*log(c + d*x)*b**3*c*d*f**4*g**2*x - 4*log(c + d*x) 
*b**3*c*d*f**3*g**3*x**2 + 2*log(f + g*x)*a**2*b*d**2*f**4*g**2 + 4*log...