\(\int \frac {(c+d x) (A+B x+C x^2+D x^3)}{(a+b x)^3} \, dx\) [7]

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

Optimal result

Integrand size = 28, antiderivative size = 176 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=\frac {(b C d+b c D-3 a d D) x}{b^4}+\frac {d D x^2}{2 b^3}-\frac {(b c-a d) \left (A b^3-a \left (b^2 B-a b C+a^2 D\right )\right )}{2 b^5 (a+b x)^2}-\frac {b^3 (B c+A d)-2 a b^2 (c C+B d)-4 a^3 d D+3 a^2 b (C d+c D)}{b^5 (a+b x)}+\frac {\left (b^2 (c C+B d)+6 a^2 d D-3 a b (C d+c D)\right ) \log (a+b x)}{b^5} \] Output:

(C*b*d-3*D*a*d+D*b*c)*x/b^4+1/2*d*D*x^2/b^3-1/2*(-a*d+b*c)*(A*b^3-a*(B*b^2 
-C*a*b+D*a^2))/b^5/(b*x+a)^2-(b^3*(A*d+B*c)-2*a*b^2*(B*d+C*c)-4*a^3*d*D+3* 
a^2*b*(C*d+D*c))/b^5/(b*x+a)+(b^2*(B*d+C*c)+6*a^2*d*D-3*a*b*(C*d+D*c))*ln( 
b*x+a)/b^5
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.96 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=\frac {2 b (b C d+b c D-3 a d D) x+b^2 d D x^2-\frac {(b c-a d) \left (A b^3-a \left (b^2 B-a b C+a^2 D\right )\right )}{(a+b x)^2}+\frac {-2 b^3 (B c+A d)+4 a b^2 (c C+B d)+8 a^3 d D-6 a^2 b (C d+c D)}{a+b x}+2 \left (b^2 (c C+B d)+6 a^2 d D-3 a b (C d+c D)\right ) \log (a+b x)}{2 b^5} \] Input:

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

Output:

(2*b*(b*C*d + b*c*D - 3*a*d*D)*x + b^2*d*D*x^2 - ((b*c - a*d)*(A*b^3 - a*( 
b^2*B - a*b*C + a^2*D)))/(a + b*x)^2 + (-2*b^3*(B*c + A*d) + 4*a*b^2*(c*C 
+ B*d) + 8*a^3*d*D - 6*a^2*b*(C*d + c*D))/(a + b*x) + 2*(b^2*(c*C + B*d) + 
 6*a^2*d*D - 3*a*b*(C*d + c*D))*Log[a + b*x])/(2*b^5)
 

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 176, 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.071, Rules used = {2123, 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 {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx\)

\(\Big \downarrow \) 2123

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {(b c-a d) \left (A b^3-a \left (a^2 D-a b C+b^2 B\right )\right )}{2 b^5 (a+b x)^2}+\frac {\log (a+b x) \left (6 a^2 d D-3 a b (c D+C d)+b^2 (B d+c C)\right )}{b^5}-\frac {-4 a^3 d D+3 a^2 b (c D+C d)-2 a b^2 (B d+c C)+b^3 (A d+B c)}{b^5 (a+b x)}+\frac {x (-3 a d D+b c D+b C d)}{b^4}+\frac {d D x^2}{2 b^3}\)

Input:

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

Output:

((b*C*d + b*c*D - 3*a*d*D)*x)/b^4 + (d*D*x^2)/(2*b^3) - ((b*c - a*d)*(A*b^ 
3 - a*(b^2*B - a*b*C + a^2*D)))/(2*b^5*(a + b*x)^2) - (b^3*(B*c + A*d) - 2 
*a*b^2*(c*C + B*d) - 4*a^3*d*D + 3*a^2*b*(C*d + c*D))/(b^5*(a + b*x)) + (( 
b^2*(c*C + B*d) + 6*a^2*d*D - 3*a*b*(C*d + c*D))*Log[a + b*x])/b^5
 

Defintions of rubi rules used

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

rule 2123
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] 
:> Int[ExpandIntegrand[Px*(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c 
, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2])
 
Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.20

method result size
norman \(\frac {\frac {\left (C b d -2 D a d +D b c \right ) x^{3}}{b^{2}}-\frac {A a \,b^{3} d +A \,b^{4} c -3 B \,a^{2} b^{2} d +B a \,b^{3} c +9 C \,a^{3} b d -3 C \,a^{2} b^{2} c -18 D a^{4} d +9 D a^{3} b c}{2 b^{5}}-\frac {\left (b^{3} d A -2 B a \,b^{2} d +B \,b^{3} c +6 C \,a^{2} b d -2 a \,b^{2} c C -12 a^{3} d D+6 a^{2} b c D\right ) x}{b^{4}}+\frac {d D x^{4}}{2 b}}{\left (b x +a \right )^{2}}+\frac {\left (b^{2} B d -3 C a b d +C \,b^{2} c +6 a^{2} d D-3 D a b c \right ) \ln \left (b x +a \right )}{b^{5}}\) \(211\)
default \(\frac {\frac {1}{2} d D x^{2} b +C b d x -3 D a d x +D b c x}{b^{4}}-\frac {-A a \,b^{3} d +A \,b^{4} c +B \,a^{2} b^{2} d -B a \,b^{3} c -C \,a^{3} b d +C \,a^{2} b^{2} c +D a^{4} d -D a^{3} b c}{2 b^{5} \left (b x +a \right )^{2}}-\frac {b^{3} d A -2 B a \,b^{2} d +B \,b^{3} c +3 C \,a^{2} b d -2 a \,b^{2} c C -4 a^{3} d D+3 a^{2} b c D}{b^{5} \left (b x +a \right )}+\frac {\left (b^{2} B d -3 C a b d +C \,b^{2} c +6 a^{2} d D-3 D a b c \right ) \ln \left (b x +a \right )}{b^{5}}\) \(212\)
parallelrisch \(-\frac {6 D \ln \left (b x +a \right ) a^{3} b c +4 D x^{3} a \,b^{3} d -18 D a^{4} d -2 B \ln \left (b x +a \right ) a^{2} b^{2} d -4 B x a \,b^{3} d +12 C x \,a^{2} b^{2} d -4 C x a \,b^{3} c -24 D x \,a^{3} b d +12 D x \,a^{2} b^{2} c +6 C \ln \left (b x +a \right ) a^{3} b d -2 C \ln \left (b x +a \right ) a^{2} b^{2} c -12 D \ln \left (b x +a \right ) x^{2} a^{2} b^{2} d +6 D \ln \left (b x +a \right ) x^{2} a \,b^{3} c +A a \,b^{3} d -2 C \ln \left (b x +a \right ) x^{2} b^{4} c +12 D \ln \left (b x +a \right ) x \,a^{2} b^{2} c -3 C \,a^{2} b^{2} c -2 B \ln \left (b x +a \right ) x^{2} b^{4} d -2 C \,x^{3} b^{4} d -2 D x^{3} b^{4} c +2 A x \,b^{4} d +2 B x \,b^{4} c -12 D \ln \left (b x +a \right ) a^{4} d -d D x^{4} b^{4}+9 C \,a^{3} b d +6 C \ln \left (b x +a \right ) x^{2} a \,b^{3} d -24 D \ln \left (b x +a \right ) x \,a^{3} b d -4 B \ln \left (b x +a \right ) x a \,b^{3} d +12 C \ln \left (b x +a \right ) x \,a^{2} b^{2} d -4 C \ln \left (b x +a \right ) x a \,b^{3} c +9 D a^{3} b c +B a \,b^{3} c -3 B \,a^{2} b^{2} d +A \,b^{4} c}{2 b^{5} \left (b x +a \right )^{2}}\) \(420\)

Input:

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

Output:

((C*b*d-2*D*a*d+D*b*c)/b^2*x^3-1/2*(A*a*b^3*d+A*b^4*c-3*B*a^2*b^2*d+B*a*b^ 
3*c+9*C*a^3*b*d-3*C*a^2*b^2*c-18*D*a^4*d+9*D*a^3*b*c)/b^5-(A*b^3*d-2*B*a*b 
^2*d+B*b^3*c+6*C*a^2*b*d-2*C*a*b^2*c-12*D*a^3*d+6*D*a^2*b*c)/b^4*x+1/2*d*D 
*x^4/b)/(b*x+a)^2+1/b^5*(B*b^2*d-3*C*a*b*d+C*b^2*c+6*D*a^2*d-3*D*a*b*c)*ln 
(b*x+a)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 369 vs. \(2 (172) = 344\).

Time = 0.08 (sec) , antiderivative size = 369, normalized size of antiderivative = 2.10 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=\frac {D b^{4} d x^{4} + 2 \, {\left (D b^{4} c - {\left (2 \, D a b^{3} - C b^{4}\right )} d\right )} x^{3} + {\left (4 \, D a b^{3} c - {\left (11 \, D a^{2} b^{2} - 4 \, C a b^{3}\right )} d\right )} x^{2} - {\left (5 \, D a^{3} b - 3 \, C a^{2} b^{2} + B a b^{3} + A b^{4}\right )} c + {\left (7 \, D a^{4} - 5 \, C a^{3} b + 3 \, B a^{2} b^{2} - A a b^{3}\right )} d - 2 \, {\left ({\left (2 \, D a^{2} b^{2} - 2 \, C a b^{3} + B b^{4}\right )} c - {\left (D a^{3} b - 2 \, C a^{2} b^{2} + 2 \, B a b^{3} - A b^{4}\right )} d\right )} x - 2 \, {\left ({\left ({\left (3 \, D a b^{3} - C b^{4}\right )} c - {\left (6 \, D a^{2} b^{2} - 3 \, C a b^{3} + B b^{4}\right )} d\right )} x^{2} + {\left (3 \, D a^{3} b - C a^{2} b^{2}\right )} c - {\left (6 \, D a^{4} - 3 \, C a^{3} b + B a^{2} b^{2}\right )} d + 2 \, {\left ({\left (3 \, D a^{2} b^{2} - C a b^{3}\right )} c - {\left (6 \, D a^{3} b - 3 \, C a^{2} b^{2} + B a b^{3}\right )} d\right )} x\right )} \log \left (b x + a\right )}{2 \, {\left (b^{7} x^{2} + 2 \, a b^{6} x + a^{2} b^{5}\right )}} \] Input:

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

Output:

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

Sympy [A] (verification not implemented)

Time = 5.45 (sec) , antiderivative size = 260, normalized size of antiderivative = 1.48 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=\frac {D d x^{2}}{2 b^{3}} + x \left (\frac {C d}{b^{3}} - \frac {3 D a d}{b^{4}} + \frac {D c}{b^{3}}\right ) + \frac {- A a b^{3} d - A b^{4} c + 3 B a^{2} b^{2} d - B a b^{3} c - 5 C a^{3} b d + 3 C a^{2} b^{2} c + 7 D a^{4} d - 5 D a^{3} b c + x \left (- 2 A b^{4} d + 4 B a b^{3} d - 2 B b^{4} c - 6 C a^{2} b^{2} d + 4 C a b^{3} c + 8 D a^{3} b d - 6 D a^{2} b^{2} c\right )}{2 a^{2} b^{5} + 4 a b^{6} x + 2 b^{7} x^{2}} + \frac {\left (B b^{2} d - 3 C a b d + C b^{2} c + 6 D a^{2} d - 3 D a b c\right ) \log {\left (a + b x \right )}}{b^{5}} \] Input:

integrate((d*x+c)*(D*x**3+C*x**2+B*x+A)/(b*x+a)**3,x)
 

Output:

D*d*x**2/(2*b**3) + x*(C*d/b**3 - 3*D*a*d/b**4 + D*c/b**3) + (-A*a*b**3*d 
- A*b**4*c + 3*B*a**2*b**2*d - B*a*b**3*c - 5*C*a**3*b*d + 3*C*a**2*b**2*c 
 + 7*D*a**4*d - 5*D*a**3*b*c + x*(-2*A*b**4*d + 4*B*a*b**3*d - 2*B*b**4*c 
- 6*C*a**2*b**2*d + 4*C*a*b**3*c + 8*D*a**3*b*d - 6*D*a**2*b**2*c))/(2*a** 
2*b**5 + 4*a*b**6*x + 2*b**7*x**2) + (B*b**2*d - 3*C*a*b*d + C*b**2*c + 6* 
D*a**2*d - 3*D*a*b*c)*log(a + b*x)/b**5
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.31 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=-\frac {{\left (5 \, D a^{3} b - 3 \, C a^{2} b^{2} + B a b^{3} + A b^{4}\right )} c - {\left (7 \, D a^{4} - 5 \, C a^{3} b + 3 \, B a^{2} b^{2} - A a b^{3}\right )} d + 2 \, {\left ({\left (3 \, D a^{2} b^{2} - 2 \, C a b^{3} + B b^{4}\right )} c - {\left (4 \, D a^{3} b - 3 \, C a^{2} b^{2} + 2 \, B a b^{3} - A b^{4}\right )} d\right )} x}{2 \, {\left (b^{7} x^{2} + 2 \, a b^{6} x + a^{2} b^{5}\right )}} + \frac {D b d x^{2} + 2 \, {\left (D b c - {\left (3 \, D a - C b\right )} d\right )} x}{2 \, b^{4}} - \frac {{\left ({\left (3 \, D a b - C b^{2}\right )} c - {\left (6 \, D a^{2} - 3 \, C a b + B b^{2}\right )} d\right )} \log \left (b x + a\right )}{b^{5}} \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.27 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=-\frac {{\left (3 \, D a b c - C b^{2} c - 6 \, D a^{2} d + 3 \, C a b d - B b^{2} d\right )} \log \left ({\left | b x + a \right |}\right )}{b^{5}} + \frac {D b^{3} d x^{2} + 2 \, D b^{3} c x - 6 \, D a b^{2} d x + 2 \, C b^{3} d x}{2 \, b^{6}} - \frac {5 \, D a^{3} b c - 3 \, C a^{2} b^{2} c + B a b^{3} c + A b^{4} c - 7 \, D a^{4} d + 5 \, C a^{3} b d - 3 \, B a^{2} b^{2} d + A a b^{3} d + 2 \, {\left (3 \, D a^{2} b^{2} c - 2 \, C a b^{3} c + B b^{4} c - 4 \, D a^{3} b d + 3 \, C a^{2} b^{2} d - 2 \, B a b^{3} d + A b^{4} d\right )} x}{2 \, {\left (b x + a\right )}^{2} b^{5}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 4.41 (sec) , antiderivative size = 346, normalized size of antiderivative = 1.97 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=\frac {\frac {3\,B\,a^2\,d}{2\,b^3}+\frac {2\,B\,a\,d\,x}{b^2}}{a^2+2\,a\,b\,x+b^2\,x^2}-\frac {\frac {B\,a\,c}{2\,b^2}+\frac {B\,c\,x}{b}}{a^2+2\,a\,b\,x+b^2\,x^2}-\frac {\frac {A\,a\,d}{2\,b^2}+\frac {A\,d\,x}{b}}{a^2+2\,a\,b\,x+b^2\,x^2}+\frac {\frac {3\,C\,a^2\,c}{2\,b^3}+\frac {2\,C\,a\,c\,x}{b^2}}{a^2+2\,a\,b\,x+b^2\,x^2}+\frac {B\,d\,\ln \left (a+b\,x\right )}{b^3}+\frac {C\,c\,\ln \left (a+b\,x\right )}{b^3}+\frac {d\,D\,\left (\frac {{\left (a+b\,x\right )}^2}{2}+\frac {4\,a^3}{a+b\,x}-\frac {a^4}{2\,{\left (a+b\,x\right )}^2}+6\,a^2\,\ln \left (a+b\,x\right )-4\,a\,b\,x\right )}{b^5}-\frac {C\,d\,\left (3\,a\,\ln \left (a+b\,x\right )-b\,x+\frac {3\,a^2}{a+b\,x}-\frac {a^3}{2\,{\left (a+b\,x\right )}^2}\right )}{b^4}-\frac {A\,c}{2\,b\,\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}-\frac {c\,D\,\left (3\,a\,\ln \left (a+b\,x\right )-b\,x+\frac {3\,a^2}{a+b\,x}-\frac {a^3}{2\,{\left (a+b\,x\right )}^2}\right )}{b^4} \] Input:

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

Output:

((3*B*a^2*d)/(2*b^3) + (2*B*a*d*x)/b^2)/(a^2 + b^2*x^2 + 2*a*b*x) - ((B*a* 
c)/(2*b^2) + (B*c*x)/b)/(a^2 + b^2*x^2 + 2*a*b*x) - ((A*a*d)/(2*b^2) + (A* 
d*x)/b)/(a^2 + b^2*x^2 + 2*a*b*x) + ((3*C*a^2*c)/(2*b^3) + (2*C*a*c*x)/b^2 
)/(a^2 + b^2*x^2 + 2*a*b*x) + (B*d*log(a + b*x))/b^3 + (C*c*log(a + b*x))/ 
b^3 + (d*D*((a + b*x)^2/2 + (4*a^3)/(a + b*x) - a^4/(2*(a + b*x)^2) + 6*a^ 
2*log(a + b*x) - 4*a*b*x))/b^5 - (C*d*(3*a*log(a + b*x) - b*x + (3*a^2)/(a 
 + b*x) - a^3/(2*(a + b*x)^2)))/b^4 - (A*c)/(2*b*(a^2 + b^2*x^2 + 2*a*b*x) 
) - (c*D*(3*a*log(a + b*x) - b*x + (3*a^2)/(a + b*x) - a^3/(2*(a + b*x)^2) 
))/b^4
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 363, normalized size of antiderivative = 2.06 \[ \int \frac {(c+d x) \left (A+B x+C x^2+D x^3\right )}{(a+b x)^3} \, dx=\frac {12 \,\mathrm {log}\left (b x +a \right ) a^{5} d^{2}+6 a^{5} d^{2}-12 \,\mathrm {log}\left (b x +a \right ) a^{4} b c d +24 \,\mathrm {log}\left (b x +a \right ) a^{4} b \,d^{2} x +12 \,\mathrm {log}\left (b x +a \right ) a^{3} b^{2} d^{2} x^{2}+4 \,\mathrm {log}\left (b x +a \right ) a^{2} b^{4} d x +4 \,\mathrm {log}\left (b x +a \right ) a^{2} b^{3} c^{2} x +2 \,\mathrm {log}\left (b x +a \right ) a \,b^{5} d \,x^{2}+2 \,\mathrm {log}\left (b x +a \right ) a \,b^{4} c^{2} x^{2}+12 a^{2} b^{3} c d \,x^{2}+4 a \,b^{4} c d \,x^{3}-24 \,\mathrm {log}\left (b x +a \right ) a^{3} b^{2} c d x -12 \,\mathrm {log}\left (b x +a \right ) a^{2} b^{3} c d \,x^{2}+a^{3} b^{3} d +a^{3} b^{2} c^{2}-a^{2} b^{4} c -a \,b^{5} d \,x^{2}+a \,b^{4} d^{2} x^{4}+b^{6} c \,x^{2}+2 \,\mathrm {log}\left (b x +a \right ) a^{3} b^{3} d +2 \,\mathrm {log}\left (b x +a \right ) a^{3} b^{2} c^{2}-6 a^{4} b c d -12 a^{3} b^{2} d^{2} x^{2}-4 a^{2} b^{3} d^{2} x^{3}-2 a \,b^{4} c^{2} x^{2}}{2 a \,b^{5} \left (b^{2} x^{2}+2 a b x +a^{2}\right )} \] Input:

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

Output:

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