\(\int (a+b x) (c+d x)^n (A+B x+C x^2+D x^3) \, dx\) [176]

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 226, 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 (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx\)

\(\Big \downarrow \) 2123

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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 [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(963\) vs. \(2(226)=452\).

Time = 0.42 (sec) , antiderivative size = 964, normalized size of antiderivative = 4.27

method result size
norman \(\frac {b D x^{5} {\mathrm e}^{n \ln \left (x d +c \right )}}{n +5}+\frac {c \left (A a \,d^{4} n^{4}+14 A a \,d^{4} n^{3}-A b c \,d^{3} n^{3}-B a c \,d^{3} n^{3}+71 A a \,d^{4} n^{2}-12 A b c \,d^{3} n^{2}-12 B a c \,d^{3} n^{2}+2 B b \,c^{2} d^{2} n^{2}+2 C a \,c^{2} d^{2} n^{2}+154 A a \,d^{4} n -47 A b c \,d^{3} n -47 B a c \,d^{3} n +18 B b \,c^{2} d^{2} n +18 C a \,c^{2} d^{2} n -6 C b \,c^{3} d n -6 D a \,c^{3} d n +120 A a \,d^{4}-60 A c \,d^{3} b -60 B c \,d^{3} a +40 B b \,c^{2} d^{2}+40 C a \,c^{2} d^{2}-30 C b \,c^{3} d -30 D a \,c^{3} d +24 D b \,c^{4}\right ) {\mathrm e}^{n \ln \left (x d +c \right )}}{d^{5} \left (n^{5}+15 n^{4}+85 n^{3}+225 n^{2}+274 n +120\right )}+\frac {\left (C b d n +a d D n +D b c n +5 C b d +5 D a d \right ) x^{4} {\mathrm e}^{n \ln \left (x d +c \right )}}{d \left (n^{2}+9 n +20\right )}+\frac {\left (B b \,d^{2} n^{2}+C a \,d^{2} n^{2}+C b c d \,n^{2}+D a c d \,n^{2}+9 B b \,d^{2} n +9 C a \,d^{2} n +5 C b c d n +5 D a c d n -4 D b \,c^{2} n +20 b B \,d^{2}+20 C a \,d^{2}\right ) x^{3} {\mathrm e}^{n \ln \left (x d +c \right )}}{d^{2} \left (n^{3}+12 n^{2}+47 n +60\right )}+\frac {\left (A b \,d^{3} n^{3}+B a \,d^{3} n^{3}+B b c \,d^{2} n^{3}+C a c \,d^{2} n^{3}+12 A b \,d^{3} n^{2}+12 B a \,d^{3} n^{2}+9 B b c \,d^{2} n^{2}+9 C a c \,d^{2} n^{2}-3 C b \,c^{2} d \,n^{2}-3 D a \,c^{2} d \,n^{2}+47 A b \,d^{3} n +47 B a \,d^{3} n +20 B b c \,d^{2} n +20 C a c \,d^{2} n -15 C b \,c^{2} d n -15 D a \,c^{2} d n +12 D b \,c^{3} n +60 A b \,d^{3}+60 B a \,d^{3}\right ) x^{2} {\mathrm e}^{n \ln \left (x d +c \right )}}{d^{3} \left (n^{4}+14 n^{3}+71 n^{2}+154 n +120\right )}+\frac {\left (A a \,d^{4} n^{4}+A b c \,d^{3} n^{4}+B a c \,d^{3} n^{4}+14 A a \,d^{4} n^{3}+12 A b c \,d^{3} n^{3}+12 B a c \,d^{3} n^{3}-2 B b \,c^{2} d^{2} n^{3}-2 C a \,c^{2} d^{2} n^{3}+71 A a \,d^{4} n^{2}+47 A b c \,d^{3} n^{2}+47 B a c \,d^{3} n^{2}-18 B b \,c^{2} d^{2} n^{2}-18 C a \,c^{2} d^{2} n^{2}+6 C b \,c^{3} d \,n^{2}+6 D a \,c^{3} d \,n^{2}+154 A a \,d^{4} n +60 A b c \,d^{3} n +60 B a c \,d^{3} n -40 B b \,c^{2} d^{2} n -40 C a \,c^{2} d^{2} n +30 C b \,c^{3} d n +30 D a \,c^{3} d n -24 D b \,c^{4} n +120 A a \,d^{4}\right ) x \,{\mathrm e}^{n \ln \left (x d +c \right )}}{d^{4} \left (n^{5}+15 n^{4}+85 n^{3}+225 n^{2}+274 n +120\right )}\) \(964\)
gosper \(\text {Expression too large to display}\) \(1039\)
orering \(\text {Expression too large to display}\) \(1042\)
parallelrisch \(\text {Expression too large to display}\) \(2317\)

Input:

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

Output:

b*D/(n+5)*x^5*exp(n*ln(d*x+c))+c*(A*a*d^4*n^4+14*A*a*d^4*n^3-A*b*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3-2*B*b*c^2*d^2*n^3-2*C*a*c^2*d^2*n^3+71*A*a*d^4*n^2+47*A*b*c*d^3*n^2+4 
7*B*a*c*d^3*n^2-18*B*b*c^2*d^2*n^2-18*C*a*c^2*d^2*n^2+6*C*b*c^3*d*n^2+6*D* 
a*c^3*d*n^2+154*A*a*d^4*n+60*A*b*c*d^3*n+60*B*a*c*d^3*n-40*B*b*c^2*d^2*n-4 
0*C*a*c^2*d^2*n+30*C*b*c^3*d*n+30*D*a*c^3*d*n-24*D*b*c^4*n+120*A*a*d^4)/d^ 
4/(n^5+15*n^4+85*n^3+225*n^2+274*n+120)*x*exp(n*ln(d*x+c))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 964 vs. \(2 (228) = 456\).

Time = 0.10 (sec) , antiderivative size = 964, normalized size of antiderivative = 4.27 \[ \int (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx =\text {Too large to display} \] Input:

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

Output:

(A*a*c*d^4*n^4 + 24*D*b*c^5 + 120*A*a*c*d^4 - 30*(D*a + C*b)*c^4*d + 40*(C 
*a + B*b)*c^3*d^2 - 60*(B*a + A*b)*c^2*d^3 + (D*b*d^5*n^4 + 10*D*b*d^5*n^3 
 + 35*D*b*d^5*n^2 + 50*D*b*d^5*n + 24*D*b*d^5)*x^5 + (30*(D*a + C*b)*d^5 + 
 (D*b*c*d^4 + (D*a + C*b)*d^5)*n^4 + (6*D*b*c*d^4 + 11*(D*a + C*b)*d^5)*n^ 
3 + (11*D*b*c*d^4 + 41*(D*a + C*b)*d^5)*n^2 + (6*D*b*c*d^4 + 61*(D*a + C*b 
)*d^5)*n)*x^4 + (14*A*a*c*d^4 - (B*a + A*b)*c^2*d^3)*n^3 + (40*(C*a + B*b) 
*d^5 + ((D*a + C*b)*c*d^4 + (C*a + B*b)*d^5)*n^4 - 4*(D*b*c^2*d^3 - 2*(D*a 
 + C*b)*c*d^4 - 3*(C*a + B*b)*d^5)*n^3 - (12*D*b*c^2*d^3 - 17*(D*a + C*b)* 
c*d^4 - 49*(C*a + B*b)*d^5)*n^2 - 2*(4*D*b*c^2*d^3 - 5*(D*a + C*b)*c*d^4 - 
 39*(C*a + B*b)*d^5)*n)*x^3 + (71*A*a*c*d^4 + 2*(C*a + B*b)*c^3*d^2 - 12*( 
B*a + A*b)*c^2*d^3)*n^2 + (60*(B*a + A*b)*d^5 + ((C*a + B*b)*c*d^4 + (B*a 
+ A*b)*d^5)*n^4 - (3*(D*a + C*b)*c^2*d^3 - 10*(C*a + B*b)*c*d^4 - 13*(B*a 
+ A*b)*d^5)*n^3 + (12*D*b*c^3*d^2 - 18*(D*a + C*b)*c^2*d^3 + 29*(C*a + B*b 
)*c*d^4 + 59*(B*a + A*b)*d^5)*n^2 + (12*D*b*c^3*d^2 - 15*(D*a + C*b)*c^2*d 
^3 + 20*(C*a + B*b)*c*d^4 + 107*(B*a + A*b)*d^5)*n)*x^2 + (154*A*a*c*d^4 - 
 6*(D*a + C*b)*c^4*d + 18*(C*a + B*b)*c^3*d^2 - 47*(B*a + A*b)*c^2*d^3)*n 
+ (120*A*a*d^5 + (A*a*d^5 + (B*a + A*b)*c*d^4)*n^4 + 2*(7*A*a*d^5 - (C*a + 
 B*b)*c^2*d^3 + 6*(B*a + A*b)*c*d^4)*n^3 + (71*A*a*d^5 + 6*(D*a + C*b)*c^3 
*d^2 - 18*(C*a + B*b)*c^2*d^3 + 47*(B*a + A*b)*c*d^4)*n^2 - 2*(12*D*b*c^4* 
d - 77*A*a*d^5 - 15*(D*a + C*b)*c^3*d^2 + 20*(C*a + B*b)*c^2*d^3 - 30*(...
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 13522 vs. \(2 (211) = 422\).

Time = 2.66 (sec) , antiderivative size = 13522, normalized size of antiderivative = 59.83 \[ \int (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\text {Too large to display} \] Input:

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

Output:

Piecewise((c**n*(A*a*x + A*b*x**2/2 + B*a*x**2/2 + B*b*x**3/3 + C*a*x**3/3 
 + C*b*x**4/4 + D*a*x**4/4 + D*b*x**5/5), Eq(d, 0)), (-3*A*a*d**4/(12*c**4 
*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x**4 
) - A*b*c*d**3/(12*c**4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d 
**8*x**3 + 12*d**9*x**4) - 4*A*b*d**4*x/(12*c**4*d**5 + 48*c**3*d**6*x + 7 
2*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x**4) - B*a*c*d**3/(12*c**4*d* 
*5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x**4) - 
 4*B*a*d**4*x/(12*c**4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d* 
*8*x**3 + 12*d**9*x**4) - B*b*c**2*d**2/(12*c**4*d**5 + 48*c**3*d**6*x + 7 
2*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x**4) - 4*B*b*c*d**3*x/(12*c** 
4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x** 
4) - 6*B*b*d**4*x**2/(12*c**4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 
48*c*d**8*x**3 + 12*d**9*x**4) - C*a*c**2*d**2/(12*c**4*d**5 + 48*c**3*d** 
6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x**4) - 4*C*a*c*d**3*x/ 
(12*c**4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d 
**9*x**4) - 6*C*a*d**4*x**2/(12*c**4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7* 
x**2 + 48*c*d**8*x**3 + 12*d**9*x**4) - 3*C*b*c**3*d/(12*c**4*d**5 + 48*c* 
*3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x**3 + 12*d**9*x**4) - 12*C*b*c* 
*2*d**2*x/(12*c**4*d**5 + 48*c**3*d**6*x + 72*c**2*d**7*x**2 + 48*c*d**8*x 
**3 + 12*d**9*x**4) - 18*C*b*c*d**3*x**2/(12*c**4*d**5 + 48*c**3*d**6*x...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 596 vs. \(2 (228) = 456\).

Time = 0.07 (sec) , antiderivative size = 596, normalized size of antiderivative = 2.64 \[ \int (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {{\left (d^{2} {\left (n + 1\right )} x^{2} + c d n x - c^{2}\right )} {\left (d x + c\right )}^{n} B a}{{\left (n^{2} + 3 \, n + 2\right )} d^{2}} + \frac {{\left (d^{2} {\left (n + 1\right )} x^{2} + c d n x - c^{2}\right )} {\left (d x + c\right )}^{n} A b}{{\left (n^{2} + 3 \, n + 2\right )} d^{2}} + \frac {{\left (d x + c\right )}^{n + 1} A a}{d {\left (n + 1\right )}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} d^{3} x^{3} + {\left (n^{2} + n\right )} c d^{2} x^{2} - 2 \, c^{2} d n x + 2 \, c^{3}\right )} {\left (d x + c\right )}^{n} C a}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{3}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} d^{3} x^{3} + {\left (n^{2} + n\right )} c d^{2} x^{2} - 2 \, c^{2} d n x + 2 \, c^{3}\right )} {\left (d x + c\right )}^{n} B b}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{3}} + \frac {{\left ({\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{4} x^{4} + {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} c d^{3} x^{3} - 3 \, {\left (n^{2} + n\right )} c^{2} d^{2} x^{2} + 6 \, c^{3} d n x - 6 \, c^{4}\right )} {\left (d x + c\right )}^{n} D a}{{\left (n^{4} + 10 \, n^{3} + 35 \, n^{2} + 50 \, n + 24\right )} d^{4}} + \frac {{\left ({\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} d^{4} x^{4} + {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} c d^{3} x^{3} - 3 \, {\left (n^{2} + n\right )} c^{2} d^{2} x^{2} + 6 \, c^{3} d n x - 6 \, c^{4}\right )} {\left (d x + c\right )}^{n} C b}{{\left (n^{4} + 10 \, n^{3} + 35 \, n^{2} + 50 \, n + 24\right )} d^{4}} + \frac {{\left ({\left (n^{4} + 10 \, n^{3} + 35 \, n^{2} + 50 \, n + 24\right )} d^{5} x^{5} + {\left (n^{4} + 6 \, n^{3} + 11 \, n^{2} + 6 \, n\right )} c d^{4} x^{4} - 4 \, {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} c^{2} d^{3} x^{3} + 12 \, {\left (n^{2} + n\right )} c^{3} d^{2} x^{2} - 24 \, c^{4} d n x + 24 \, c^{5}\right )} {\left (d x + c\right )}^{n} D b}{{\left (n^{5} + 15 \, n^{4} + 85 \, n^{3} + 225 \, n^{2} + 274 \, n + 120\right )} d^{5}} \] Input:

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

Output:

(d^2*(n + 1)*x^2 + c*d*n*x - c^2)*(d*x + c)^n*B*a/((n^2 + 3*n + 2)*d^2) + 
(d^2*(n + 1)*x^2 + c*d*n*x - c^2)*(d*x + c)^n*A*b/((n^2 + 3*n + 2)*d^2) + 
(d*x + c)^(n + 1)*A*a/(d*(n + 1)) + ((n^2 + 3*n + 2)*d^3*x^3 + (n^2 + n)*c 
*d^2*x^2 - 2*c^2*d*n*x + 2*c^3)*(d*x + c)^n*C*a/((n^3 + 6*n^2 + 11*n + 6)* 
d^3) + ((n^2 + 3*n + 2)*d^3*x^3 + (n^2 + n)*c*d^2*x^2 - 2*c^2*d*n*x + 2*c^ 
3)*(d*x + c)^n*B*b/((n^3 + 6*n^2 + 11*n + 6)*d^3) + ((n^3 + 6*n^2 + 11*n + 
 6)*d^4*x^4 + (n^3 + 3*n^2 + 2*n)*c*d^3*x^3 - 3*(n^2 + n)*c^2*d^2*x^2 + 6* 
c^3*d*n*x - 6*c^4)*(d*x + c)^n*D*a/((n^4 + 10*n^3 + 35*n^2 + 50*n + 24)*d^ 
4) + ((n^3 + 6*n^2 + 11*n + 6)*d^4*x^4 + (n^3 + 3*n^2 + 2*n)*c*d^3*x^3 - 3 
*(n^2 + n)*c^2*d^2*x^2 + 6*c^3*d*n*x - 6*c^4)*(d*x + c)^n*C*b/((n^4 + 10*n 
^3 + 35*n^2 + 50*n + 24)*d^4) + ((n^4 + 10*n^3 + 35*n^2 + 50*n + 24)*d^5*x 
^5 + (n^4 + 6*n^3 + 11*n^2 + 6*n)*c*d^4*x^4 - 4*(n^3 + 3*n^2 + 2*n)*c^2*d^ 
3*x^3 + 12*(n^2 + n)*c^3*d^2*x^2 - 24*c^4*d*n*x + 24*c^5)*(d*x + c)^n*D*b/ 
((n^5 + 15*n^4 + 85*n^3 + 225*n^2 + 274*n + 120)*d^5)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2224 vs. \(2 (228) = 456\).

Time = 0.15 (sec) , antiderivative size = 2224, normalized size of antiderivative = 9.84 \[ \int (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\text {Too large to display} \] Input:

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

Output:

((d*x + c)^n*D*b*d^5*n^4*x^5 + (d*x + c)^n*D*b*c*d^4*n^4*x^4 + (d*x + c)^n 
*D*a*d^5*n^4*x^4 + (d*x + c)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*a*c*d^4*n^2*x^3 + 17*(d*x + c)^n*C*b*c*d^4*n^2*x^3 + 49*(d*x + c)^n*C 
*a*d^5*n^2*x^3 + 49*(d*x + c)^n*B*b*d^5*n^2*x^3 + 6*(d*x + c)^n*D*b*c*d^4* 
n*x^4 + 61*(d*x + c)^n*D*a*d^5*n*x^4 + 61*(d*x + c)^n*C*b*d^5*n*x^4 + 24*( 
d*x + c)^n*D*b*d^5*x^5 + (d*x + c)^n*A*a*c*d^4*n^4 - 2*(d*x + c)^n*C*a*...
 

Mupad [F(-1)]

Timed out. \[ \int (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx=\int \left (a+b\,x\right )\,{\left (c+d\,x\right )}^n\,\left (A+B\,x+C\,x^2+x^3\,D\right ) \,d x \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 973, normalized size of antiderivative = 4.31 \[ \int (a+b x) (c+d x)^n \left (A+B x+C x^2+D x^3\right ) \, dx =\text {Too large to display} \] Input:

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

Output:

((c + d*x)**n*(a**2*c*d**3*n**4 + 14*a**2*c*d**3*n**3 + 71*a**2*c*d**3*n** 
2 + 154*a**2*c*d**3*n + 120*a**2*c*d**3 + a**2*d**4*n**4*x + 14*a**2*d**4* 
n**3*x + 71*a**2*d**4*n**2*x + 154*a**2*d**4*n*x + 120*a**2*d**4*x - 2*a*b 
*c**2*d**2*n**3 - 24*a*b*c**2*d**2*n**2 - 94*a*b*c**2*d**2*n - 120*a*b*c** 
2*d**2 + 2*a*b*c*d**3*n**4*x + 24*a*b*c*d**3*n**3*x + 94*a*b*c*d**3*n**2*x 
 + 120*a*b*c*d**3*n*x + 2*a*b*d**4*n**4*x**2 + 26*a*b*d**4*n**3*x**2 + 118 
*a*b*d**4*n**2*x**2 + 214*a*b*d**4*n*x**2 + 120*a*b*d**4*x**2 + 2*a*c**4*d 
*n**2 + 12*a*c**4*d*n + 10*a*c**4*d - 2*a*c**3*d**2*n**3*x - 12*a*c**3*d** 
2*n**2*x - 10*a*c**3*d**2*n*x + a*c**2*d**3*n**4*x**2 + 7*a*c**2*d**3*n**3 
*x**2 + 11*a*c**2*d**3*n**2*x**2 + 5*a*c**2*d**3*n*x**2 + 2*a*c*d**4*n**4* 
x**3 + 20*a*c*d**4*n**3*x**3 + 66*a*c*d**4*n**2*x**3 + 88*a*c*d**4*n*x**3 
+ 40*a*c*d**4*x**3 + a*d**5*n**4*x**4 + 11*a*d**5*n**3*x**4 + 41*a*d**5*n* 
*2*x**4 + 61*a*d**5*n*x**4 + 30*a*d**5*x**4 + 2*b**2*c**3*d*n**2 + 18*b**2 
*c**3*d*n + 40*b**2*c**3*d - 2*b**2*c**2*d**2*n**3*x - 18*b**2*c**2*d**2*n 
**2*x - 40*b**2*c**2*d**2*n*x + b**2*c*d**3*n**4*x**2 + 10*b**2*c*d**3*n** 
3*x**2 + 29*b**2*c*d**3*n**2*x**2 + 20*b**2*c*d**3*n*x**2 + b**2*d**4*n**4 
*x**3 + 12*b**2*d**4*n**3*x**3 + 49*b**2*d**4*n**2*x**3 + 78*b**2*d**4*n*x 
**3 + 40*b**2*d**4*x**3 - 6*b*c**5*n - 6*b*c**5 + 6*b*c**4*d*n**2*x + 6*b* 
c**4*d*n*x - 3*b*c**3*d**2*n**3*x**2 - 6*b*c**3*d**2*n**2*x**2 - 3*b*c**3* 
d**2*n*x**2 + b*c**2*d**3*n**4*x**3 + 4*b*c**2*d**3*n**3*x**3 + 5*b*c**...