Integrand size = 33, antiderivative size = 410 \[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\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} \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 \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 \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 \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 \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 \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 \arcsin (c x))^3}{6 b c^3 \sqrt {d-c^2 d x^2}} \]
[Out]
Time = 0.35 (sec) , antiderivative size = 410, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4861, 4857, 3398, 3377, 2718, 3392, 32, 2715, 8} \[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\frac {f^2 \sqrt {1-c^2 x^2} (a+b \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 \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 \arcsin (c x))}{c \sqrt {d-c^2 d x^2}}-\frac {g^2 x \left (1-c^2 x^2\right ) (a+b \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 \arcsin (c x))}{2 c \sqrt {d-c^2 d x^2}}+\frac {g^2 \sqrt {1-c^2 x^2} (a+b \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} \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}} \]
[In]
[Out]
Rule 8
Rule 32
Rule 2715
Rule 2718
Rule 3377
Rule 3392
Rule 3398
Rule 4857
Rule 4861
Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {1-c^2 x^2} \int \frac {(f+g x)^2 (a+b \arcsin (c x))^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,\arcsin (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,\arcsin (c x)\right )}{c^3 \sqrt {d-c^2 d x^2}} \\ & = \frac {f^2 \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^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,\arcsin (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,\arcsin (c x)\right )}{c^3 \sqrt {d-c^2 d x^2}} \\ & = \frac {b g^2 x^2 \sqrt {1-c^2 x^2} (a+b \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 \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 \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 \arcsin (c x))^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}(\int (a+b x) \cos (x) \, dx,x,\arcsin (c x))}{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,\arcsin (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,\arcsin (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} (a+b \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 \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 \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 \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 \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 \arcsin (c x))^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}(\int \sin (x) \, dx,x,\arcsin (c x))}{c^2 \sqrt {d-c^2 d x^2}}-\frac {\left (b^2 g^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}(\int 1 \, dx,x,\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}}-\frac {b^2 g^2 \sqrt {1-c^2 x^2} \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 \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 \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 \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 \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 \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 \arcsin (c x))^3}{6 b c^3 \sqrt {d-c^2 d x^2}} \\ \end{align*}
Time = 1.35 (sec) , antiderivative size = 400, normalized size of antiderivative = 0.98 \[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\frac {-4 b^2 \sqrt {d} \left (2 c^2 f^2+g^2\right ) \left (-1+c^2 x^2\right ) \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} \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 ) \arcsin (c x) \left (16 c f \left (-b c x+a \sqrt {1-c^2 x^2}\right )+b g \cos (2 \arcsin (c x))+2 a g \sin (2 \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 \arcsin (c x))-b^2 g \sin (2 \arcsin (c x))\right )+6 b \sqrt {d} \left (-1+c^2 x^2\right ) \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 \arcsin (c x))\right )}{24 c^3 \sqrt {d} \sqrt {1-c^2 x^2} \sqrt {d-c^2 d x^2}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.70 (sec) , antiderivative size = 928, normalized size of antiderivative = 2.26
method | result | size |
default | \(a^{2} \left (\frac {f^{2} \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{\sqrt {c^{2} d}}+g^{2} \left (-\frac {x \sqrt {-c^{2} d \,x^{2}+d}}{2 c^{2} d}+\frac {\arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{2 c^{2} \sqrt {c^{2} d}}\right )-\frac {2 f g \sqrt {-c^{2} d \,x^{2}+d}}{c^{2} d}\right )+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 c x \sqrt {-c^{2} x^{2}+1}-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 c x \sqrt {-c^{2} x^{2}+1}+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 c x \sqrt {-c^{2} x^{2}+1}-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 c x \sqrt {-c^{2} x^{2}+1}+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 )\) | \(928\) |
parts | \(a^{2} \left (\frac {f^{2} \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{\sqrt {c^{2} d}}+g^{2} \left (-\frac {x \sqrt {-c^{2} d \,x^{2}+d}}{2 c^{2} d}+\frac {\arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{2 c^{2} \sqrt {c^{2} d}}\right )-\frac {2 f g \sqrt {-c^{2} d \,x^{2}+d}}{c^{2} d}\right )+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 c x \sqrt {-c^{2} x^{2}+1}-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 c x \sqrt {-c^{2} x^{2}+1}+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 c x \sqrt {-c^{2} x^{2}+1}-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 c x \sqrt {-c^{2} x^{2}+1}+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 )\) | \(928\) |
[In]
[Out]
\[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\int { \frac {{\left (g x + f\right )}^{2} {\left (b \arcsin \left (c x\right ) + a\right )}^{2}}{\sqrt {-c^{2} d x^{2} + d}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
\[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\int { \frac {{\left (g x + f\right )}^{2} {\left (b \arcsin \left (c x\right ) + a\right )}^{2}}{\sqrt {-c^{2} d x^{2} + d}} \,d x } \]
[In]
[Out]
\[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\int { \frac {{\left (g x + f\right )}^{2} {\left (b \arcsin \left (c x\right ) + a\right )}^{2}}{\sqrt {-c^{2} d x^{2} + d}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^2 (a+b \arcsin (c x))^2}{\sqrt {d-c^2 d x^2}} \, dx=\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 \]
[In]
[Out]