Optimal. Leaf size=248 \[ \frac {b e (e f+2 d g) x^2 \sqrt {1-c^2 x^2}}{9 c}+\frac {b e^2 g x^3 \sqrt {1-c^2 x^2}}{16 c}+\frac {b \left (32 \left (9 c^2 d^2 f+2 e (e f+2 d g)\right )+9 \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) x\right ) \sqrt {1-c^2 x^2}}{288 c^3}-\frac {b \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) \text {ArcSin}(c x)}{32 c^4}+d^2 f x (a+b \text {ArcSin}(c x))+\frac {1}{2} d (2 e f+d g) x^2 (a+b \text {ArcSin}(c x))+\frac {1}{3} e (e f+2 d g) x^3 (a+b \text {ArcSin}(c x))+\frac {1}{4} e^2 g x^4 (a+b \text {ArcSin}(c x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 248, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4833, 12, 1823,
794, 222} \begin {gather*} d^2 f x (a+b \text {ArcSin}(c x))+\frac {1}{3} e x^3 (2 d g+e f) (a+b \text {ArcSin}(c x))+\frac {1}{2} d x^2 (d g+2 e f) (a+b \text {ArcSin}(c x))+\frac {1}{4} e^2 g x^4 (a+b \text {ArcSin}(c x))-\frac {b \text {ArcSin}(c x) \left (8 c^2 d (d g+2 e f)+3 e^2 g\right )}{32 c^4}+\frac {b e x^2 \sqrt {1-c^2 x^2} (2 d g+e f)}{9 c}+\frac {b e^2 g x^3 \sqrt {1-c^2 x^2}}{16 c}+\frac {b \sqrt {1-c^2 x^2} \left (32 \left (9 c^2 d^2 f+2 e (2 d g+e f)\right )+9 x \left (8 c^2 d (d g+2 e f)+3 e^2 g\right )\right )}{288 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 222
Rule 794
Rule 1823
Rule 4833
Rubi steps
\begin {align*} \int (d+e x)^2 (f+g x) \left (a+b \sin ^{-1}(c x)\right ) \, dx &=d^2 f x \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{2} d (2 e f+d g) x^2 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{3} e (e f+2 d g) x^3 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{4} e^2 g x^4 \left (a+b \sin ^{-1}(c x)\right )-(b c) \int \frac {x \left (12 d^2 f+6 d (2 e f+d g) x+4 e (e f+2 d g) x^2+3 e^2 g x^3\right )}{12 \sqrt {1-c^2 x^2}} \, dx\\ &=d^2 f x \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{2} d (2 e f+d g) x^2 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{3} e (e f+2 d g) x^3 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{4} e^2 g x^4 \left (a+b \sin ^{-1}(c x)\right )-\frac {1}{12} (b c) \int \frac {x \left (12 d^2 f+6 d (2 e f+d g) x+4 e (e f+2 d g) x^2+3 e^2 g x^3\right )}{\sqrt {1-c^2 x^2}} \, dx\\ &=\frac {b e^2 g x^3 \sqrt {1-c^2 x^2}}{16 c}+d^2 f x \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{2} d (2 e f+d g) x^2 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{3} e (e f+2 d g) x^3 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{4} e^2 g x^4 \left (a+b \sin ^{-1}(c x)\right )+\frac {b \int \frac {x \left (-48 c^2 d^2 f-3 \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) x-16 c^2 e (e f+2 d g) x^2\right )}{\sqrt {1-c^2 x^2}} \, dx}{48 c}\\ &=\frac {b e (e f+2 d g) x^2 \sqrt {1-c^2 x^2}}{9 c}+\frac {b e^2 g x^3 \sqrt {1-c^2 x^2}}{16 c}+d^2 f x \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{2} d (2 e f+d g) x^2 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{3} e (e f+2 d g) x^3 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{4} e^2 g x^4 \left (a+b \sin ^{-1}(c x)\right )-\frac {b \int \frac {x \left (16 c^2 \left (9 c^2 d^2 f+2 e (e f+2 d g)\right )+9 c^2 \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) x\right )}{\sqrt {1-c^2 x^2}} \, dx}{144 c^3}\\ &=\frac {b e (e f+2 d g) x^2 \sqrt {1-c^2 x^2}}{9 c}+\frac {b e^2 g x^3 \sqrt {1-c^2 x^2}}{16 c}+\frac {b \left (32 \left (9 c^2 d^2 f+2 e (e f+2 d g)\right )+9 \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) x\right ) \sqrt {1-c^2 x^2}}{288 c^3}+d^2 f x \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{2} d (2 e f+d g) x^2 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{3} e (e f+2 d g) x^3 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{4} e^2 g x^4 \left (a+b \sin ^{-1}(c x)\right )-\frac {\left (b \left (3 e^2 g+8 c^2 d (2 e f+d g)\right )\right ) \int \frac {1}{\sqrt {1-c^2 x^2}} \, dx}{32 c^3}\\ &=\frac {b e (e f+2 d g) x^2 \sqrt {1-c^2 x^2}}{9 c}+\frac {b e^2 g x^3 \sqrt {1-c^2 x^2}}{16 c}+\frac {b \left (32 \left (9 c^2 d^2 f+2 e (e f+2 d g)\right )+9 \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) x\right ) \sqrt {1-c^2 x^2}}{288 c^3}-\frac {b \left (3 e^2 g+8 c^2 d (2 e f+d g)\right ) \sin ^{-1}(c x)}{32 c^4}+d^2 f x \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{2} d (2 e f+d g) x^2 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{3} e (e f+2 d g) x^3 \left (a+b \sin ^{-1}(c x)\right )+\frac {1}{4} e^2 g x^4 \left (a+b \sin ^{-1}(c x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 211, normalized size = 0.85 \begin {gather*} \frac {24 a c^4 x \left (6 d^2 (2 f+g x)+4 d e x (3 f+2 g x)+e^2 x^2 (4 f+3 g x)\right )+b c \sqrt {1-c^2 x^2} \left (e (64 e f+128 d g+27 e g x)+2 c^2 \left (36 d^2 (4 f+g x)+8 d e x (9 f+4 g x)+e^2 x^2 (16 f+9 g x)\right )\right )+3 b \left (-9 e^2 g-24 c^2 d (2 e f+d g)+8 c^4 x \left (6 d^2 (2 f+g x)+4 d e x (3 f+2 g x)+e^2 x^2 (4 f+3 g x)\right )\right ) \text {ArcSin}(c x)}{288 c^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 338, normalized size = 1.36
method | result | size |
derivativedivides | \(\frac {\frac {a \left (\frac {e^{2} g \,c^{4} x^{4}}{4}+\frac {\left (2 c d e g +c \,e^{2} f \right ) c^{3} x^{3}}{3}+\frac {\left (c^{2} d^{2} g +2 c^{2} d e f \right ) c^{2} x^{2}}{2}+d^{2} c^{4} f x \right )}{c^{3}}+\frac {b \left (\frac {\arcsin \left (c x \right ) e^{2} g \,c^{4} x^{4}}{4}+\frac {2 \arcsin \left (c x \right ) c^{4} d e g \,x^{3}}{3}+\frac {\arcsin \left (c x \right ) c^{4} e^{2} f \,x^{3}}{3}+\frac {\arcsin \left (c x \right ) c^{4} d^{2} g \,x^{2}}{2}+\arcsin \left (c x \right ) c^{4} d e f \,x^{2}+\arcsin \left (c x \right ) d^{2} c^{4} f x -\frac {e^{2} g \left (-\frac {c^{3} x^{3} \sqrt {-c^{2} x^{2}+1}}{4}-\frac {3 c x \sqrt {-c^{2} x^{2}+1}}{8}+\frac {3 \arcsin \left (c x \right )}{8}\right )}{4}-\frac {\left (8 c d e g +4 c \,e^{2} f \right ) \left (-\frac {c^{2} x^{2} \sqrt {-c^{2} x^{2}+1}}{3}-\frac {2 \sqrt {-c^{2} x^{2}+1}}{3}\right )}{12}-\frac {\left (6 c^{2} d^{2} g +12 c^{2} d e f \right ) \left (-\frac {c x \sqrt {-c^{2} x^{2}+1}}{2}+\frac {\arcsin \left (c x \right )}{2}\right )}{12}+d^{2} c^{3} f \sqrt {-c^{2} x^{2}+1}\right )}{c^{3}}}{c}\) | \(338\) |
default | \(\frac {\frac {a \left (\frac {e^{2} g \,c^{4} x^{4}}{4}+\frac {\left (2 c d e g +c \,e^{2} f \right ) c^{3} x^{3}}{3}+\frac {\left (c^{2} d^{2} g +2 c^{2} d e f \right ) c^{2} x^{2}}{2}+d^{2} c^{4} f x \right )}{c^{3}}+\frac {b \left (\frac {\arcsin \left (c x \right ) e^{2} g \,c^{4} x^{4}}{4}+\frac {2 \arcsin \left (c x \right ) c^{4} d e g \,x^{3}}{3}+\frac {\arcsin \left (c x \right ) c^{4} e^{2} f \,x^{3}}{3}+\frac {\arcsin \left (c x \right ) c^{4} d^{2} g \,x^{2}}{2}+\arcsin \left (c x \right ) c^{4} d e f \,x^{2}+\arcsin \left (c x \right ) d^{2} c^{4} f x -\frac {e^{2} g \left (-\frac {c^{3} x^{3} \sqrt {-c^{2} x^{2}+1}}{4}-\frac {3 c x \sqrt {-c^{2} x^{2}+1}}{8}+\frac {3 \arcsin \left (c x \right )}{8}\right )}{4}-\frac {\left (8 c d e g +4 c \,e^{2} f \right ) \left (-\frac {c^{2} x^{2} \sqrt {-c^{2} x^{2}+1}}{3}-\frac {2 \sqrt {-c^{2} x^{2}+1}}{3}\right )}{12}-\frac {\left (6 c^{2} d^{2} g +12 c^{2} d e f \right ) \left (-\frac {c x \sqrt {-c^{2} x^{2}+1}}{2}+\frac {\arcsin \left (c x \right )}{2}\right )}{12}+d^{2} c^{3} f \sqrt {-c^{2} x^{2}+1}\right )}{c^{3}}}{c}\) | \(338\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 353, normalized size = 1.42 \begin {gather*} \frac {1}{4} \, a g x^{4} e^{2} + \frac {2}{3} \, a d g x^{3} e + \frac {1}{2} \, a d^{2} g x^{2} + \frac {1}{3} \, a f x^{3} e^{2} + a d f x^{2} e + \frac {1}{4} \, {\left (2 \, x^{2} \arcsin \left (c x\right ) + c {\left (\frac {\sqrt {-c^{2} x^{2} + 1} x}{c^{2}} - \frac {\arcsin \left (c x\right )}{c^{3}}\right )}\right )} b d^{2} g + a d^{2} f x + \frac {1}{2} \, {\left (2 \, x^{2} \arcsin \left (c x\right ) + c {\left (\frac {\sqrt {-c^{2} x^{2} + 1} x}{c^{2}} - \frac {\arcsin \left (c x\right )}{c^{3}}\right )}\right )} b d f e + \frac {2}{9} \, {\left (3 \, x^{3} \arcsin \left (c x\right ) + c {\left (\frac {\sqrt {-c^{2} x^{2} + 1} x^{2}}{c^{2}} + \frac {2 \, \sqrt {-c^{2} x^{2} + 1}}{c^{4}}\right )}\right )} b d g e + \frac {{\left (c x \arcsin \left (c x\right ) + \sqrt {-c^{2} x^{2} + 1}\right )} b d^{2} f}{c} + \frac {1}{9} \, {\left (3 \, x^{3} \arcsin \left (c x\right ) + c {\left (\frac {\sqrt {-c^{2} x^{2} + 1} x^{2}}{c^{2}} + \frac {2 \, \sqrt {-c^{2} x^{2} + 1}}{c^{4}}\right )}\right )} b f e^{2} + \frac {1}{32} \, {\left (8 \, x^{4} \arcsin \left (c x\right ) + {\left (\frac {2 \, \sqrt {-c^{2} x^{2} + 1} x^{3}}{c^{2}} + \frac {3 \, \sqrt {-c^{2} x^{2} + 1} x}{c^{4}} - \frac {3 \, \arcsin \left (c x\right )}{c^{5}}\right )} c\right )} b g e^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.54, size = 287, normalized size = 1.16 \begin {gather*} \frac {144 \, a c^{4} d^{2} g x^{2} + 288 \, a c^{4} d^{2} f x + 3 \, {\left (48 \, b c^{4} d^{2} g x^{2} + 96 \, b c^{4} d^{2} f x - 24 \, b c^{2} d^{2} g + {\left (24 \, b c^{4} g x^{4} + 32 \, b c^{4} f x^{3} - 9 \, b g\right )} e^{2} + 16 \, {\left (4 \, b c^{4} d g x^{3} + 6 \, b c^{4} d f x^{2} - 3 \, b c^{2} d f\right )} e\right )} \arcsin \left (c x\right ) + 24 \, {\left (3 \, a c^{4} g x^{4} + 4 \, a c^{4} f x^{3}\right )} e^{2} + 96 \, {\left (2 \, a c^{4} d g x^{3} + 3 \, a c^{4} d f x^{2}\right )} e + {\left (72 \, b c^{3} d^{2} g x + 288 \, b c^{3} d^{2} f + {\left (18 \, b c^{3} g x^{3} + 32 \, b c^{3} f x^{2} + 27 \, b c g x + 64 \, b c f\right )} e^{2} + 16 \, {\left (4 \, b c^{3} d g x^{2} + 9 \, b c^{3} d f x + 8 \, b c d g\right )} e\right )} \sqrt {-c^{2} x^{2} + 1}}{288 \, c^{4}} \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. 502 vs.
\(2 (235) = 470\).
time = 0.35, size = 502, normalized size = 2.02 \begin {gather*} \begin {cases} a d^{2} f x + \frac {a d^{2} g x^{2}}{2} + a d e f x^{2} + \frac {2 a d e g x^{3}}{3} + \frac {a e^{2} f x^{3}}{3} + \frac {a e^{2} g x^{4}}{4} + b d^{2} f x \operatorname {asin}{\left (c x \right )} + \frac {b d^{2} g x^{2} \operatorname {asin}{\left (c x \right )}}{2} + b d e f x^{2} \operatorname {asin}{\left (c x \right )} + \frac {2 b d e g x^{3} \operatorname {asin}{\left (c x \right )}}{3} + \frac {b e^{2} f x^{3} \operatorname {asin}{\left (c x \right )}}{3} + \frac {b e^{2} g x^{4} \operatorname {asin}{\left (c x \right )}}{4} + \frac {b d^{2} f \sqrt {- c^{2} x^{2} + 1}}{c} + \frac {b d^{2} g x \sqrt {- c^{2} x^{2} + 1}}{4 c} + \frac {b d e f x \sqrt {- c^{2} x^{2} + 1}}{2 c} + \frac {2 b d e g x^{2} \sqrt {- c^{2} x^{2} + 1}}{9 c} + \frac {b e^{2} f x^{2} \sqrt {- c^{2} x^{2} + 1}}{9 c} + \frac {b e^{2} g x^{3} \sqrt {- c^{2} x^{2} + 1}}{16 c} - \frac {b d^{2} g \operatorname {asin}{\left (c x \right )}}{4 c^{2}} - \frac {b d e f \operatorname {asin}{\left (c x \right )}}{2 c^{2}} + \frac {4 b d e g \sqrt {- c^{2} x^{2} + 1}}{9 c^{3}} + \frac {2 b e^{2} f \sqrt {- c^{2} x^{2} + 1}}{9 c^{3}} + \frac {3 b e^{2} g x \sqrt {- c^{2} x^{2} + 1}}{32 c^{3}} - \frac {3 b e^{2} g \operatorname {asin}{\left (c x \right )}}{32 c^{4}} & \text {for}\: c \neq 0 \\a \left (d^{2} f x + \frac {d^{2} g x^{2}}{2} + d e f x^{2} + \frac {2 d e g x^{3}}{3} + \frac {e^{2} f x^{3}}{3} + \frac {e^{2} g x^{4}}{4}\right ) & \text {otherwise} \end {cases} \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. 491 vs.
\(2 (225) = 450\).
time = 0.41, size = 491, normalized size = 1.98 \begin {gather*} \frac {1}{4} \, a e^{2} g x^{4} + \frac {1}{3} \, a e^{2} f x^{3} + \frac {2}{3} \, a d e g x^{3} + b d^{2} f x \arcsin \left (c x\right ) + a d^{2} f x + \frac {{\left (c^{2} x^{2} - 1\right )} b e^{2} f x \arcsin \left (c x\right )}{3 \, c^{2}} + \frac {2 \, {\left (c^{2} x^{2} - 1\right )} b d e g x \arcsin \left (c x\right )}{3 \, c^{2}} + \frac {\sqrt {-c^{2} x^{2} + 1} b d e f x}{2 \, c} + \frac {\sqrt {-c^{2} x^{2} + 1} b d^{2} g x}{4 \, c} + \frac {{\left (c^{2} x^{2} - 1\right )} b d e f \arcsin \left (c x\right )}{c^{2}} + \frac {{\left (c^{2} x^{2} - 1\right )} b d^{2} g \arcsin \left (c x\right )}{2 \, c^{2}} + \frac {b e^{2} f x \arcsin \left (c x\right )}{3 \, c^{2}} + \frac {2 \, b d e g x \arcsin \left (c x\right )}{3 \, c^{2}} + \frac {\sqrt {-c^{2} x^{2} + 1} b d^{2} f}{c} - \frac {{\left (-c^{2} x^{2} + 1\right )}^{\frac {3}{2}} b e^{2} g x}{16 \, c^{3}} + \frac {{\left (c^{2} x^{2} - 1\right )} a d e f}{c^{2}} + \frac {{\left (c^{2} x^{2} - 1\right )} a d^{2} g}{2 \, c^{2}} + \frac {b d e f \arcsin \left (c x\right )}{2 \, c^{2}} + \frac {b d^{2} g \arcsin \left (c x\right )}{4 \, c^{2}} + \frac {{\left (c^{2} x^{2} - 1\right )}^{2} b e^{2} g \arcsin \left (c x\right )}{4 \, c^{4}} - \frac {{\left (-c^{2} x^{2} + 1\right )}^{\frac {3}{2}} b e^{2} f}{9 \, c^{3}} - \frac {2 \, {\left (-c^{2} x^{2} + 1\right )}^{\frac {3}{2}} b d e g}{9 \, c^{3}} + \frac {5 \, \sqrt {-c^{2} x^{2} + 1} b e^{2} g x}{32 \, c^{3}} + \frac {{\left (c^{2} x^{2} - 1\right )} b e^{2} g \arcsin \left (c x\right )}{2 \, c^{4}} + \frac {\sqrt {-c^{2} x^{2} + 1} b e^{2} f}{3 \, c^{3}} + \frac {2 \, \sqrt {-c^{2} x^{2} + 1} b d e g}{3 \, c^{3}} + \frac {5 \, b e^{2} g \arcsin \left (c x\right )}{32 \, c^{4}} \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 \left (f+g\,x\right )\,\left (a+b\,\mathrm {asin}\left (c\,x\right )\right )\,{\left (d+e\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________