Optimal. Leaf size=410 \[ \frac {4 b^2 f g \left (1-c^2 x^2\right )}{c^2 \sqrt {d-c^2 d x^2}}+\frac {b^2 g^2 x \left (1-c^2 x^2\right )}{4 c^2 \sqrt {d-c^2 d x^2}}-\frac {b^2 g^2 \sqrt {1-c^2 x^2} \text {ArcSin}(c x)}{4 c^3 \sqrt {d-c^2 d x^2}}+\frac {4 b f g x \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))}{c \sqrt {d-c^2 d x^2}}+\frac {b g^2 x^2 \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))}{2 c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) (a+b \text {ArcSin}(c x))^2}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) (a+b \text {ArcSin}(c x))^2}{2 c^2 \sqrt {d-c^2 d x^2}}+\frac {f^2 \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))^3}{3 b c \sqrt {d-c^2 d x^2}}+\frac {g^2 \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))^3}{6 b c^3 \sqrt {d-c^2 d x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 410, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 9, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4861, 4857,
3398, 3377, 2718, 3392, 32, 2715, 8} \begin {gather*} \frac {f^2 \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))^3}{3 b c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) (a+b \text {ArcSin}(c x))^2}{c^2 \sqrt {d-c^2 d x^2}}+\frac {4 b f g x \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))}{c \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) (a+b \text {ArcSin}(c x))^2}{2 c^2 \sqrt {d-c^2 d x^2}}+\frac {b g^2 x^2 \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))}{2 c \sqrt {d-c^2 d x^2}}+\frac {g^2 \sqrt {1-c^2 x^2} (a+b \text {ArcSin}(c x))^3}{6 b c^3 \sqrt {d-c^2 d x^2}}-\frac {b^2 g^2 \sqrt {1-c^2 x^2} \text {ArcSin}(c x)}{4 c^3 \sqrt {d-c^2 d x^2}}+\frac {4 b^2 f g \left (1-c^2 x^2\right )}{c^2 \sqrt {d-c^2 d x^2}}+\frac {b^2 g^2 x \left (1-c^2 x^2\right )}{4 c^2 \sqrt {d-c^2 d x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 32
Rule 2715
Rule 2718
Rule 3377
Rule 3392
Rule 3398
Rule 4857
Rule 4861
Rubi steps
\begin {align*} \int \frac {(f+g x)^2 \left (a+b \sin ^{-1}(c x)\right )^2}{\sqrt {d-c^2 d x^2}} \, dx &=\frac {\sqrt {1-c^2 x^2} \int \frac {(f+g x)^2 \left (a+b \sin ^{-1}(c x)\right )^2}{\sqrt {1-c^2 x^2}} \, dx}{\sqrt {d-c^2 d x^2}}\\ &=\frac {\sqrt {1-c^2 x^2} \text {Subst}\left (\int (a+b x)^2 (c f+g \sin (x))^2 \, dx,x,\sin ^{-1}(c x)\right )}{c^3 \sqrt {d-c^2 d x^2}}\\ &=\frac {\sqrt {1-c^2 x^2} \text {Subst}\left (\int \left (c^2 f^2 (a+b x)^2+2 c f g (a+b x)^2 \sin (x)+g^2 (a+b x)^2 \sin ^2(x)\right ) \, dx,x,\sin ^{-1}(c x)\right )}{c^3 \sqrt {d-c^2 d x^2}}\\ &=\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )^3}{3 b c \sqrt {d-c^2 d x^2}}+\frac {\left (2 f g \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int (a+b x)^2 \sin (x) \, dx,x,\sin ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}+\frac {\left (g^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int (a+b x)^2 \sin ^2(x) \, dx,x,\sin ^{-1}(c x)\right )}{c^3 \sqrt {d-c^2 d x^2}}\\ &=\frac {b g^2 x^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )}{2 c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{2 c^2 \sqrt {d-c^2 d x^2}}+\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )^3}{3 b c \sqrt {d-c^2 d x^2}}+\frac {\left (4 b f g \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int (a+b x) \cos (x) \, dx,x,\sin ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}+\frac {\left (g^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int (a+b x)^2 \, dx,x,\sin ^{-1}(c x)\right )}{2 c^3 \sqrt {d-c^2 d x^2}}-\frac {\left (b^2 g^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \sin ^2(x) \, dx,x,\sin ^{-1}(c x)\right )}{2 c^3 \sqrt {d-c^2 d x^2}}\\ &=\frac {b^2 g^2 x \left (1-c^2 x^2\right )}{4 c^2 \sqrt {d-c^2 d x^2}}+\frac {4 b f g x \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )}{c \sqrt {d-c^2 d x^2}}+\frac {b g^2 x^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )}{2 c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{2 c^2 \sqrt {d-c^2 d x^2}}+\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )^3}{3 b c \sqrt {d-c^2 d x^2}}+\frac {g^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )^3}{6 b c^3 \sqrt {d-c^2 d x^2}}-\frac {\left (4 b^2 f g \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \sin (x) \, dx,x,\sin ^{-1}(c x)\right )}{c^2 \sqrt {d-c^2 d x^2}}-\frac {\left (b^2 g^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int 1 \, dx,x,\sin ^{-1}(c x)\right )}{4 c^3 \sqrt {d-c^2 d x^2}}\\ &=\frac {4 b^2 f g \left (1-c^2 x^2\right )}{c^2 \sqrt {d-c^2 d x^2}}+\frac {b^2 g^2 x \left (1-c^2 x^2\right )}{4 c^2 \sqrt {d-c^2 d x^2}}-\frac {b^2 g^2 \sqrt {1-c^2 x^2} \sin ^{-1}(c x)}{4 c^3 \sqrt {d-c^2 d x^2}}+\frac {4 b f g x \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )}{c \sqrt {d-c^2 d x^2}}+\frac {b g^2 x^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )}{2 c \sqrt {d-c^2 d x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{c^2 \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) \left (a+b \sin ^{-1}(c x)\right )^2}{2 c^2 \sqrt {d-c^2 d x^2}}+\frac {f^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )^3}{3 b c \sqrt {d-c^2 d x^2}}+\frac {g^2 \sqrt {1-c^2 x^2} \left (a+b \sin ^{-1}(c x)\right )^3}{6 b c^3 \sqrt {d-c^2 d x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.89, size = 400, normalized size = 0.98 \begin {gather*} \frac {-4 b^2 \sqrt {d} \left (2 c^2 f^2+g^2\right ) \left (-1+c^2 x^2\right ) \text {ArcSin}(c x)^3-12 a^2 \left (2 c^2 f^2+g^2\right ) \sqrt {1-c^2 x^2} \sqrt {d-c^2 d x^2} \text {ArcTan}\left (\frac {c x \sqrt {d-c^2 d x^2}}{\sqrt {d} \left (-1+c^2 x^2\right )}\right )+6 b \sqrt {d} g \left (-1+c^2 x^2\right ) \text {ArcSin}(c x) \left (16 c f \left (-b c x+a \sqrt {1-c^2 x^2}\right )+b g \cos (2 \text {ArcSin}(c x))+2 a g \sin (2 \text {ArcSin}(c x))\right )+3 \sqrt {d} g \left (-1+c^2 x^2\right ) \left (4 c \left (-8 a b c f x-8 b^2 f \sqrt {1-c^2 x^2}+a^2 (4 f+g x) \sqrt {1-c^2 x^2}\right )+2 a b g \cos (2 \text {ArcSin}(c x))-b^2 g \sin (2 \text {ArcSin}(c x))\right )+6 b \sqrt {d} \left (-1+c^2 x^2\right ) \text {ArcSin}(c x)^2 \left (-2 a \left (2 c^2 f^2+g^2\right )+8 b c f g \sqrt {1-c^2 x^2}+b g^2 \sin (2 \text {ArcSin}(c x))\right )}{24 c^3 \sqrt {d} \sqrt {1-c^2 x^2} \sqrt {d-c^2 d x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.63, size = 936, normalized size = 2.28
method | result | size |
default | \(-\frac {a^{2} g^{2} x \sqrt {-c^{2} d \,x^{2}+d}}{2 c^{2} d}+\frac {a^{2} g^{2} \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{2 c^{2} \sqrt {c^{2} d}}-\frac {2 a^{2} f g \sqrt {-c^{2} d \,x^{2}+d}}{c^{2} d}+\frac {a^{2} f^{2} \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{\sqrt {c^{2} d}}+b^{2} \left (-\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arcsin \left (c x \right )^{3} \left (2 c^{2} f^{2}+g^{2}\right )}{6 c^{3} d \left (c^{2} x^{2}-1\right )}-\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \left (c^{2} x^{2}-i \sqrt {-c^{2} x^{2}+1}\, x c -1\right ) f g \left (\arcsin \left (c x \right )^{2}-2+2 i \arcsin \left (c x \right )\right )}{c^{2} d \left (c^{2} x^{2}-1\right )}-\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \left (i \sqrt {-c^{2} x^{2}+1}\, x c +c^{2} x^{2}-1\right ) f g \left (\arcsin \left (c x \right )^{2}-2-2 i \arcsin \left (c x \right )\right )}{c^{2} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arcsin \left (c x \right ) g^{2}}{8 c^{3} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \left (2 \arcsin \left (c x \right )^{2}-1\right ) x}{16 c^{2} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \arcsin \left (c x \right ) g^{2} \cos \left (3 \arcsin \left (c x \right )\right )}{8 c^{3} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \left (2 \arcsin \left (c x \right )^{2}-1\right ) \sin \left (3 \arcsin \left (c x \right )\right )}{16 c^{3} d \left (c^{2} x^{2}-1\right )}\right )+2 a b \left (-\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arcsin \left (c x \right )^{2} \left (2 c^{2} f^{2}+g^{2}\right )}{4 c^{3} d \left (c^{2} x^{2}-1\right )}-\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \left (c^{2} x^{2}-i \sqrt {-c^{2} x^{2}+1}\, x c -1\right ) f g \left (\arcsin \left (c x \right )+i\right )}{c^{2} d \left (c^{2} x^{2}-1\right )}-\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \left (i \sqrt {-c^{2} x^{2}+1}\, x c +c^{2} x^{2}-1\right ) f g \left (\arcsin \left (c x \right )-i\right )}{c^{2} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, g^{2}}{16 c^{3} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \arcsin \left (c x \right ) x}{8 c^{2} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \cos \left (3 \arcsin \left (c x \right )\right )}{16 c^{3} d \left (c^{2} x^{2}-1\right )}+\frac {\sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \arcsin \left (c x \right ) \sin \left (3 \arcsin \left (c x \right )\right )}{8 c^{3} d \left (c^{2} x^{2}-1\right )}\right )\) | \(936\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \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 \frac {{\left (f+g\,x\right )}^2\,{\left (a+b\,\mathrm {asin}\left (c\,x\right )\right )}^2}{\sqrt {d-c^2\,d\,x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________