Optimal. Leaf size=242 \[ -\frac {2 a \left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )^{1+p}}{b^6 d^3 (1+p)}+\frac {2 \left (5 a^4-6 a^2 b^2 c+b^4 c^2\right ) \left (a+b \sqrt {c+d x}\right )^{2+p}}{b^6 d^3 (2+p)}-\frac {4 a \left (5 a^2-3 b^2 c\right ) \left (a+b \sqrt {c+d x}\right )^{3+p}}{b^6 d^3 (3+p)}+\frac {4 \left (5 a^2-b^2 c\right ) \left (a+b \sqrt {c+d x}\right )^{4+p}}{b^6 d^3 (4+p)}-\frac {10 a \left (a+b \sqrt {c+d x}\right )^{5+p}}{b^6 d^3 (5+p)}+\frac {2 \left (a+b \sqrt {c+d x}\right )^{6+p}}{b^6 d^3 (6+p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 242, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {378, 1412, 786}
\begin {gather*} -\frac {2 a \left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )^{p+1}}{b^6 d^3 (p+1)}-\frac {4 a \left (5 a^2-3 b^2 c\right ) \left (a+b \sqrt {c+d x}\right )^{p+3}}{b^6 d^3 (p+3)}+\frac {4 \left (5 a^2-b^2 c\right ) \left (a+b \sqrt {c+d x}\right )^{p+4}}{b^6 d^3 (p+4)}+\frac {2 \left (5 a^4-6 a^2 b^2 c+b^4 c^2\right ) \left (a+b \sqrt {c+d x}\right )^{p+2}}{b^6 d^3 (p+2)}-\frac {10 a \left (a+b \sqrt {c+d x}\right )^{p+5}}{b^6 d^3 (p+5)}+\frac {2 \left (a+b \sqrt {c+d x}\right )^{p+6}}{b^6 d^3 (p+6)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 378
Rule 786
Rule 1412
Rubi steps
\begin {align*} \int x^2 \left (a+b \sqrt {c+d x}\right )^p \, dx &=\frac {\text {Subst}\left (\int \left (a+b \sqrt {x}\right )^p (-c+x)^2 \, dx,x,c+d x\right )}{d^3}\\ &=\frac {2 \text {Subst}\left (\int x (a+b x)^p \left (-c+x^2\right )^2 \, dx,x,\sqrt {c+d x}\right )}{d^3}\\ &=\frac {2 \text {Subst}\left (\int \left (-\frac {a \left (a^2-b^2 c\right )^2 (a+b x)^p}{b^5}+\frac {\left (5 a^4-6 a^2 b^2 c+b^4 c^2\right ) (a+b x)^{1+p}}{b^5}-\frac {2 \left (5 a^3-3 a b^2 c\right ) (a+b x)^{2+p}}{b^5}-\frac {2 \left (-5 a^2+b^2 c\right ) (a+b x)^{3+p}}{b^5}-\frac {5 a (a+b x)^{4+p}}{b^5}+\frac {(a+b x)^{5+p}}{b^5}\right ) \, dx,x,\sqrt {c+d x}\right )}{d^3}\\ &=-\frac {2 a \left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )^{1+p}}{b^6 d^3 (1+p)}+\frac {2 \left (5 a^4-6 a^2 b^2 c+b^4 c^2\right ) \left (a+b \sqrt {c+d x}\right )^{2+p}}{b^6 d^3 (2+p)}-\frac {4 a \left (5 a^2-3 b^2 c\right ) \left (a+b \sqrt {c+d x}\right )^{3+p}}{b^6 d^3 (3+p)}+\frac {4 \left (5 a^2-b^2 c\right ) \left (a+b \sqrt {c+d x}\right )^{4+p}}{b^6 d^3 (4+p)}-\frac {10 a \left (a+b \sqrt {c+d x}\right )^{5+p}}{b^6 d^3 (5+p)}+\frac {2 \left (a+b \sqrt {c+d x}\right )^{6+p}}{b^6 d^3 (6+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.45, size = 285, normalized size = 1.18 \begin {gather*} \frac {2 \left (a+b \sqrt {c+d x}\right )^{1+p} \left (-120 a^5+120 a^4 b (1+p) \sqrt {c+d x}+12 a^3 b^2 \left (-4 c \left (-5+p+p^2\right )-5 d \left (2+3 p+p^2\right ) x\right )-4 a^2 b^3 (1+p) \sqrt {c+d x} \left (c \left (60+8 p-2 p^2\right )-5 d \left (6+5 p+p^2\right ) x\right )+b^5 \left (15+23 p+9 p^2+p^3\right ) \sqrt {c+d x} \left (8 c^2-4 c d (2+p) x+d^2 \left (8+6 p+p^2\right ) x^2\right )-a b^4 \left (-8 c^2 \left (-15+10 p+12 p^2+2 p^3\right )+4 c d \left (-30-43 p-10 p^2+4 p^3+p^4\right ) x+5 d^2 \left (24+50 p+35 p^2+10 p^3+p^4\right ) x^2\right )\right )}{b^6 d^3 (1+p) (2+p) (3+p) (4+p) (5+p) (6+p)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.00, size = 0, normalized size = 0.00 \[\int x^{2} \left (a +b \sqrt {d x +c}\right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 402, normalized size = 1.66 \begin {gather*} \frac {2 \, {\left (\frac {{\left ({\left (d x + c\right )} b^{2} {\left (p + 1\right )} + \sqrt {d x + c} a b p - a^{2}\right )} {\left (\sqrt {d x + c} b + a\right )}^{p} c^{2}}{{\left (p^{2} + 3 \, p + 2\right )} b^{2}} - \frac {2 \, {\left ({\left (p^{3} + 6 \, p^{2} + 11 \, p + 6\right )} {\left (d x + c\right )}^{2} b^{4} + {\left (p^{3} + 3 \, p^{2} + 2 \, p\right )} {\left (d x + c\right )}^{\frac {3}{2}} a b^{3} - 3 \, {\left (p^{2} + p\right )} {\left (d x + c\right )} a^{2} b^{2} + 6 \, \sqrt {d x + c} a^{3} b p - 6 \, a^{4}\right )} {\left (\sqrt {d x + c} b + a\right )}^{p} c}{{\left (p^{4} + 10 \, p^{3} + 35 \, p^{2} + 50 \, p + 24\right )} b^{4}} + \frac {{\left ({\left (p^{5} + 15 \, p^{4} + 85 \, p^{3} + 225 \, p^{2} + 274 \, p + 120\right )} {\left (d x + c\right )}^{3} b^{6} + {\left (p^{5} + 10 \, p^{4} + 35 \, p^{3} + 50 \, p^{2} + 24 \, p\right )} {\left (d x + c\right )}^{\frac {5}{2}} a b^{5} - 5 \, {\left (p^{4} + 6 \, p^{3} + 11 \, p^{2} + 6 \, p\right )} {\left (d x + c\right )}^{2} a^{2} b^{4} + 20 \, {\left (p^{3} + 3 \, p^{2} + 2 \, p\right )} {\left (d x + c\right )}^{\frac {3}{2}} a^{3} b^{3} - 60 \, {\left (p^{2} + p\right )} {\left (d x + c\right )} a^{4} b^{2} + 120 \, \sqrt {d x + c} a^{5} b p - 120 \, a^{6}\right )} {\left (\sqrt {d x + c} b + a\right )}^{p}}{{\left (p^{6} + 21 \, p^{5} + 175 \, p^{4} + 735 \, p^{3} + 1624 \, p^{2} + 1764 \, p + 720\right )} b^{6}}\right )}}{d^{3}} \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. 712 vs.
\(2 (230) = 460\).
time = 0.42, size = 712, normalized size = 2.94 \begin {gather*} \frac {2 \, {\left (120 \, b^{6} c^{3} - 360 \, a^{2} b^{4} c^{2} + 360 \, a^{4} b^{2} c - 120 \, a^{6} + 8 \, {\left (b^{6} c^{3} + 3 \, a^{2} b^{4} c^{2}\right )} p^{3} + {\left (b^{6} d^{3} p^{5} + 15 \, b^{6} d^{3} p^{4} + 85 \, b^{6} d^{3} p^{3} + 225 \, b^{6} d^{3} p^{2} + 274 \, b^{6} d^{3} p + 120 \, b^{6} d^{3}\right )} x^{3} + 24 \, {\left (3 \, b^{6} c^{3} + 3 \, a^{2} b^{4} c^{2} - 2 \, a^{4} b^{2} c\right )} p^{2} + {\left (b^{6} c d^{2} p^{5} + {\left (11 \, b^{6} c - 5 \, a^{2} b^{4}\right )} d^{2} p^{4} + {\left (41 \, b^{6} c - 30 \, a^{2} b^{4}\right )} d^{2} p^{3} + {\left (61 \, b^{6} c - 55 \, a^{2} b^{4}\right )} d^{2} p^{2} + 30 \, {\left (b^{6} c - a^{2} b^{4}\right )} d^{2} p\right )} x^{2} + 8 \, {\left (23 \, b^{6} c^{3} - 24 \, a^{2} b^{4} c^{2} + 9 \, a^{4} b^{2} c\right )} p - 4 \, {\left ({\left (b^{6} c^{2} + a^{2} b^{4} c\right )} d p^{4} + 3 \, {\left (3 \, b^{6} c^{2} - a^{2} b^{4} c\right )} d p^{3} + {\left (23 \, b^{6} c^{2} - 34 \, a^{2} b^{4} c + 15 \, a^{4} b^{2}\right )} d p^{2} + 15 \, {\left (b^{6} c^{2} - 2 \, a^{2} b^{4} c + a^{4} b^{2}\right )} d p\right )} x + {\left (8 \, {\left (3 \, a b^{5} c^{2} + a^{3} b^{3} c\right )} p^{3} + 24 \, {\left (7 \, a b^{5} c^{2} - 3 \, a^{3} b^{3} c\right )} p^{2} + {\left (a b^{5} d^{2} p^{5} + 10 \, a b^{5} d^{2} p^{4} + 35 \, a b^{5} d^{2} p^{3} + 50 \, a b^{5} d^{2} p^{2} + 24 \, a b^{5} d^{2} p\right )} x^{2} + 8 \, {\left (33 \, a b^{5} c^{2} - 40 \, a^{3} b^{3} c + 15 \, a^{5} b\right )} p - 4 \, {\left (2 \, a b^{5} c d p^{4} + 5 \, {\left (3 \, a b^{5} c - a^{3} b^{3}\right )} d p^{3} + {\left (31 \, a b^{5} c - 15 \, a^{3} b^{3}\right )} d p^{2} + 2 \, {\left (9 \, a b^{5} c - 5 \, a^{3} b^{3}\right )} d p\right )} x\right )} \sqrt {d x + c}\right )} {\left (\sqrt {d x + c} b + a\right )}^{p}}{b^{6} d^{3} p^{6} + 21 \, b^{6} d^{3} p^{5} + 175 \, b^{6} d^{3} p^{4} + 735 \, b^{6} d^{3} p^{3} + 1624 \, b^{6} d^{3} p^{2} + 1764 \, b^{6} d^{3} p + 720 \, b^{6} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \left (a + b \sqrt {c + d x}\right )^{p}\, dx \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. 2511 vs.
\(2 (230) = 460\).
time = 3.25, size = 2511, normalized size = 10.38 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int x^2\,{\left (a+b\,\sqrt {c+d\,x}\right )}^p \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________