\(\int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx\) [122]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (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 = 20, antiderivative size = 158 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx=-\frac {A b-a B}{2 (b d-a e)^2 (a+b x)^2}-\frac {b B d-2 A b e+a B e}{(b d-a e)^3 (a+b x)}-\frac {e (B d-A e)}{(b d-a e)^3 (d+e x)}-\frac {e (2 b B d-3 A b e+a B e) \log (a+b x)}{(b d-a e)^4}+\frac {e (2 b B d-3 A b e+a B e) \log (d+e x)}{(b d-a e)^4} \] Output:

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

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.92 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx=\frac {\frac {(-A b+a B) (b d-a e)^2}{(a+b x)^2}-\frac {2 (b d-a e) (b B d-2 A b e+a B e)}{a+b x}+\frac {2 e (b d-a e) (-B d+A e)}{d+e x}-2 e (2 b B d-3 A b e+a B e) \log (a+b x)+2 e (2 b B d-3 A b e+a B e) \log (d+e x)}{2 (b d-a e)^4} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {86, 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 {A+B x}{(a+b x)^3 (d+e x)^2} \, dx\)

\(\Big \downarrow \) 86

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.02

method result size
default \(-\frac {2 A b e -B a e -B b d}{\left (a e -d b \right )^{3} \left (b x +a \right )}-\frac {A b -B a}{2 \left (a e -d b \right )^{2} \left (b x +a \right )^{2}}+\frac {e \left (3 A b e -B a e -2 B b d \right ) \ln \left (b x +a \right )}{\left (a e -d b \right )^{4}}-\frac {\left (A e -B d \right ) e}{\left (a e -d b \right )^{3} \left (e x +d \right )}-\frac {e \left (3 A b e -B a e -2 B b d \right ) \ln \left (e x +d \right )}{\left (a e -d b \right )^{4}}\) \(161\)
norman \(\frac {-\frac {2 A \,a^{2} b^{2} e^{3}+5 A a \,b^{3} d \,e^{2}-A \,b^{4} d^{2} e -5 B \,a^{2} b^{2} d \,e^{2}-B a \,b^{3} d^{2} e}{2 e \,b^{2} \left (a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}\right )}-\frac {\left (3 A \,b^{3} e^{3}-B a \,b^{2} e^{3}-2 b^{3} B d \,e^{2}\right ) x^{2}}{e b \left (a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}\right )}-\frac {\left (9 A a \,b^{3} e^{3}+3 A \,b^{4} d \,e^{2}-3 B \,a^{2} b^{2} e^{3}-7 B a \,b^{3} d \,e^{2}-2 B \,b^{4} d^{2} e \right ) x}{2 e \,b^{2} \left (a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}\right )}}{\left (b x +a \right )^{2} \left (e x +d \right )}+\frac {e \left (3 A b e -B a e -2 B b d \right ) \ln \left (b x +a \right )}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}-\frac {e \left (3 A b e -B a e -2 B b d \right ) \ln \left (e x +d \right )}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}\) \(453\)
risch \(\frac {-\frac {b e \left (3 A b e -B a e -2 B b d \right ) x^{2}}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}-\frac {\left (3 a e +d b \right ) \left (3 A b e -B a e -2 B b d \right ) x}{2 \left (a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}\right )}-\frac {2 a^{2} A \,e^{2}+5 A a b d e -A \,b^{2} d^{2}-5 B \,a^{2} d e -B a b \,d^{2}}{2 \left (a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}\right )}}{\left (b x +a \right )^{2} \left (e x +d \right )}-\frac {3 e^{2} \ln \left (e x +d \right ) A b}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}+\frac {e^{2} \ln \left (e x +d \right ) B a}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}+\frac {2 e \ln \left (e x +d \right ) B b d}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}+\frac {3 e^{2} \ln \left (-b x -a \right ) A b}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}-\frac {e^{2} \ln \left (-b x -a \right ) B a}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}-\frac {2 e \ln \left (-b x -a \right ) B b d}{a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}}\) \(616\)
parallelrisch \(\frac {2 B \ln \left (e x +d \right ) x \,a^{3} b^{2} e^{4}+2 B \ln \left (e x +d \right ) x^{3} a \,b^{4} e^{4}-6 A \ln \left (e x +d \right ) x \,a^{2} b^{3} e^{4}-2 B \ln \left (b x +a \right ) x \,a^{3} b^{2} e^{4}-4 B \ln \left (b x +a \right ) x^{3} b^{5} d \,e^{3}-12 A \ln \left (e x +d \right ) x a \,b^{4} d \,e^{3}-8 B \ln \left (b x +a \right ) x \,a^{2} b^{3} d \,e^{3}-8 B \ln \left (b x +a \right ) x a \,b^{4} d^{2} e^{2}+8 B \ln \left (e x +d \right ) x \,a^{2} b^{3} d \,e^{3}+8 B \ln \left (e x +d \right ) x a \,b^{4} d^{2} e^{2}-10 B \ln \left (b x +a \right ) x^{2} a \,b^{4} d \,e^{3}-3 A \,a^{2} b^{3} d \,e^{3}+6 A a \,b^{4} d^{2} e^{2}+5 B \,a^{3} b^{2} d \,e^{3}-4 B \,a^{2} b^{3} d^{2} e^{2}-B a \,b^{4} d^{3} e +4 B \ln \left (e x +d \right ) a^{2} b^{3} d^{2} e^{2}+2 B \,x^{2} a \,b^{4} d \,e^{3}+6 A x a \,b^{4} d \,e^{3}-5 B x a \,b^{4} d^{2} e^{2}-2 B \ln \left (b x +a \right ) x^{3} a \,b^{4} e^{4}-6 A \,x^{2} a \,b^{4} e^{4}+6 A \,x^{2} b^{5} d \,e^{3}+2 B \,x^{2} a^{2} b^{3} e^{4}-4 B \,x^{2} b^{5} d^{2} e^{2}-9 A x \,a^{2} b^{3} e^{4}+3 A x \,b^{5} d^{2} e^{2}+3 B x \,a^{3} b^{2} e^{4}-2 B x \,b^{5} d^{3} e +6 A \ln \left (b x +a \right ) x^{3} b^{5} e^{4}-6 A \ln \left (e x +d \right ) x^{3} b^{5} e^{4}-12 A \ln \left (e x +d \right ) x^{2} a \,b^{4} e^{4}-6 A \ln \left (e x +d \right ) x^{2} b^{5} d \,e^{3}+10 B \ln \left (e x +d \right ) x^{2} a \,b^{4} d \,e^{3}+12 A \ln \left (b x +a \right ) x a \,b^{4} d \,e^{3}+4 B \ln \left (e x +d \right ) x^{2} b^{5} d^{2} e^{2}+6 A \ln \left (b x +a \right ) x \,a^{2} b^{3} e^{4}+4 B \ln \left (e x +d \right ) x^{3} b^{5} d \,e^{3}-4 B \ln \left (b x +a \right ) a^{2} b^{3} d^{2} e^{2}+4 B x \,a^{2} b^{3} d \,e^{3}-4 B \ln \left (b x +a \right ) x^{2} b^{5} d^{2} e^{2}+6 A \ln \left (b x +a \right ) a^{2} b^{3} d \,e^{3}-6 A \ln \left (e x +d \right ) a^{2} b^{3} d \,e^{3}-2 B \ln \left (b x +a \right ) a^{3} b^{2} d \,e^{3}+12 A \ln \left (b x +a \right ) x^{2} a \,b^{4} e^{4}+6 A \ln \left (b x +a \right ) x^{2} b^{5} d \,e^{3}-4 B \ln \left (b x +a \right ) x^{2} a^{2} b^{3} e^{4}-2 A \,a^{3} b^{2} e^{4}-A \,b^{5} d^{3} e +2 B \ln \left (e x +d \right ) a^{3} b^{2} d \,e^{3}+4 B \ln \left (e x +d \right ) x^{2} a^{2} b^{3} e^{4}}{2 \left (a^{4} e^{4}-4 a^{3} b d \,e^{3}+6 a^{2} b^{2} d^{2} e^{2}-4 a \,b^{3} d^{3} e +b^{4} d^{4}\right ) \left (e x +d \right ) \left (b x +a \right )^{2} b^{2} e}\) \(944\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 803 vs. \(2 (156) = 312\).

Time = 0.10 (sec) , antiderivative size = 803, normalized size of antiderivative = 5.08 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx =\text {Too large to display} \] Input:

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

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1066 vs. \(2 (148) = 296\).

Time = 1.99 (sec) , antiderivative size = 1066, normalized size of antiderivative = 6.75 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx =\text {Too large to display} \] Input:

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

Output:

e*(-3*A*b*e + B*a*e + 2*B*b*d)*log(x + (-3*A*a*b*e**3 - 3*A*b**2*d*e**2 + 
B*a**2*e**3 + 3*B*a*b*d*e**2 + 2*B*b**2*d**2*e - a**5*e**6*(-3*A*b*e + B*a 
*e + 2*B*b*d)/(a*e - b*d)**4 + 5*a**4*b*d*e**5*(-3*A*b*e + B*a*e + 2*B*b*d 
)/(a*e - b*d)**4 - 10*a**3*b**2*d**2*e**4*(-3*A*b*e + B*a*e + 2*B*b*d)/(a* 
e - b*d)**4 + 10*a**2*b**3*d**3*e**3*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b 
*d)**4 - 5*a*b**4*d**4*e**2*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b*d)**4 + 
b**5*d**5*e*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b*d)**4)/(-6*A*b**2*e**3 + 
 2*B*a*b*e**3 + 4*B*b**2*d*e**2))/(a*e - b*d)**4 - e*(-3*A*b*e + B*a*e + 2 
*B*b*d)*log(x + (-3*A*a*b*e**3 - 3*A*b**2*d*e**2 + B*a**2*e**3 + 3*B*a*b*d 
*e**2 + 2*B*b**2*d**2*e + a**5*e**6*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b* 
d)**4 - 5*a**4*b*d*e**5*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b*d)**4 + 10*a 
**3*b**2*d**2*e**4*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b*d)**4 - 10*a**2*b 
**3*d**3*e**3*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b*d)**4 + 5*a*b**4*d**4* 
e**2*(-3*A*b*e + B*a*e + 2*B*b*d)/(a*e - b*d)**4 - b**5*d**5*e*(-3*A*b*e + 
 B*a*e + 2*B*b*d)/(a*e - b*d)**4)/(-6*A*b**2*e**3 + 2*B*a*b*e**3 + 4*B*b** 
2*d*e**2))/(a*e - b*d)**4 + (-2*A*a**2*e**2 - 5*A*a*b*d*e + A*b**2*d**2 + 
5*B*a**2*d*e + B*a*b*d**2 + x**2*(-6*A*b**2*e**2 + 2*B*a*b*e**2 + 4*B*b**2 
*d*e) + x*(-9*A*a*b*e**2 - 3*A*b**2*d*e + 3*B*a**2*e**2 + 7*B*a*b*d*e + 2* 
B*b**2*d**2))/(2*a**5*d*e**3 - 6*a**4*b*d**2*e**2 + 6*a**3*b**2*d**3*e - 2 
*a**2*b**3*d**4 + x**3*(2*a**3*b**2*e**4 - 6*a**2*b**3*d*e**3 + 6*a*b**...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 477 vs. \(2 (156) = 312\).

Time = 0.05 (sec) , antiderivative size = 477, normalized size of antiderivative = 3.02 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx=-\frac {{\left (2 \, B b d e + {\left (B a - 3 \, A b\right )} e^{2}\right )} \log \left (b x + a\right )}{b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}} + \frac {{\left (2 \, B b d e + {\left (B a - 3 \, A b\right )} e^{2}\right )} \log \left (e x + d\right )}{b^{4} d^{4} - 4 \, a b^{3} d^{3} e + 6 \, a^{2} b^{2} d^{2} e^{2} - 4 \, a^{3} b d e^{3} + a^{4} e^{4}} + \frac {2 \, A a^{2} e^{2} - {\left (B a b + A b^{2}\right )} d^{2} - 5 \, {\left (B a^{2} - A a b\right )} d e - 2 \, {\left (2 \, B b^{2} d e + {\left (B a b - 3 \, A b^{2}\right )} e^{2}\right )} x^{2} - {\left (2 \, B b^{2} d^{2} + {\left (7 \, B a b - 3 \, A b^{2}\right )} d e + 3 \, {\left (B a^{2} - 3 \, A a b\right )} e^{2}\right )} x}{2 \, {\left (a^{2} b^{3} d^{4} - 3 \, a^{3} b^{2} d^{3} e + 3 \, a^{4} b d^{2} e^{2} - a^{5} d e^{3} + {\left (b^{5} d^{3} e - 3 \, a b^{4} d^{2} e^{2} + 3 \, a^{2} b^{3} d e^{3} - a^{3} b^{2} e^{4}\right )} x^{3} + {\left (b^{5} d^{4} - a b^{4} d^{3} e - 3 \, a^{2} b^{3} d^{2} e^{2} + 5 \, a^{3} b^{2} d e^{3} - 2 \, a^{4} b e^{4}\right )} x^{2} + {\left (2 \, a b^{4} d^{4} - 5 \, a^{2} b^{3} d^{3} e + 3 \, a^{3} b^{2} d^{2} e^{2} + a^{4} b d e^{3} - a^{5} e^{4}\right )} x\right )}} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.93 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx=-\frac {{\left (2 \, B b d e^{2} + B a e^{3} - 3 \, A b e^{3}\right )} \log \left ({\left | b - \frac {b d}{e x + d} + \frac {a e}{e x + d} \right |}\right )}{b^{4} d^{4} e - 4 \, a b^{3} d^{3} e^{2} + 6 \, a^{2} b^{2} d^{2} e^{3} - 4 \, a^{3} b d e^{4} + a^{4} e^{5}} - \frac {\frac {B d e^{4}}{e x + d} - \frac {A e^{5}}{e x + d}}{b^{3} d^{3} e^{3} - 3 \, a b^{2} d^{2} e^{4} + 3 \, a^{2} b d e^{5} - a^{3} e^{6}} - \frac {2 \, B b^{3} d e + 3 \, B a b^{2} e^{2} - 5 \, A b^{3} e^{2} - \frac {2 \, {\left (B b^{3} d^{2} e^{2} + B a b^{2} d e^{3} - 3 \, A b^{3} d e^{3} - 2 \, B a^{2} b e^{4} + 3 \, A a b^{2} e^{4}\right )}}{{\left (e x + d\right )} e}}{2 \, {\left (b d - a e\right )}^{4} {\left (b - \frac {b d}{e x + d} + \frac {a e}{e x + d}\right )}^{2}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 1.22 (sec) , antiderivative size = 453, normalized size of antiderivative = 2.87 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx=\frac {\frac {5\,B\,a^2\,d\,e-2\,A\,a^2\,e^2+B\,a\,b\,d^2-5\,A\,a\,b\,d\,e+A\,b^2\,d^2}{2\,\left (a^3\,e^3-3\,a^2\,b\,d\,e^2+3\,a\,b^2\,d^2\,e-b^3\,d^3\right )}+\frac {x\,\left (3\,a\,e+b\,d\right )\,\left (B\,a\,e-3\,A\,b\,e+2\,B\,b\,d\right )}{2\,\left (a^3\,e^3-3\,a^2\,b\,d\,e^2+3\,a\,b^2\,d^2\,e-b^3\,d^3\right )}+\frac {b\,e\,x^2\,\left (B\,a\,e-3\,A\,b\,e+2\,B\,b\,d\right )}{a^3\,e^3-3\,a^2\,b\,d\,e^2+3\,a\,b^2\,d^2\,e-b^3\,d^3}}{x\,\left (e\,a^2+2\,b\,d\,a\right )+a^2\,d+x^2\,\left (d\,b^2+2\,a\,e\,b\right )+b^2\,e\,x^3}-\frac {2\,\mathrm {atanh}\left (\frac {\left (e^2\,\left (3\,A\,b-B\,a\right )-2\,B\,b\,d\,e\right )\,\left (\frac {a^4\,e^4-2\,a^3\,b\,d\,e^3+2\,a\,b^3\,d^3\,e-b^4\,d^4}{a^3\,e^3-3\,a^2\,b\,d\,e^2+3\,a\,b^2\,d^2\,e-b^3\,d^3}+2\,b\,e\,x\right )\,\left (a^3\,e^3-3\,a^2\,b\,d\,e^2+3\,a\,b^2\,d^2\,e-b^3\,d^3\right )}{{\left (a\,e-b\,d\right )}^4\,\left (B\,a\,e^2-3\,A\,b\,e^2+2\,B\,b\,d\,e\right )}\right )\,\left (e^2\,\left (3\,A\,b-B\,a\right )-2\,B\,b\,d\,e\right )}{{\left (a\,e-b\,d\right )}^4} \] Input:

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

Output:

((A*b^2*d^2 - 2*A*a^2*e^2 + B*a*b*d^2 + 5*B*a^2*d*e - 5*A*a*b*d*e)/(2*(a^3 
*e^3 - b^3*d^3 + 3*a*b^2*d^2*e - 3*a^2*b*d*e^2)) + (x*(3*a*e + b*d)*(B*a*e 
 - 3*A*b*e + 2*B*b*d))/(2*(a^3*e^3 - b^3*d^3 + 3*a*b^2*d^2*e - 3*a^2*b*d*e 
^2)) + (b*e*x^2*(B*a*e - 3*A*b*e + 2*B*b*d))/(a^3*e^3 - b^3*d^3 + 3*a*b^2* 
d^2*e - 3*a^2*b*d*e^2))/(x*(a^2*e + 2*a*b*d) + a^2*d + x^2*(b^2*d + 2*a*b* 
e) + b^2*e*x^3) - (2*atanh(((e^2*(3*A*b - B*a) - 2*B*b*d*e)*((a^4*e^4 - b^ 
4*d^4 + 2*a*b^3*d^3*e - 2*a^3*b*d*e^3)/(a^3*e^3 - b^3*d^3 + 3*a*b^2*d^2*e 
- 3*a^2*b*d*e^2) + 2*b*e*x)*(a^3*e^3 - b^3*d^3 + 3*a*b^2*d^2*e - 3*a^2*b*d 
*e^2))/((a*e - b*d)^4*(B*a*e^2 - 3*A*b*e^2 + 2*B*b*d*e)))*(e^2*(3*A*b - B* 
a) - 2*B*b*d*e))/(a*e - b*d)^4
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 459, normalized size of antiderivative = 2.91 \[ \int \frac {A+B x}{(a+b x)^3 (d+e x)^2} \, dx=\frac {2 \,\mathrm {log}\left (b x +a \right ) a^{2} b d \,e^{2}+2 \,\mathrm {log}\left (b x +a \right ) a^{2} b \,e^{3} x +2 \,\mathrm {log}\left (b x +a \right ) a \,b^{2} d^{2} e +4 \,\mathrm {log}\left (b x +a \right ) a \,b^{2} d \,e^{2} x +2 \,\mathrm {log}\left (b x +a \right ) a \,b^{2} e^{3} x^{2}+2 \,\mathrm {log}\left (b x +a \right ) b^{3} d^{2} e x +2 \,\mathrm {log}\left (b x +a \right ) b^{3} d \,e^{2} x^{2}-2 \,\mathrm {log}\left (e x +d \right ) a^{2} b d \,e^{2}-2 \,\mathrm {log}\left (e x +d \right ) a^{2} b \,e^{3} x -2 \,\mathrm {log}\left (e x +d \right ) a \,b^{2} d^{2} e -4 \,\mathrm {log}\left (e x +d \right ) a \,b^{2} d \,e^{2} x -2 \,\mathrm {log}\left (e x +d \right ) a \,b^{2} e^{3} x^{2}-2 \,\mathrm {log}\left (e x +d \right ) b^{3} d^{2} e x -2 \,\mathrm {log}\left (e x +d \right ) b^{3} d \,e^{2} x^{2}-a^{3} e^{3}+a^{2} b d \,e^{2}-a \,b^{2} d^{2} e +2 a \,b^{2} e^{3} x^{2}+b^{3} d^{3}-2 b^{3} d \,e^{2} x^{2}}{a^{4} b \,e^{5} x^{2}-2 a^{3} b^{2} d \,e^{4} x^{2}+2 a \,b^{4} d^{3} e^{2} x^{2}-b^{5} d^{4} e \,x^{2}+a^{5} e^{5} x -a^{4} b d \,e^{4} x -2 a^{3} b^{2} d^{2} e^{3} x +2 a^{2} b^{3} d^{3} e^{2} x +a \,b^{4} d^{4} e x -b^{5} d^{5} x +a^{5} d \,e^{4}-2 a^{4} b \,d^{2} e^{3}+2 a^{2} b^{3} d^{4} e -a \,b^{4} d^{5}} \] Input:

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

Output:

(2*log(a + b*x)*a**2*b*d*e**2 + 2*log(a + b*x)*a**2*b*e**3*x + 2*log(a + b 
*x)*a*b**2*d**2*e + 4*log(a + b*x)*a*b**2*d*e**2*x + 2*log(a + b*x)*a*b**2 
*e**3*x**2 + 2*log(a + b*x)*b**3*d**2*e*x + 2*log(a + b*x)*b**3*d*e**2*x** 
2 - 2*log(d + e*x)*a**2*b*d*e**2 - 2*log(d + e*x)*a**2*b*e**3*x - 2*log(d 
+ e*x)*a*b**2*d**2*e - 4*log(d + e*x)*a*b**2*d*e**2*x - 2*log(d + e*x)*a*b 
**2*e**3*x**2 - 2*log(d + e*x)*b**3*d**2*e*x - 2*log(d + e*x)*b**3*d*e**2* 
x**2 - a**3*e**3 + a**2*b*d*e**2 - a*b**2*d**2*e + 2*a*b**2*e**3*x**2 + b* 
*3*d**3 - 2*b**3*d*e**2*x**2)/(a**5*d*e**4 + a**5*e**5*x - 2*a**4*b*d**2*e 
**3 - a**4*b*d*e**4*x + a**4*b*e**5*x**2 - 2*a**3*b**2*d**2*e**3*x - 2*a** 
3*b**2*d*e**4*x**2 + 2*a**2*b**3*d**4*e + 2*a**2*b**3*d**3*e**2*x - a*b**4 
*d**5 + a*b**4*d**4*e*x + 2*a*b**4*d**3*e**2*x**2 - b**5*d**5*x - b**5*d** 
4*e*x**2)