Integrand size = 30, antiderivative size = 307 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {(b c-a d)^2 \left (A b^3-a \left (b^2 B-a b C+a^2 D\right )\right ) (a+b x)^3}{3 b^6}+\frac {(b c-a d) \left (b^3 (B c+2 A d)-a b^2 (2 c C+3 B d)-5 a^3 d D+a^2 b (4 C d+3 c D)\right ) (a+b x)^4}{4 b^6}+\frac {\left (b^3 \left (c^2 C+2 B c d+A d^2\right )-10 a^3 d^2 D+6 a^2 b d (C d+2 c D)-3 a b^2 \left (2 c C d+B d^2+c^2 D\right )\right ) (a+b x)^5}{5 b^6}+\frac {\left (10 a^2 d^2 D-4 a b d (C d+2 c D)+b^2 \left (2 c C d+B d^2+c^2 D\right )\right ) (a+b x)^6}{6 b^6}+\frac {d (b C d+2 b c D-5 a d D) (a+b x)^7}{7 b^6}+\frac {d^2 D (a+b x)^8}{8 b^6} \] Output:
1/3*(-a*d+b*c)^2*(A*b^3-a*(B*b^2-C*a*b+D*a^2))*(b*x+a)^3/b^6+1/4*(-a*d+b*c )*(b^3*(2*A*d+B*c)-a*b^2*(3*B*d+2*C*c)-5*a^3*d*D+a^2*b*(4*C*d+3*D*c))*(b*x +a)^4/b^6+1/5*(b^3*(A*d^2+2*B*c*d+C*c^2)-10*a^3*d^2*D+6*a^2*b*d*(C*d+2*D*c )-3*a*b^2*(B*d^2+2*C*c*d+D*c^2))*(b*x+a)^5/b^6+1/6*(10*a^2*d^2*D-4*a*b*d*( C*d+2*D*c)+b^2*(B*d^2+2*C*c*d+D*c^2))*(b*x+a)^6/b^6+1/7*d*(C*b*d-5*D*a*d+2 *D*b*c)*(b*x+a)^7/b^6+1/8*d^2*D*(b*x+a)^8/b^6
Time = 0.07 (sec) , antiderivative size = 292, normalized size of antiderivative = 0.95 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=a^2 A c^2 x+\frac {1}{2} a c (a B c+2 A (b c+a d)) x^2+\frac {1}{3} \left (a c (2 b B c+a c C+2 a B d)+A \left (b^2 c^2+4 a b c d+a^2 d^2\right )\right ) x^3+\frac {1}{4} \left (b^2 c (B c+2 A d)+2 a b \left (c^2 C+2 B c d+A d^2\right )+a^2 \left (2 c C d+B d^2+c^2 D\right )\right ) x^4+\frac {1}{5} \left (b^2 \left (c^2 C+2 B c d+A d^2\right )+a^2 d (C d+2 c D)+2 a b \left (2 c C d+B d^2+c^2 D\right )\right ) x^5+\frac {1}{6} \left (a^2 d^2 D+2 a b d (C d+2 c D)+b^2 \left (2 c C d+B d^2+c^2 D\right )\right ) x^6+\frac {1}{7} b d (b C d+2 b c D+2 a d D) x^7+\frac {1}{8} b^2 d^2 D x^8 \] Input:
Integrate[(a + b*x)^2*(c + d*x)^2*(A + B*x + C*x^2 + D*x^3),x]
Output:
a^2*A*c^2*x + (a*c*(a*B*c + 2*A*(b*c + a*d))*x^2)/2 + ((a*c*(2*b*B*c + a*c *C + 2*a*B*d) + A*(b^2*c^2 + 4*a*b*c*d + a^2*d^2))*x^3)/3 + ((b^2*c*(B*c + 2*A*d) + 2*a*b*(c^2*C + 2*B*c*d + A*d^2) + a^2*(2*c*C*d + B*d^2 + c^2*D)) *x^4)/4 + ((b^2*(c^2*C + 2*B*c*d + A*d^2) + a^2*d*(C*d + 2*c*D) + 2*a*b*(2 *c*C*d + B*d^2 + c^2*D))*x^5)/5 + ((a^2*d^2*D + 2*a*b*d*(C*d + 2*c*D) + b^ 2*(2*c*C*d + B*d^2 + c^2*D))*x^6)/6 + (b*d*(b*C*d + 2*b*c*D + 2*a*d*D)*x^7 )/7 + (b^2*d^2*D*x^8)/8
Time = 0.71 (sec) , antiderivative size = 307, 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.067, 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)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx\) |
\(\Big \downarrow \) 2123 |
\(\displaystyle \int \left (\frac {(a+b x)^2 (b c-a d)^2 \left (A b^3-a \left (a^2 D-a b C+b^2 B\right )\right )}{b^5}+\frac {(a+b x)^5 \left (10 a^2 d^2 D-4 a b d (2 c D+C d)+b^2 \left (B d^2+c^2 D+2 c C d\right )\right )}{b^5}+\frac {(a+b x)^4 \left (-10 a^3 d^2 D+6 a^2 b d (2 c D+C d)-3 a b^2 \left (B d^2+c^2 D+2 c C d\right )+b^3 \left (A d^2+2 B c d+c^2 C\right )\right )}{b^5}+\frac {(a+b x)^3 (b c-a d) \left (-5 a^3 d D+a^2 b (3 c D+4 C d)-a b^2 (3 B d+2 c C)+b^3 (2 A d+B c)\right )}{b^5}+\frac {d (a+b x)^6 (-5 a d D+2 b c D+b C d)}{b^5}+\frac {d^2 D (a+b x)^7}{b^5}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(a+b x)^3 (b c-a d)^2 \left (A b^3-a \left (a^2 D-a b C+b^2 B\right )\right )}{3 b^6}+\frac {(a+b x)^6 \left (10 a^2 d^2 D-4 a b d (2 c D+C d)+b^2 \left (B d^2+c^2 D+2 c C d\right )\right )}{6 b^6}+\frac {(a+b x)^5 \left (-10 a^3 d^2 D+6 a^2 b d (2 c D+C d)-3 a b^2 \left (B d^2+c^2 D+2 c C d\right )+b^3 \left (A d^2+2 B c d+c^2 C\right )\right )}{5 b^6}+\frac {(a+b x)^4 (b c-a d) \left (-5 a^3 d D+a^2 b (3 c D+4 C d)-a b^2 (3 B d+2 c C)+b^3 (2 A d+B c)\right )}{4 b^6}+\frac {d (a+b x)^7 (-5 a d D+2 b c D+b C d)}{7 b^6}+\frac {d^2 D (a+b x)^8}{8 b^6}\) |
Input:
Int[(a + b*x)^2*(c + d*x)^2*(A + B*x + C*x^2 + D*x^3),x]
Output:
((b*c - a*d)^2*(A*b^3 - a*(b^2*B - a*b*C + a^2*D))*(a + b*x)^3)/(3*b^6) + ((b*c - a*d)*(b^3*(B*c + 2*A*d) - a*b^2*(2*c*C + 3*B*d) - 5*a^3*d*D + a^2* b*(4*C*d + 3*c*D))*(a + b*x)^4)/(4*b^6) + ((b^3*(c^2*C + 2*B*c*d + A*d^2) - 10*a^3*d^2*D + 6*a^2*b*d*(C*d + 2*c*D) - 3*a*b^2*(2*c*C*d + B*d^2 + c^2* D))*(a + b*x)^5)/(5*b^6) + ((10*a^2*d^2*D - 4*a*b*d*(C*d + 2*c*D) + b^2*(2 *c*C*d + B*d^2 + c^2*D))*(a + b*x)^6)/(6*b^6) + (d*(b*C*d + 2*b*c*D - 5*a* d*D)*(a + b*x)^7)/(7*b^6) + (d^2*D*(a + b*x)^8)/(8*b^6)
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])
Time = 0.27 (sec) , antiderivative size = 332, normalized size of antiderivative = 1.08
method | result | size |
norman | \(\frac {b^{2} d^{2} D x^{8}}{8}+\left (\frac {1}{7} b^{2} d^{2} C +\frac {2}{7} D a b \,d^{2}+\frac {2}{7} D b^{2} c d \right ) x^{7}+\left (\frac {1}{6} b^{2} B \,d^{2}+\frac {1}{3} C a b \,d^{2}+\frac {1}{3} C \,b^{2} c d +\frac {1}{6} a^{2} d^{2} D+\frac {2}{3} D a b c d +\frac {1}{6} D b^{2} c^{2}\right ) x^{6}+\left (\frac {1}{5} A \,b^{2} d^{2}+\frac {2}{5} B a b \,d^{2}+\frac {2}{5} B \,b^{2} c d +\frac {1}{5} C \,a^{2} d^{2}+\frac {4}{5} C a b c d +\frac {1}{5} C \,b^{2} c^{2}+\frac {2}{5} D a^{2} c d +\frac {2}{5} D a b \,c^{2}\right ) x^{5}+\left (\frac {1}{2} A a b \,d^{2}+\frac {1}{2} A \,b^{2} c d +\frac {1}{4} B \,a^{2} d^{2}+B a b c d +\frac {1}{4} B \,b^{2} c^{2}+\frac {1}{2} C \,a^{2} c d +\frac {1}{2} C a b \,c^{2}+\frac {1}{4} a^{2} c^{2} D\right ) x^{4}+\left (\frac {1}{3} A \,a^{2} d^{2}+\frac {4}{3} A a b c d +\frac {1}{3} A \,b^{2} c^{2}+\frac {2}{3} B \,a^{2} c d +\frac {2}{3} B a b \,c^{2}+\frac {1}{3} a^{2} c^{2} C \right ) x^{3}+\left (A \,a^{2} c d +A a b \,c^{2}+\frac {1}{2} a^{2} c^{2} B \right ) x^{2}+a^{2} c^{2} A x\) | \(332\) |
default | \(\frac {b^{2} d^{2} D x^{8}}{8}+\frac {\left (\left (2 a b \,d^{2}+2 b^{2} c d \right ) D+b^{2} d^{2} C \right ) x^{7}}{7}+\frac {\left (\left (a^{2} d^{2}+4 a b c d +b^{2} c^{2}\right ) D+\left (2 a b \,d^{2}+2 b^{2} c d \right ) C +b^{2} B \,d^{2}\right ) x^{6}}{6}+\frac {\left (\left (2 a^{2} c d +2 b \,c^{2} a \right ) D+\left (a^{2} d^{2}+4 a b c d +b^{2} c^{2}\right ) C +\left (2 a b \,d^{2}+2 b^{2} c d \right ) B +A \,b^{2} d^{2}\right ) x^{5}}{5}+\frac {\left (a^{2} c^{2} D+\left (2 a^{2} c d +2 b \,c^{2} a \right ) C +\left (a^{2} d^{2}+4 a b c d +b^{2} c^{2}\right ) B +\left (2 a b \,d^{2}+2 b^{2} c d \right ) A \right ) x^{4}}{4}+\frac {\left (a^{2} c^{2} C +\left (2 a^{2} c d +2 b \,c^{2} a \right ) B +\left (a^{2} d^{2}+4 a b c d +b^{2} c^{2}\right ) A \right ) x^{3}}{3}+\frac {\left (a^{2} c^{2} B +\left (2 a^{2} c d +2 b \,c^{2} a \right ) A \right ) x^{2}}{2}+a^{2} c^{2} A x\) | \(335\) |
gosper | \(\frac {2}{7} x^{7} D b^{2} c d +\frac {1}{4} x^{4} a^{2} c^{2} D+\frac {1}{3} x^{3} A \,a^{2} d^{2}+\frac {1}{3} x^{3} A \,b^{2} c^{2}+\frac {1}{7} x^{7} b^{2} d^{2} C +\frac {1}{6} x^{6} b^{2} B \,d^{2}+a^{2} c^{2} A x +\frac {1}{8} b^{2} d^{2} D x^{8}+x^{2} A a b \,c^{2}+x^{2} A \,a^{2} c d +\frac {1}{2} x^{4} C a b \,c^{2}+\frac {2}{3} x^{3} B \,a^{2} c d +\frac {2}{3} x^{3} B a b \,c^{2}+\frac {2}{5} x^{5} D a b \,c^{2}+\frac {1}{2} x^{4} A a b \,d^{2}+\frac {1}{2} x^{4} A \,b^{2} c d +\frac {1}{2} x^{4} C \,a^{2} c d +\frac {1}{3} x^{6} C \,b^{2} c d +\frac {2}{5} x^{5} B a b \,d^{2}+\frac {2}{5} x^{5} B \,b^{2} c d +\frac {2}{5} x^{5} D a^{2} c d +\frac {2}{7} x^{7} D a b \,d^{2}+\frac {1}{3} x^{6} C a b \,d^{2}+\frac {1}{5} x^{5} C \,b^{2} c^{2}+\frac {1}{4} x^{4} B \,a^{2} d^{2}+\frac {1}{4} x^{4} B \,b^{2} c^{2}+\frac {1}{3} x^{3} a^{2} c^{2} C +\frac {1}{2} x^{2} a^{2} c^{2} B +x^{4} B a b c d +\frac {1}{6} x^{6} a^{2} d^{2} D+\frac {1}{6} x^{6} D b^{2} c^{2}+\frac {1}{5} x^{5} A \,b^{2} d^{2}+\frac {1}{5} x^{5} C \,a^{2} d^{2}+\frac {2}{3} x^{6} D a b c d +\frac {4}{5} x^{5} C a b c d +\frac {4}{3} x^{3} A a b c d\) | \(404\) |
parallelrisch | \(\frac {2}{7} x^{7} D b^{2} c d +\frac {1}{4} x^{4} a^{2} c^{2} D+\frac {1}{3} x^{3} A \,a^{2} d^{2}+\frac {1}{3} x^{3} A \,b^{2} c^{2}+\frac {1}{7} x^{7} b^{2} d^{2} C +\frac {1}{6} x^{6} b^{2} B \,d^{2}+a^{2} c^{2} A x +\frac {1}{8} b^{2} d^{2} D x^{8}+x^{2} A a b \,c^{2}+x^{2} A \,a^{2} c d +\frac {1}{2} x^{4} C a b \,c^{2}+\frac {2}{3} x^{3} B \,a^{2} c d +\frac {2}{3} x^{3} B a b \,c^{2}+\frac {2}{5} x^{5} D a b \,c^{2}+\frac {1}{2} x^{4} A a b \,d^{2}+\frac {1}{2} x^{4} A \,b^{2} c d +\frac {1}{2} x^{4} C \,a^{2} c d +\frac {1}{3} x^{6} C \,b^{2} c d +\frac {2}{5} x^{5} B a b \,d^{2}+\frac {2}{5} x^{5} B \,b^{2} c d +\frac {2}{5} x^{5} D a^{2} c d +\frac {2}{7} x^{7} D a b \,d^{2}+\frac {1}{3} x^{6} C a b \,d^{2}+\frac {1}{5} x^{5} C \,b^{2} c^{2}+\frac {1}{4} x^{4} B \,a^{2} d^{2}+\frac {1}{4} x^{4} B \,b^{2} c^{2}+\frac {1}{3} x^{3} a^{2} c^{2} C +\frac {1}{2} x^{2} a^{2} c^{2} B +x^{4} B a b c d +\frac {1}{6} x^{6} a^{2} d^{2} D+\frac {1}{6} x^{6} D b^{2} c^{2}+\frac {1}{5} x^{5} A \,b^{2} d^{2}+\frac {1}{5} x^{5} C \,a^{2} d^{2}+\frac {2}{3} x^{6} D a b c d +\frac {4}{5} x^{5} C a b c d +\frac {4}{3} x^{3} A a b c d\) | \(404\) |
orering | \(\frac {x \left (105 b^{2} d^{2} D x^{7}+120 C \,b^{2} d^{2} x^{6}+240 D a b \,d^{2} x^{6}+240 D b^{2} c d \,x^{6}+140 B \,b^{2} d^{2} x^{5}+280 C a b \,d^{2} x^{5}+280 C \,b^{2} c d \,x^{5}+140 D a^{2} d^{2} x^{5}+560 D a b c d \,x^{5}+140 D b^{2} c^{2} x^{5}+168 A \,b^{2} d^{2} x^{4}+336 B a b \,d^{2} x^{4}+336 B \,b^{2} c d \,x^{4}+168 C \,a^{2} d^{2} x^{4}+672 C a b c d \,x^{4}+168 C \,b^{2} c^{2} x^{4}+336 D a^{2} c d \,x^{4}+336 D a b \,c^{2} x^{4}+420 A a b \,d^{2} x^{3}+420 A \,b^{2} c d \,x^{3}+210 B \,a^{2} d^{2} x^{3}+840 B a b c d \,x^{3}+210 B \,b^{2} c^{2} x^{3}+420 C \,a^{2} c d \,x^{3}+420 C a b \,c^{2} x^{3}+210 D a^{2} c^{2} x^{3}+280 A \,a^{2} d^{2} x^{2}+1120 A a b c d \,x^{2}+280 A \,b^{2} c^{2} x^{2}+560 B \,a^{2} c d \,x^{2}+560 B a b \,c^{2} x^{2}+280 C \,a^{2} c^{2} x^{2}+840 A \,a^{2} c d x +840 A a b \,c^{2} x +420 B \,a^{2} c^{2} x +840 a^{2} c^{2} A \right )}{840}\) | \(404\) |
Input:
int((b*x+a)^2*(d*x+c)^2*(D*x^3+C*x^2+B*x+A),x,method=_RETURNVERBOSE)
Output:
1/8*b^2*d^2*D*x^8+(1/7*b^2*d^2*C+2/7*D*a*b*d^2+2/7*D*b^2*c*d)*x^7+(1/6*b^2 *B*d^2+1/3*C*a*b*d^2+1/3*C*b^2*c*d+1/6*a^2*d^2*D+2/3*D*a*b*c*d+1/6*D*b^2*c ^2)*x^6+(1/5*A*b^2*d^2+2/5*B*a*b*d^2+2/5*B*b^2*c*d+1/5*C*a^2*d^2+4/5*C*a*b *c*d+1/5*C*b^2*c^2+2/5*D*a^2*c*d+2/5*D*a*b*c^2)*x^5+(1/2*A*a*b*d^2+1/2*A*b ^2*c*d+1/4*B*a^2*d^2+B*a*b*c*d+1/4*B*b^2*c^2+1/2*C*a^2*c*d+1/2*C*a*b*c^2+1 /4*a^2*c^2*D)*x^4+(1/3*A*a^2*d^2+4/3*A*a*b*c*d+1/3*A*b^2*c^2+2/3*B*a^2*c*d +2/3*B*a*b*c^2+1/3*a^2*c^2*C)*x^3+(A*a^2*c*d+A*a*b*c^2+1/2*a^2*c^2*B)*x^2+ a^2*c^2*A*x
Time = 0.07 (sec) , antiderivative size = 300, normalized size of antiderivative = 0.98 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {1}{8} \, D b^{2} d^{2} x^{8} + \frac {1}{7} \, {\left (2 \, D b^{2} c d + {\left (2 \, D a b + C b^{2}\right )} d^{2}\right )} x^{7} + \frac {1}{6} \, {\left (D b^{2} c^{2} + 2 \, {\left (2 \, D a b + C b^{2}\right )} c d + {\left (D a^{2} + 2 \, C a b + B b^{2}\right )} d^{2}\right )} x^{6} + A a^{2} c^{2} x + \frac {1}{5} \, {\left ({\left (2 \, D a b + C b^{2}\right )} c^{2} + 2 \, {\left (D a^{2} + 2 \, C a b + B b^{2}\right )} c d + {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} d^{2}\right )} x^{5} + \frac {1}{4} \, {\left ({\left (D a^{2} + 2 \, C a b + B b^{2}\right )} c^{2} + 2 \, {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} c d + {\left (B a^{2} + 2 \, A a b\right )} d^{2}\right )} x^{4} + \frac {1}{3} \, {\left (A a^{2} d^{2} + {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} c^{2} + 2 \, {\left (B a^{2} + 2 \, A a b\right )} c d\right )} x^{3} + \frac {1}{2} \, {\left (2 \, A a^{2} c d + {\left (B a^{2} + 2 \, A a b\right )} c^{2}\right )} x^{2} \] Input:
integrate((b*x+a)^2*(d*x+c)^2*(D*x^3+C*x^2+B*x+A),x, algorithm="fricas")
Output:
1/8*D*b^2*d^2*x^8 + 1/7*(2*D*b^2*c*d + (2*D*a*b + C*b^2)*d^2)*x^7 + 1/6*(D *b^2*c^2 + 2*(2*D*a*b + C*b^2)*c*d + (D*a^2 + 2*C*a*b + B*b^2)*d^2)*x^6 + A*a^2*c^2*x + 1/5*((2*D*a*b + C*b^2)*c^2 + 2*(D*a^2 + 2*C*a*b + B*b^2)*c*d + (C*a^2 + 2*B*a*b + A*b^2)*d^2)*x^5 + 1/4*((D*a^2 + 2*C*a*b + B*b^2)*c^2 + 2*(C*a^2 + 2*B*a*b + A*b^2)*c*d + (B*a^2 + 2*A*a*b)*d^2)*x^4 + 1/3*(A*a ^2*d^2 + (C*a^2 + 2*B*a*b + A*b^2)*c^2 + 2*(B*a^2 + 2*A*a*b)*c*d)*x^3 + 1/ 2*(2*A*a^2*c*d + (B*a^2 + 2*A*a*b)*c^2)*x^2
Time = 0.04 (sec) , antiderivative size = 403, normalized size of antiderivative = 1.31 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=A a^{2} c^{2} x + \frac {D b^{2} d^{2} x^{8}}{8} + x^{7} \left (\frac {C b^{2} d^{2}}{7} + \frac {2 D a b d^{2}}{7} + \frac {2 D b^{2} c d}{7}\right ) + x^{6} \left (\frac {B b^{2} d^{2}}{6} + \frac {C a b d^{2}}{3} + \frac {C b^{2} c d}{3} + \frac {D a^{2} d^{2}}{6} + \frac {2 D a b c d}{3} + \frac {D b^{2} c^{2}}{6}\right ) + x^{5} \left (\frac {A b^{2} d^{2}}{5} + \frac {2 B a b d^{2}}{5} + \frac {2 B b^{2} c d}{5} + \frac {C a^{2} d^{2}}{5} + \frac {4 C a b c d}{5} + \frac {C b^{2} c^{2}}{5} + \frac {2 D a^{2} c d}{5} + \frac {2 D a b c^{2}}{5}\right ) + x^{4} \left (\frac {A a b d^{2}}{2} + \frac {A b^{2} c d}{2} + \frac {B a^{2} d^{2}}{4} + B a b c d + \frac {B b^{2} c^{2}}{4} + \frac {C a^{2} c d}{2} + \frac {C a b c^{2}}{2} + \frac {D a^{2} c^{2}}{4}\right ) + x^{3} \left (\frac {A a^{2} d^{2}}{3} + \frac {4 A a b c d}{3} + \frac {A b^{2} c^{2}}{3} + \frac {2 B a^{2} c d}{3} + \frac {2 B a b c^{2}}{3} + \frac {C a^{2} c^{2}}{3}\right ) + x^{2} \left (A a^{2} c d + A a b c^{2} + \frac {B a^{2} c^{2}}{2}\right ) \] Input:
integrate((b*x+a)**2*(d*x+c)**2*(D*x**3+C*x**2+B*x+A),x)
Output:
A*a**2*c**2*x + D*b**2*d**2*x**8/8 + x**7*(C*b**2*d**2/7 + 2*D*a*b*d**2/7 + 2*D*b**2*c*d/7) + x**6*(B*b**2*d**2/6 + C*a*b*d**2/3 + C*b**2*c*d/3 + D* a**2*d**2/6 + 2*D*a*b*c*d/3 + D*b**2*c**2/6) + x**5*(A*b**2*d**2/5 + 2*B*a *b*d**2/5 + 2*B*b**2*c*d/5 + C*a**2*d**2/5 + 4*C*a*b*c*d/5 + C*b**2*c**2/5 + 2*D*a**2*c*d/5 + 2*D*a*b*c**2/5) + x**4*(A*a*b*d**2/2 + A*b**2*c*d/2 + B*a**2*d**2/4 + B*a*b*c*d + B*b**2*c**2/4 + C*a**2*c*d/2 + C*a*b*c**2/2 + D*a**2*c**2/4) + x**3*(A*a**2*d**2/3 + 4*A*a*b*c*d/3 + A*b**2*c**2/3 + 2*B *a**2*c*d/3 + 2*B*a*b*c**2/3 + C*a**2*c**2/3) + x**2*(A*a**2*c*d + A*a*b*c **2 + B*a**2*c**2/2)
Time = 0.03 (sec) , antiderivative size = 300, normalized size of antiderivative = 0.98 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {1}{8} \, D b^{2} d^{2} x^{8} + \frac {1}{7} \, {\left (2 \, D b^{2} c d + {\left (2 \, D a b + C b^{2}\right )} d^{2}\right )} x^{7} + \frac {1}{6} \, {\left (D b^{2} c^{2} + 2 \, {\left (2 \, D a b + C b^{2}\right )} c d + {\left (D a^{2} + 2 \, C a b + B b^{2}\right )} d^{2}\right )} x^{6} + A a^{2} c^{2} x + \frac {1}{5} \, {\left ({\left (2 \, D a b + C b^{2}\right )} c^{2} + 2 \, {\left (D a^{2} + 2 \, C a b + B b^{2}\right )} c d + {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} d^{2}\right )} x^{5} + \frac {1}{4} \, {\left ({\left (D a^{2} + 2 \, C a b + B b^{2}\right )} c^{2} + 2 \, {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} c d + {\left (B a^{2} + 2 \, A a b\right )} d^{2}\right )} x^{4} + \frac {1}{3} \, {\left (A a^{2} d^{2} + {\left (C a^{2} + 2 \, B a b + A b^{2}\right )} c^{2} + 2 \, {\left (B a^{2} + 2 \, A a b\right )} c d\right )} x^{3} + \frac {1}{2} \, {\left (2 \, A a^{2} c d + {\left (B a^{2} + 2 \, A a b\right )} c^{2}\right )} x^{2} \] Input:
integrate((b*x+a)^2*(d*x+c)^2*(D*x^3+C*x^2+B*x+A),x, algorithm="maxima")
Output:
1/8*D*b^2*d^2*x^8 + 1/7*(2*D*b^2*c*d + (2*D*a*b + C*b^2)*d^2)*x^7 + 1/6*(D *b^2*c^2 + 2*(2*D*a*b + C*b^2)*c*d + (D*a^2 + 2*C*a*b + B*b^2)*d^2)*x^6 + A*a^2*c^2*x + 1/5*((2*D*a*b + C*b^2)*c^2 + 2*(D*a^2 + 2*C*a*b + B*b^2)*c*d + (C*a^2 + 2*B*a*b + A*b^2)*d^2)*x^5 + 1/4*((D*a^2 + 2*C*a*b + B*b^2)*c^2 + 2*(C*a^2 + 2*B*a*b + A*b^2)*c*d + (B*a^2 + 2*A*a*b)*d^2)*x^4 + 1/3*(A*a ^2*d^2 + (C*a^2 + 2*B*a*b + A*b^2)*c^2 + 2*(B*a^2 + 2*A*a*b)*c*d)*x^3 + 1/ 2*(2*A*a^2*c*d + (B*a^2 + 2*A*a*b)*c^2)*x^2
Time = 0.12 (sec) , antiderivative size = 403, normalized size of antiderivative = 1.31 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {1}{8} \, D b^{2} d^{2} x^{8} + \frac {2}{7} \, D b^{2} c d x^{7} + \frac {2}{7} \, D a b d^{2} x^{7} + \frac {1}{7} \, C b^{2} d^{2} x^{7} + \frac {1}{6} \, D b^{2} c^{2} x^{6} + \frac {2}{3} \, D a b c d x^{6} + \frac {1}{3} \, C b^{2} c d x^{6} + \frac {1}{6} \, D a^{2} d^{2} x^{6} + \frac {1}{3} \, C a b d^{2} x^{6} + \frac {1}{6} \, B b^{2} d^{2} x^{6} + \frac {2}{5} \, D a b c^{2} x^{5} + \frac {1}{5} \, C b^{2} c^{2} x^{5} + \frac {2}{5} \, D a^{2} c d x^{5} + \frac {4}{5} \, C a b c d x^{5} + \frac {2}{5} \, B b^{2} c d x^{5} + \frac {1}{5} \, C a^{2} d^{2} x^{5} + \frac {2}{5} \, B a b d^{2} x^{5} + \frac {1}{5} \, A b^{2} d^{2} x^{5} + \frac {1}{4} \, D a^{2} c^{2} x^{4} + \frac {1}{2} \, C a b c^{2} x^{4} + \frac {1}{4} \, B b^{2} c^{2} x^{4} + \frac {1}{2} \, C a^{2} c d x^{4} + B a b c d x^{4} + \frac {1}{2} \, A b^{2} c d x^{4} + \frac {1}{4} \, B a^{2} d^{2} x^{4} + \frac {1}{2} \, A a b d^{2} x^{4} + \frac {1}{3} \, C a^{2} c^{2} x^{3} + \frac {2}{3} \, B a b c^{2} x^{3} + \frac {1}{3} \, A b^{2} c^{2} x^{3} + \frac {2}{3} \, B a^{2} c d x^{3} + \frac {4}{3} \, A a b c d x^{3} + \frac {1}{3} \, A a^{2} d^{2} x^{3} + \frac {1}{2} \, B a^{2} c^{2} x^{2} + A a b c^{2} x^{2} + A a^{2} c d x^{2} + A a^{2} c^{2} x \] Input:
integrate((b*x+a)^2*(d*x+c)^2*(D*x^3+C*x^2+B*x+A),x, algorithm="giac")
Output:
1/8*D*b^2*d^2*x^8 + 2/7*D*b^2*c*d*x^7 + 2/7*D*a*b*d^2*x^7 + 1/7*C*b^2*d^2* x^7 + 1/6*D*b^2*c^2*x^6 + 2/3*D*a*b*c*d*x^6 + 1/3*C*b^2*c*d*x^6 + 1/6*D*a^ 2*d^2*x^6 + 1/3*C*a*b*d^2*x^6 + 1/6*B*b^2*d^2*x^6 + 2/5*D*a*b*c^2*x^5 + 1/ 5*C*b^2*c^2*x^5 + 2/5*D*a^2*c*d*x^5 + 4/5*C*a*b*c*d*x^5 + 2/5*B*b^2*c*d*x^ 5 + 1/5*C*a^2*d^2*x^5 + 2/5*B*a*b*d^2*x^5 + 1/5*A*b^2*d^2*x^5 + 1/4*D*a^2* c^2*x^4 + 1/2*C*a*b*c^2*x^4 + 1/4*B*b^2*c^2*x^4 + 1/2*C*a^2*c*d*x^4 + B*a* b*c*d*x^4 + 1/2*A*b^2*c*d*x^4 + 1/4*B*a^2*d^2*x^4 + 1/2*A*a*b*d^2*x^4 + 1/ 3*C*a^2*c^2*x^3 + 2/3*B*a*b*c^2*x^3 + 1/3*A*b^2*c^2*x^3 + 2/3*B*a^2*c*d*x^ 3 + 4/3*A*a*b*c*d*x^3 + 1/3*A*a^2*d^2*x^3 + 1/2*B*a^2*c^2*x^2 + A*a*b*c^2* x^2 + A*a^2*c*d*x^2 + A*a^2*c^2*x
Time = 6.16 (sec) , antiderivative size = 403, normalized size of antiderivative = 1.31 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {a^2\,c^2\,x^4\,D}{4}+\frac {a^2\,d^2\,x^6\,D}{6}+\frac {b^2\,c^2\,x^6\,D}{6}+\frac {b^2\,d^2\,x^8\,D}{8}+A\,a^2\,c^2\,x+\frac {B\,a^2\,c^2\,x^2}{2}+\frac {A\,a^2\,d^2\,x^3}{3}+\frac {A\,b^2\,c^2\,x^3}{3}+\frac {C\,a^2\,c^2\,x^3}{3}+\frac {B\,a^2\,d^2\,x^4}{4}+\frac {B\,b^2\,c^2\,x^4}{4}+\frac {A\,b^2\,d^2\,x^5}{5}+\frac {C\,a^2\,d^2\,x^5}{5}+\frac {C\,b^2\,c^2\,x^5}{5}+\frac {B\,b^2\,d^2\,x^6}{6}+\frac {C\,b^2\,d^2\,x^7}{7}+\frac {2\,B\,a^2\,c\,d\,x^3}{3}+\frac {A\,b^2\,c\,d\,x^4}{2}+\frac {C\,a\,b\,d^2\,x^6}{3}+\frac {C\,a^2\,c\,d\,x^4}{2}+\frac {2\,B\,b^2\,c\,d\,x^5}{5}+\frac {C\,b^2\,c\,d\,x^6}{3}+\frac {2\,a\,b\,c^2\,x^5\,D}{5}+\frac {2\,a\,b\,d^2\,x^7\,D}{7}+\frac {2\,a^2\,c\,d\,x^5\,D}{5}+\frac {2\,b^2\,c\,d\,x^7\,D}{7}+A\,a\,b\,c^2\,x^2+\frac {2\,B\,a\,b\,c^2\,x^3}{3}+\frac {A\,a\,b\,d^2\,x^4}{2}+A\,a^2\,c\,d\,x^2+\frac {C\,a\,b\,c^2\,x^4}{2}+\frac {2\,B\,a\,b\,d^2\,x^5}{5}+\frac {4\,A\,a\,b\,c\,d\,x^3}{3}+B\,a\,b\,c\,d\,x^4+\frac {4\,C\,a\,b\,c\,d\,x^5}{5}+\frac {2\,a\,b\,c\,d\,x^6\,D}{3} \] Input:
int((a + b*x)^2*(c + d*x)^2*(A + B*x + C*x^2 + x^3*D),x)
Output:
(a^2*c^2*x^4*D)/4 + (a^2*d^2*x^6*D)/6 + (b^2*c^2*x^6*D)/6 + (b^2*d^2*x^8*D )/8 + A*a^2*c^2*x + (B*a^2*c^2*x^2)/2 + (A*a^2*d^2*x^3)/3 + (A*b^2*c^2*x^3 )/3 + (C*a^2*c^2*x^3)/3 + (B*a^2*d^2*x^4)/4 + (B*b^2*c^2*x^4)/4 + (A*b^2*d ^2*x^5)/5 + (C*a^2*d^2*x^5)/5 + (C*b^2*c^2*x^5)/5 + (B*b^2*d^2*x^6)/6 + (C *b^2*d^2*x^7)/7 + (2*B*a^2*c*d*x^3)/3 + (A*b^2*c*d*x^4)/2 + (C*a*b*d^2*x^6 )/3 + (C*a^2*c*d*x^4)/2 + (2*B*b^2*c*d*x^5)/5 + (C*b^2*c*d*x^6)/3 + (2*a*b *c^2*x^5*D)/5 + (2*a*b*d^2*x^7*D)/7 + (2*a^2*c*d*x^5*D)/5 + (2*b^2*c*d*x^7 *D)/7 + A*a*b*c^2*x^2 + (2*B*a*b*c^2*x^3)/3 + (A*a*b*d^2*x^4)/2 + A*a^2*c* d*x^2 + (C*a*b*c^2*x^4)/2 + (2*B*a*b*d^2*x^5)/5 + (4*A*a*b*c*d*x^3)/3 + B* a*b*c*d*x^4 + (4*C*a*b*c*d*x^5)/5 + (2*a*b*c*d*x^6*D)/3
Time = 0.14 (sec) , antiderivative size = 265, normalized size of antiderivative = 0.86 \[ \int (a+b x)^2 (c+d x)^2 \left (A+B x+C x^2+D x^3\right ) \, dx=\frac {x \left (105 b^{2} d^{3} x^{7}+240 a b \,d^{3} x^{6}+360 b^{2} c \,d^{2} x^{6}+140 a^{2} d^{3} x^{5}+840 a b c \,d^{2} x^{5}+140 b^{3} d^{2} x^{5}+420 b^{2} c^{2} d \,x^{5}+504 a^{2} c \,d^{2} x^{4}+504 a \,b^{2} d^{2} x^{4}+1008 a b \,c^{2} d \,x^{4}+336 b^{3} c d \,x^{4}+168 b^{2} c^{3} x^{4}+630 a^{2} b \,d^{2} x^{3}+630 a^{2} c^{2} d \,x^{3}+1260 a \,b^{2} c d \,x^{3}+420 a b \,c^{3} x^{3}+210 b^{3} c^{2} x^{3}+280 a^{3} d^{2} x^{2}+1680 a^{2} b c d \,x^{2}+280 a^{2} c^{3} x^{2}+840 a \,b^{2} c^{2} x^{2}+840 a^{3} c d x +1260 a^{2} b \,c^{2} x +840 a^{3} c^{2}\right )}{840} \] Input:
int((b*x+a)^2*(d*x+c)^2*(D*x^3+C*x^2+B*x+A),x)
Output:
(x*(840*a**3*c**2 + 840*a**3*c*d*x + 280*a**3*d**2*x**2 + 1260*a**2*b*c**2 *x + 1680*a**2*b*c*d*x**2 + 630*a**2*b*d**2*x**3 + 280*a**2*c**3*x**2 + 63 0*a**2*c**2*d*x**3 + 504*a**2*c*d**2*x**4 + 140*a**2*d**3*x**5 + 840*a*b** 2*c**2*x**2 + 1260*a*b**2*c*d*x**3 + 504*a*b**2*d**2*x**4 + 420*a*b*c**3*x **3 + 1008*a*b*c**2*d*x**4 + 840*a*b*c*d**2*x**5 + 240*a*b*d**3*x**6 + 210 *b**3*c**2*x**3 + 336*b**3*c*d*x**4 + 140*b**3*d**2*x**5 + 168*b**2*c**3*x **4 + 420*b**2*c**2*d*x**5 + 360*b**2*c*d**2*x**6 + 105*b**2*d**3*x**7))/8 40