Optimal. Leaf size=160 \[ \frac {a^2 \left (b^3 c-a^3 d\right ) (a+b x)^{1+n}}{b^6 (1+n)}-\frac {a \left (2 b^3 c-5 a^3 d\right ) (a+b x)^{2+n}}{b^6 (2+n)}+\frac {\left (b^3 c-10 a^3 d\right ) (a+b x)^{3+n}}{b^6 (3+n)}+\frac {10 a^2 d (a+b x)^{4+n}}{b^6 (4+n)}-\frac {5 a d (a+b x)^{5+n}}{b^6 (5+n)}+\frac {d (a+b x)^{6+n}}{b^6 (6+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {1634}
\begin {gather*} -\frac {a \left (2 b^3 c-5 a^3 d\right ) (a+b x)^{n+2}}{b^6 (n+2)}+\frac {\left (b^3 c-10 a^3 d\right ) (a+b x)^{n+3}}{b^6 (n+3)}+\frac {10 a^2 d (a+b x)^{n+4}}{b^6 (n+4)}+\frac {a^2 \left (b^3 c-a^3 d\right ) (a+b x)^{n+1}}{b^6 (n+1)}-\frac {5 a d (a+b x)^{n+5}}{b^6 (n+5)}+\frac {d (a+b x)^{n+6}}{b^6 (n+6)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1634
Rubi steps
\begin {align*} \int x^2 (a+b x)^n \left (c+d x^3\right ) \, dx &=\int \left (\frac {\left (a^2 b^3 c-a^5 d\right ) (a+b x)^n}{b^5}+\frac {a \left (-2 b^3 c+5 a^3 d\right ) (a+b x)^{1+n}}{b^5}+\frac {\left (b^3 c-10 a^3 d\right ) (a+b x)^{2+n}}{b^5}+\frac {10 a^2 d (a+b x)^{3+n}}{b^5}-\frac {5 a d (a+b x)^{4+n}}{b^5}+\frac {d (a+b x)^{5+n}}{b^5}\right ) \, dx\\ &=\frac {a^2 \left (b^3 c-a^3 d\right ) (a+b x)^{1+n}}{b^6 (1+n)}-\frac {a \left (2 b^3 c-5 a^3 d\right ) (a+b x)^{2+n}}{b^6 (2+n)}+\frac {\left (b^3 c-10 a^3 d\right ) (a+b x)^{3+n}}{b^6 (3+n)}+\frac {10 a^2 d (a+b x)^{4+n}}{b^6 (4+n)}-\frac {5 a d (a+b x)^{5+n}}{b^6 (5+n)}+\frac {d (a+b x)^{6+n}}{b^6 (6+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 133, normalized size = 0.83 \begin {gather*} \frac {(a+b x)^{1+n} \left (\frac {a^2 b^3 c-a^5 d}{1+n}+\frac {a \left (-2 b^3 c+5 a^3 d\right ) (a+b x)}{2+n}+\frac {\left (b^3 c-10 a^3 d\right ) (a+b x)^2}{3+n}+\frac {10 a^2 d (a+b x)^3}{4+n}-\frac {5 a d (a+b x)^4}{5+n}+\frac {d (a+b x)^5}{6+n}\right )}{b^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(414\) vs.
\(2(160)=320\).
time = 0.21, size = 415, normalized size = 2.59
method | result | size |
norman | \(\frac {d \,x^{6} {\mathrm e}^{n \ln \left (b x +a \right )}}{6+n}+\frac {\left (b^{3} c \,n^{3}+15 b^{3} c \,n^{2}+20 a^{3} d n +74 b^{3} c n +120 b^{3} c \right ) x^{3} {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{3} \left (n^{4}+18 n^{3}+119 n^{2}+342 n +360\right )}+\frac {d a n \,x^{5} {\mathrm e}^{n \ln \left (b x +a \right )}}{b \left (n^{2}+11 n +30\right )}-\frac {2 a^{3} \left (-b^{3} c \,n^{3}-15 b^{3} c \,n^{2}-74 b^{3} c n +60 a^{3} d -120 b^{3} c \right ) {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{6} \left (n^{6}+21 n^{5}+175 n^{4}+735 n^{3}+1624 n^{2}+1764 n +720\right )}+\frac {2 n \,a^{2} \left (-b^{3} c \,n^{3}-15 b^{3} c \,n^{2}-74 b^{3} c n +60 a^{3} d -120 b^{3} c \right ) x \,{\mathrm e}^{n \ln \left (b x +a \right )}}{b^{5} \left (n^{6}+21 n^{5}+175 n^{4}+735 n^{3}+1624 n^{2}+1764 n +720\right )}-\frac {5 n \,a^{2} d \,x^{4} {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{2} \left (n^{3}+15 n^{2}+74 n +120\right )}-\frac {\left (-b^{3} c \,n^{3}-15 b^{3} c \,n^{2}-74 b^{3} c n +60 a^{3} d -120 b^{3} c \right ) a n \,x^{2} {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{4} \left (n^{5}+20 n^{4}+155 n^{3}+580 n^{2}+1044 n +720\right )}\) | \(415\) |
gosper | \(-\frac {\left (b x +a \right )^{1+n} \left (-b^{5} d \,n^{5} x^{5}-15 b^{5} d \,n^{4} x^{5}+5 a \,b^{4} d \,n^{4} x^{4}-85 b^{5} d \,n^{3} x^{5}+50 a \,b^{4} d \,n^{3} x^{4}-b^{5} c \,n^{5} x^{2}-225 b^{5} d \,n^{2} x^{5}-20 a^{2} b^{3} d \,n^{3} x^{3}+175 a \,b^{4} d \,n^{2} x^{4}-18 b^{5} c \,n^{4} x^{2}-274 b^{5} d n \,x^{5}-120 a^{2} b^{3} d \,n^{2} x^{3}+2 a \,b^{4} c \,n^{4} x +250 a \,b^{4} d n \,x^{4}-121 b^{5} c \,n^{3} x^{2}-120 d \,x^{5} b^{5}+60 a^{3} b^{2} d \,n^{2} x^{2}-220 a^{2} b^{3} d n \,x^{3}+32 a \,b^{4} c \,n^{3} x +120 a d \,x^{4} b^{4}-372 b^{5} c \,n^{2} x^{2}+180 a^{3} b^{2} d n \,x^{2}-2 a^{2} b^{3} c \,n^{3}-120 a^{2} d \,x^{3} b^{3}+178 a \,b^{4} c \,n^{2} x -508 b^{5} c n \,x^{2}-120 a^{4} b d n x +120 a^{3} b^{2} d \,x^{2}-30 a^{2} b^{3} c \,n^{2}+388 a \,b^{4} c n x -240 b^{5} c \,x^{2}-120 a^{4} b d x -148 a^{2} b^{3} c n +240 a \,b^{4} c x +120 a^{5} d -240 a^{2} b^{3} c \right )}{b^{6} \left (n^{6}+21 n^{5}+175 n^{4}+735 n^{3}+1624 n^{2}+1764 n +720\right )}\) | \(451\) |
risch | \(-\frac {\left (-b^{6} d \,n^{5} x^{6}-a \,b^{5} d \,n^{5} x^{5}-15 b^{6} d \,n^{4} x^{6}-10 a \,b^{5} d \,n^{4} x^{5}-85 b^{6} d \,n^{3} x^{6}+5 a^{2} b^{4} d \,n^{4} x^{4}-35 a \,b^{5} d \,n^{3} x^{5}-b^{6} c \,n^{5} x^{3}-225 b^{6} d \,n^{2} x^{6}+30 a^{2} b^{4} d \,n^{3} x^{4}-a \,b^{5} c \,n^{5} x^{2}-50 a \,b^{5} d \,n^{2} x^{5}-18 b^{6} c \,n^{4} x^{3}-274 b^{6} d n \,x^{6}-20 a^{3} b^{3} d \,n^{3} x^{3}+55 a^{2} b^{4} d \,n^{2} x^{4}-16 a \,b^{5} c \,n^{4} x^{2}-24 a d n \,x^{5} b^{5}-121 b^{6} c \,n^{3} x^{3}-120 x^{6} d \,b^{6}-60 a^{3} b^{3} d \,n^{2} x^{3}+2 a^{2} b^{4} c \,n^{4} x +30 a^{2} d n \,x^{4} b^{4}-89 a \,b^{5} c \,n^{3} x^{2}-372 b^{6} c \,n^{2} x^{3}+60 a^{4} b^{2} d \,n^{2} x^{2}-40 a^{3} b^{3} d n \,x^{3}+30 a^{2} b^{4} c \,n^{3} x -194 a \,b^{5} c \,n^{2} x^{2}-508 b^{6} c n \,x^{3}+60 a^{4} b^{2} d n \,x^{2}-2 a^{3} b^{3} c \,n^{3}+148 a^{2} b^{4} c \,n^{2} x -120 a \,b^{5} c n \,x^{2}-240 b^{6} c \,x^{3}-120 a^{5} b d n x -30 a^{3} b^{3} c \,n^{2}+240 a^{2} b^{4} c n x -148 a^{3} b^{3} c n +120 a^{6} d -240 a^{3} b^{3} c \right ) \left (b x +a \right )^{n}}{\left (5+n \right ) \left (6+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) b^{6}}\) | \(541\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 253, normalized size = 1.58 \begin {gather*} \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} b^{3} x^{3} + {\left (n^{2} + n\right )} a b^{2} x^{2} - 2 \, a^{2} b n x + 2 \, a^{3}\right )} {\left (b x + a\right )}^{n} c}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{3}} + \frac {{\left ({\left (n^{5} + 15 \, n^{4} + 85 \, n^{3} + 225 \, n^{2} + 274 \, n + 120\right )} b^{6} x^{6} + {\left (n^{5} + 10 \, n^{4} + 35 \, n^{3} + 50 \, n^{2} + 24 \, n\right )} a b^{5} x^{5} - 5 \, {\left (n^{4} + 6 \, n^{3} + 11 \, n^{2} + 6 \, n\right )} a^{2} b^{4} x^{4} + 20 \, {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} a^{3} b^{3} x^{3} - 60 \, {\left (n^{2} + n\right )} a^{4} b^{2} x^{2} + 120 \, a^{5} b n x - 120 \, a^{6}\right )} {\left (b x + a\right )}^{n} d}{{\left (n^{6} + 21 \, n^{5} + 175 \, n^{4} + 735 \, n^{3} + 1624 \, n^{2} + 1764 \, n + 720\right )} b^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 490 vs.
\(2 (160) = 320\).
time = 0.52, size = 490, normalized size = 3.06 \begin {gather*} \frac {{\left (2 \, a^{3} b^{3} c n^{3} + 30 \, a^{3} b^{3} c n^{2} + 148 \, a^{3} b^{3} c n + 240 \, a^{3} b^{3} c - 120 \, a^{6} d + {\left (b^{6} d n^{5} + 15 \, b^{6} d n^{4} + 85 \, b^{6} d n^{3} + 225 \, b^{6} d n^{2} + 274 \, b^{6} d n + 120 \, b^{6} d\right )} x^{6} + {\left (a b^{5} d n^{5} + 10 \, a b^{5} d n^{4} + 35 \, a b^{5} d n^{3} + 50 \, a b^{5} d n^{2} + 24 \, a b^{5} d n\right )} x^{5} - 5 \, {\left (a^{2} b^{4} d n^{4} + 6 \, a^{2} b^{4} d n^{3} + 11 \, a^{2} b^{4} d n^{2} + 6 \, a^{2} b^{4} d n\right )} x^{4} + {\left (b^{6} c n^{5} + 18 \, b^{6} c n^{4} + 240 \, b^{6} c + {\left (121 \, b^{6} c + 20 \, a^{3} b^{3} d\right )} n^{3} + 12 \, {\left (31 \, b^{6} c + 5 \, a^{3} b^{3} d\right )} n^{2} + 4 \, {\left (127 \, b^{6} c + 10 \, a^{3} b^{3} d\right )} n\right )} x^{3} + {\left (a b^{5} c n^{5} + 16 \, a b^{5} c n^{4} + 89 \, a b^{5} c n^{3} + 2 \, {\left (97 \, a b^{5} c - 30 \, a^{4} b^{2} d\right )} n^{2} + 60 \, {\left (2 \, a b^{5} c - a^{4} b^{2} d\right )} n\right )} x^{2} - 2 \, {\left (a^{2} b^{4} c n^{4} + 15 \, a^{2} b^{4} c n^{3} + 74 \, a^{2} b^{4} c n^{2} + 60 \, {\left (2 \, a^{2} b^{4} c - a^{5} b d\right )} n\right )} x\right )} {\left (b x + a\right )}^{n}}{b^{6} n^{6} + 21 \, b^{6} n^{5} + 175 \, b^{6} n^{4} + 735 \, b^{6} n^{3} + 1624 \, b^{6} n^{2} + 1764 \, b^{6} n + 720 \, b^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 6397 vs.
\(2 (144) = 288\).
time = 2.09, size = 6397, normalized size = 39.98 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 835 vs.
\(2 (160) = 320\).
time = 3.97, size = 835, normalized size = 5.22 \begin {gather*} \frac {{\left (b x + a\right )}^{n} b^{6} d n^{5} x^{6} + {\left (b x + a\right )}^{n} a b^{5} d n^{5} x^{5} + 15 \, {\left (b x + a\right )}^{n} b^{6} d n^{4} x^{6} + 10 \, {\left (b x + a\right )}^{n} a b^{5} d n^{4} x^{5} + 85 \, {\left (b x + a\right )}^{n} b^{6} d n^{3} x^{6} + {\left (b x + a\right )}^{n} b^{6} c n^{5} x^{3} - 5 \, {\left (b x + a\right )}^{n} a^{2} b^{4} d n^{4} x^{4} + 35 \, {\left (b x + a\right )}^{n} a b^{5} d n^{3} x^{5} + 225 \, {\left (b x + a\right )}^{n} b^{6} d n^{2} x^{6} + {\left (b x + a\right )}^{n} a b^{5} c n^{5} x^{2} + 18 \, {\left (b x + a\right )}^{n} b^{6} c n^{4} x^{3} - 30 \, {\left (b x + a\right )}^{n} a^{2} b^{4} d n^{3} x^{4} + 50 \, {\left (b x + a\right )}^{n} a b^{5} d n^{2} x^{5} + 274 \, {\left (b x + a\right )}^{n} b^{6} d n x^{6} + 16 \, {\left (b x + a\right )}^{n} a b^{5} c n^{4} x^{2} + 121 \, {\left (b x + a\right )}^{n} b^{6} c n^{3} x^{3} + 20 \, {\left (b x + a\right )}^{n} a^{3} b^{3} d n^{3} x^{3} - 55 \, {\left (b x + a\right )}^{n} a^{2} b^{4} d n^{2} x^{4} + 24 \, {\left (b x + a\right )}^{n} a b^{5} d n x^{5} + 120 \, {\left (b x + a\right )}^{n} b^{6} d x^{6} - 2 \, {\left (b x + a\right )}^{n} a^{2} b^{4} c n^{4} x + 89 \, {\left (b x + a\right )}^{n} a b^{5} c n^{3} x^{2} + 372 \, {\left (b x + a\right )}^{n} b^{6} c n^{2} x^{3} + 60 \, {\left (b x + a\right )}^{n} a^{3} b^{3} d n^{2} x^{3} - 30 \, {\left (b x + a\right )}^{n} a^{2} b^{4} d n x^{4} - 30 \, {\left (b x + a\right )}^{n} a^{2} b^{4} c n^{3} x + 194 \, {\left (b x + a\right )}^{n} a b^{5} c n^{2} x^{2} - 60 \, {\left (b x + a\right )}^{n} a^{4} b^{2} d n^{2} x^{2} + 508 \, {\left (b x + a\right )}^{n} b^{6} c n x^{3} + 40 \, {\left (b x + a\right )}^{n} a^{3} b^{3} d n x^{3} + 2 \, {\left (b x + a\right )}^{n} a^{3} b^{3} c n^{3} - 148 \, {\left (b x + a\right )}^{n} a^{2} b^{4} c n^{2} x + 120 \, {\left (b x + a\right )}^{n} a b^{5} c n x^{2} - 60 \, {\left (b x + a\right )}^{n} a^{4} b^{2} d n x^{2} + 240 \, {\left (b x + a\right )}^{n} b^{6} c x^{3} + 30 \, {\left (b x + a\right )}^{n} a^{3} b^{3} c n^{2} - 240 \, {\left (b x + a\right )}^{n} a^{2} b^{4} c n x + 120 \, {\left (b x + a\right )}^{n} a^{5} b d n x + 148 \, {\left (b x + a\right )}^{n} a^{3} b^{3} c n + 240 \, {\left (b x + a\right )}^{n} a^{3} b^{3} c - 120 \, {\left (b x + a\right )}^{n} a^{6} d}{b^{6} n^{6} + 21 \, b^{6} n^{5} + 175 \, b^{6} n^{4} + 735 \, b^{6} n^{3} + 1624 \, b^{6} n^{2} + 1764 \, b^{6} n + 720 \, b^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.20, size = 495, normalized size = 3.09 \begin {gather*} {\left (a+b\,x\right )}^n\,\left (\frac {d\,x^6\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}{n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720}+\frac {2\,a^3\,\left (-60\,d\,a^3+c\,b^3\,n^3+15\,c\,b^3\,n^2+74\,c\,b^3\,n+120\,c\,b^3\right )}{b^6\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}+\frac {x^3\,\left (n^2+3\,n+2\right )\,\left (20\,d\,a^3\,n+c\,b^3\,n^3+15\,c\,b^3\,n^2+74\,c\,b^3\,n+120\,c\,b^3\right )}{b^3\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {2\,a^2\,n\,x\,\left (-60\,d\,a^3+c\,b^3\,n^3+15\,c\,b^3\,n^2+74\,c\,b^3\,n+120\,c\,b^3\right )}{b^5\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}+\frac {a\,d\,n\,x^5\,\left (n^4+10\,n^3+35\,n^2+50\,n+24\right )}{b\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}+\frac {a\,n\,x^2\,\left (n+1\right )\,\left (-60\,d\,a^3+c\,b^3\,n^3+15\,c\,b^3\,n^2+74\,c\,b^3\,n+120\,c\,b^3\right )}{b^4\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {5\,a^2\,d\,n\,x^4\,\left (n^3+6\,n^2+11\,n+6\right )}{b^2\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________