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

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 = 157 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)^3} \, dx=-\frac {b (A b-a B)}{(b d-a e)^3 (a+b x)}+\frac {B d-A e}{2 (b d-a e)^2 (d+e x)^2}+\frac {b B d-2 A b e+a B e}{(b d-a e)^3 (d+e x)}+\frac {b (b B d-3 A b e+2 a B e) \log (a+b x)}{(b d-a e)^4}-\frac {b (b B d-3 A b e+2 a B e) \log (d+e x)}{(b d-a e)^4} \] Output:

-b*(A*b-B*a)/(-a*e+b*d)^3/(b*x+a)+1/2*(-A*e+B*d)/(-a*e+b*d)^2/(e*x+d)^2+(- 
2*A*b*e+B*a*e+B*b*d)/(-a*e+b*d)^3/(e*x+d)+b*(-3*A*b*e+2*B*a*e+B*b*d)*ln(b* 
x+a)/(-a*e+b*d)^4-b*(-3*A*b*e+2*B*a*e+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.93 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)^3} \, dx=\frac {-\frac {2 b (A b-a B) (b d-a e)}{a+b x}+\frac {(b d-a e)^2 (B d-A e)}{(d+e x)^2}+\frac {2 (b d-a e) (b B d-2 A b e+a B e)}{d+e x}+2 b (b B d-3 A b e+2 a B e) \log (a+b x)-2 b (b B d-3 A b e+2 a B e) \log (d+e x)}{2 (b d-a e)^4} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 157, 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)^2 (d+e x)^3} \, dx\)

\(\Big \downarrow \) 86

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

-((b*(A*b - a*B))/((b*d - a*e)^3*(a + b*x))) + (B*d - A*e)/(2*(b*d - a*e)^ 
2*(d + e*x)^2) + (b*B*d - 2*A*b*e + a*B*e)/((b*d - a*e)^3*(d + e*x)) + (b* 
(b*B*d - 3*A*b*e + 2*a*B*e)*Log[a + b*x])/(b*d - a*e)^4 - (b*(b*B*d - 3*A* 
b*e + 2*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.33 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.01

method result size
default \(-\frac {b \left (3 A b e -2 B a e -B b d \right ) \ln \left (b x +a \right )}{\left (a e -d b \right )^{4}}+\frac {\left (A b -B a \right ) b}{\left (a e -d b \right )^{3} \left (b x +a \right )}-\frac {A e -B d}{2 \left (a e -d b \right )^{2} \left (e x +d \right )^{2}}+\frac {b \left (3 A b e -2 B a e -B b d \right ) \ln \left (e x +d \right )}{\left (a e -d b \right )^{4}}+\frac {2 A b e -B a e -B b d}{\left (a e -d b \right )^{3} \left (e x +d \right )}\) \(159\)
norman \(\frac {\frac {\left (3 A \,b^{3} e^{3}-2 B a \,b^{2} e^{3}-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 {A \,a^{2} b \,e^{4}-5 A a \,b^{2} d \,e^{3}-2 A \,b^{3} d^{2} e^{2}+B \,a^{2} b d \,e^{3}+5 B a \,b^{2} d^{2} e^{2}}{2 e^{2} 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 (3 A a \,b^{2} e^{4}+9 A \,b^{3} d \,e^{3}-2 B \,a^{2} b \,e^{4}-7 B a \,b^{2} d \,e^{3}-3 b^{3} B \,d^{2} e^{2}\right ) x}{2 e^{2} 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 )}}{\left (b x +a \right ) \left (e x +d \right )^{2}}+\frac {b \left (3 A b e -2 B a e -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}}-\frac {b \left (3 A b e -2 B a e -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}}\) \(450\)
risch \(\frac {\frac {b e \left (3 A b e -2 B a e -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 (a e +3 d b \right ) \left (3 A b e -2 B a e -B b d \right ) x}{2 a^{3} e^{3}-6 a^{2} b d \,e^{2}+6 a \,b^{2} d^{2} e -2 b^{3} d^{3}}-\frac {a^{2} A \,e^{2}-5 A a b d e -2 A \,b^{2} d^{2}+B \,a^{2} d e +5 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 ) \left (e x +d \right )^{2}}+\frac {3 b^{2} \ln \left (-e x -d \right ) A e}{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 b \ln \left (-e x -d \right ) B a e}{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 {b^{2} \ln \left (-e x -d \right ) 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 b^{2} \ln \left (b x +a \right ) A e}{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 b \ln \left (b x +a \right ) B a e}{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 {b^{2} \ln \left (b x +a \right ) 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}}\) \(613\)
parallelrisch \(-\frac {6 A \ln \left (b x +a \right ) x \,b^{4} d^{2} e^{3}-6 A \ln \left (e x +d \right ) x \,b^{4} d^{2} e^{3}-10 B \ln \left (b x +a \right ) x^{2} a \,b^{3} d \,e^{4}+10 B \ln \left (e x +d \right ) x^{2} a \,b^{3} d \,e^{4}+12 A \ln \left (b x +a \right ) x a \,b^{3} d \,e^{4}-12 A \ln \left (e x +d \right ) x a \,b^{3} d \,e^{4}-8 B \ln \left (b x +a \right ) x \,a^{2} b^{2} d \,e^{4}-8 B \ln \left (b x +a \right ) x a \,b^{3} d^{2} e^{3}+8 B \ln \left (e x +d \right ) x \,a^{2} b^{2} d \,e^{4}+8 B \ln \left (e x +d \right ) x a \,b^{3} d^{2} e^{3}+A \,a^{3} b \,e^{5}+2 A \,b^{4} d^{3} e^{2}-6 A \,a^{2} b^{2} d \,e^{4}+3 A a \,b^{3} d^{2} e^{3}+B \,a^{3} b d \,e^{4}+4 B \,a^{2} b^{2} d^{2} e^{3}-5 B a \,b^{3} d^{3} e^{2}-6 A \,x^{2} a \,b^{3} e^{5}+6 A \,x^{2} b^{4} d \,e^{4}+4 B \,x^{2} a^{2} b^{2} e^{5}-2 B \,x^{2} b^{4} d^{2} e^{3}-3 A x \,a^{2} b^{2} e^{5}+9 A x \,b^{4} d^{2} e^{3}+2 B x \,a^{3} b \,e^{5}-3 B x \,b^{4} d^{3} e^{2}+6 A \ln \left (b x +a \right ) x^{3} b^{4} e^{5}-6 A \ln \left (e x +d \right ) x^{3} b^{4} e^{5}-2 B \ln \left (b x +a \right ) x \,b^{4} d^{3} e^{2}+2 B \ln \left (e x +d \right ) x \,b^{4} d^{3} e^{2}+6 A \ln \left (b x +a \right ) a \,b^{3} d^{2} e^{3}-6 A \ln \left (e x +d \right ) a \,b^{3} d^{2} e^{3}-4 B \ln \left (b x +a \right ) a^{2} b^{2} d^{2} e^{3}-2 B \ln \left (b x +a \right ) a \,b^{3} d^{3} e^{2}+4 B \ln \left (e x +d \right ) a^{2} b^{2} d^{2} e^{3}+2 B \ln \left (e x +d \right ) a \,b^{3} d^{3} e^{2}+4 B \ln \left (e x +d \right ) x^{3} a \,b^{3} e^{5}+2 B \ln \left (e x +d \right ) x^{3} b^{4} d \,e^{4}+6 A \ln \left (b x +a \right ) x^{2} a \,b^{3} e^{5}+12 A \ln \left (b x +a \right ) x^{2} b^{4} d \,e^{4}-6 A \ln \left (e x +d \right ) x^{2} a \,b^{3} e^{5}-12 A \ln \left (e x +d \right ) x^{2} b^{4} d \,e^{4}-4 B \ln \left (b x +a \right ) x^{2} a^{2} b^{2} e^{5}-4 B \ln \left (b x +a \right ) x^{2} b^{4} d^{2} e^{3}-2 B \,x^{2} a \,b^{3} d \,e^{4}-6 A x a \,b^{3} d \,e^{4}+5 B x \,a^{2} b^{2} d \,e^{4}-4 B x a \,b^{3} d^{2} e^{3}+4 B \ln \left (e x +d \right ) x^{2} a^{2} b^{2} e^{5}+4 B \ln \left (e x +d \right ) x^{2} b^{4} d^{2} e^{3}-4 B \ln \left (b x +a \right ) x^{3} a \,b^{3} e^{5}-2 B \ln \left (b x +a \right ) x^{3} b^{4} d \,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 )^{2} \left (b x +a \right ) b \,e^{2}}\) \(942\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 801 vs. \(2 (154) = 308\).

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

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

Output:

-1/2*(A*a^3*e^3 - (5*B*a*b^2 - 2*A*b^3)*d^3 + (4*B*a^2*b + 3*A*a*b^2)*d^2* 
e + (B*a^3 - 6*A*a^2*b)*d*e^2 - 2*(B*b^3*d^2*e + (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 - (3*B*b^3*d^3 + (4*B*a*b^2 - 9*A*b^3) 
*d^2*e - (5*B*a^2*b - 6*A*a*b^2)*d*e^2 - (2*B*a^3 - 3*A*a^2*b)*e^3)*x - 2* 
(B*a*b^2*d^3 + (2*B*a^2*b - 3*A*a*b^2)*d^2*e + (B*b^3*d*e^2 + (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 - 6*A*b^3)*d*e^2 + (2*B*a 
^2*b - 3*A*a*b^2)*e^3)*x^2 + (B*b^3*d^3 + (4*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)*x)*log(b*x + a) + 2*(B*a*b^2*d^3 + (2*B*a^2 
*b - 3*A*a*b^2)*d^2*e + (B*b^3*d*e^2 + (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 - 6*A*b^3)*d*e^2 + (2*B*a^2*b - 3*A*a*b^2)*e^3)* 
x^2 + (B*b^3*d^3 + (4*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)*x)*log(e*x + d))/(a*b^4*d^6 - 4*a^2*b^3*d^5*e + 6*a^3*b^2*d^4*e^2 
- 4*a^4*b*d^3*e^3 + a^5*d^2*e^4 + (b^5*d^4*e^2 - 4*a*b^4*d^3*e^3 + 6*a^2*b 
^3*d^2*e^4 - 4*a^3*b^2*d*e^5 + a^4*b*e^6)*x^3 + (2*b^5*d^5*e - 7*a*b^4*d^4 
*e^2 + 8*a^2*b^3*d^3*e^3 - 2*a^3*b^2*d^2*e^4 - 2*a^4*b*d*e^5 + a^5*e^6)*x^ 
2 + (b^5*d^6 - 2*a*b^4*d^5*e - 2*a^2*b^3*d^4*e^2 + 8*a^3*b^2*d^3*e^3 - 7*a 
^4*b*d^2*e^4 + 2*a^5*d*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.98 (sec) , antiderivative size = 1066, normalized size of antiderivative = 6.79 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)^3} \, dx =\text {Too large to display} \] Input:

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 479 vs. \(2 (154) = 308\).

Time = 0.05 (sec) , antiderivative size = 479, normalized size of antiderivative = 3.05 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)^3} \, dx=\frac {{\left (B b^{2} d + {\left (2 \, B a b - 3 \, A b^{2}\right )} e\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 (B b^{2} d + {\left (2 \, B a b - 3 \, A b^{2}\right )} e\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 {A a^{2} e^{2} + {\left (5 \, B a b - 2 \, A b^{2}\right )} d^{2} + {\left (B a^{2} - 5 \, A a b\right )} d e + 2 \, {\left (B b^{2} d e + {\left (2 \, B a b - 3 \, A b^{2}\right )} e^{2}\right )} x^{2} + {\left (3 \, B b^{2} d^{2} + {\left (7 \, B a b - 9 \, A b^{2}\right )} d e + {\left (2 \, B a^{2} - 3 \, A a b\right )} e^{2}\right )} x}{2 \, {\left (a b^{3} d^{5} - 3 \, a^{2} b^{2} d^{4} e + 3 \, a^{3} b d^{3} e^{2} - a^{4} d^{2} e^{3} + {\left (b^{4} d^{3} e^{2} - 3 \, a b^{3} d^{2} e^{3} + 3 \, a^{2} b^{2} d e^{4} - a^{3} b e^{5}\right )} x^{3} + {\left (2 \, b^{4} d^{4} e - 5 \, a b^{3} d^{3} e^{2} + 3 \, a^{2} b^{2} d^{2} e^{3} + a^{3} b d e^{4} - a^{4} e^{5}\right )} x^{2} + {\left (b^{4} d^{5} - a b^{3} d^{4} e - 3 \, a^{2} b^{2} d^{3} e^{2} + 5 \, a^{3} b d^{2} e^{3} - 2 \, a^{4} d e^{4}\right )} x\right )}} \] Input:

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

Output:

(B*b^2*d + (2*B*a*b - 3*A*b^2)*e)*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) - (B*b^2*d + (2*B*a*b - 3*A*b 
^2)*e)*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*(A*a^2*e^2 + (5*B*a*b - 2*A*b^2)*d^2 + (B*a^2 - 5* 
A*a*b)*d*e + 2*(B*b^2*d*e + (2*B*a*b - 3*A*b^2)*e^2)*x^2 + (3*B*b^2*d^2 + 
(7*B*a*b - 9*A*b^2)*d*e + (2*B*a^2 - 3*A*a*b)*e^2)*x)/(a*b^3*d^5 - 3*a^2*b 
^2*d^4*e + 3*a^3*b*d^3*e^2 - a^4*d^2*e^3 + (b^4*d^3*e^2 - 3*a*b^3*d^2*e^3 
+ 3*a^2*b^2*d*e^4 - a^3*b*e^5)*x^3 + (2*b^4*d^4*e - 5*a*b^3*d^3*e^2 + 3*a^ 
2*b^2*d^2*e^3 + a^3*b*d*e^4 - a^4*e^5)*x^2 + (b^4*d^5 - a*b^3*d^4*e - 3*a^ 
2*b^2*d^3*e^2 + 5*a^3*b*d^2*e^3 - 2*a^4*d*e^4)*x)
 

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 1.20 (sec) , antiderivative size = 454, normalized size of antiderivative = 2.89 \[ \int \frac {A+B x}{(a+b x)^2 (d+e x)^3} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {\left (b^2\,\left (3\,A\,e-B\,d\right )-2\,B\,a\,b\,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\,b^2\,d-3\,A\,b^2\,e+2\,B\,a\,b\,e\right )}\right )\,\left (b^2\,\left (3\,A\,e-B\,d\right )-2\,B\,a\,b\,e\right )}{{\left (a\,e-b\,d\right )}^4}-\frac {\frac {B\,a^2\,d\,e+A\,a^2\,e^2+5\,B\,a\,b\,d^2-5\,A\,a\,b\,d\,e-2\,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 (a\,e+3\,b\,d\right )\,\left (2\,B\,a\,e-3\,A\,b\,e+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 (2\,B\,a\,e-3\,A\,b\,e+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 (b\,d^2+2\,a\,e\,d\right )+a\,d^2+x^2\,\left (a\,e^2+2\,b\,d\,e\right )+b\,e^2\,x^3} \] Input:

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

Output:

(2*atanh(((b^2*(3*A*e - B*d) - 2*B*a*b*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*b^2*d - 3*A*b^2*e + 2*B*a*b*e)))*(b^2*(3*A*e - B*d) - 2*B*a*b*e))/( 
a*e - b*d)^4 - ((A*a^2*e^2 - 2*A*b^2*d^2 + 5*B*a*b*d^2 + 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*(a*e 
+ 3*b*d)*(2*B*a*e - 3*A*b*e + 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*(2*B*a*e - 3*A*b*e + 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*(b*d^2 + 2*a*d*e) + a*d^2 + x^2* 
(a*e^2 + 2*b*d*e) + b*e^2*x^3)
 

Reduce [B] (verification not implemented)

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

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

Output:

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