Optimal. Leaf size=450 \[ \frac {1}{2} f^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {f^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c \sqrt {1-c^2 x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{3 c^2}-\frac {g^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{8 c^2}+\frac {1}{4} g^2 x^3 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {g^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{16 b c^3 \sqrt {1-c^2 x^2}}+\frac {b c f^2 x^2 \sqrt {d-c^2 d x^2}}{4 \sqrt {1-c^2 x^2}}-\frac {2 b f g x \sqrt {d-c^2 d x^2}}{3 c \sqrt {1-c^2 x^2}}+\frac {2 b c f g x^3 \sqrt {d-c^2 d x^2}}{9 \sqrt {1-c^2 x^2}}-\frac {b g^2 x^2 \sqrt {d-c^2 d x^2}}{16 c \sqrt {1-c^2 x^2}}+\frac {b c g^2 x^4 \sqrt {d-c^2 d x^2}}{16 \sqrt {1-c^2 x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.53, antiderivative size = 450, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 8, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {4778, 4764, 4648, 4642, 30, 4678, 4698, 4708} \[ \frac {1}{2} f^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {f^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c \sqrt {1-c^2 x^2}}-\frac {2 f g \left (1-c^2 x^2\right ) \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{3 c^2}+\frac {1}{4} g^2 x^3 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {g^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{8 c^2}-\frac {g^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{16 b c^3 \sqrt {1-c^2 x^2}}+\frac {b c f^2 x^2 \sqrt {d-c^2 d x^2}}{4 \sqrt {1-c^2 x^2}}+\frac {2 b c f g x^3 \sqrt {d-c^2 d x^2}}{9 \sqrt {1-c^2 x^2}}-\frac {2 b f g x \sqrt {d-c^2 d x^2}}{3 c \sqrt {1-c^2 x^2}}+\frac {b c g^2 x^4 \sqrt {d-c^2 d x^2}}{16 \sqrt {1-c^2 x^2}}-\frac {b g^2 x^2 \sqrt {d-c^2 d x^2}}{16 c \sqrt {1-c^2 x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 4642
Rule 4648
Rule 4678
Rule 4698
Rule 4708
Rule 4764
Rule 4778
Rubi steps
\begin {align*} \int (f+g x)^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right ) \, dx &=\frac {\sqrt {d-c^2 d x^2} \int (f+g x)^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \, dx}{\sqrt {1-c^2 x^2}}\\ &=\frac {\sqrt {d-c^2 d x^2} \int \left (f^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )+2 f g x \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )+g^2 x^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right )\right ) \, dx}{\sqrt {1-c^2 x^2}}\\ &=\frac {\left (f^2 \sqrt {d-c^2 d x^2}\right ) \int \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \, dx}{\sqrt {1-c^2 x^2}}+\frac {\left (2 f g \sqrt {d-c^2 d x^2}\right ) \int x \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \, dx}{\sqrt {1-c^2 x^2}}+\frac {\left (g^2 \sqrt {d-c^2 d x^2}\right ) \int x^2 \sqrt {1-c^2 x^2} \left (a+b \cos ^{-1}(c x)\right ) \, dx}{\sqrt {1-c^2 x^2}}\\ &=\frac {1}{2} f^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )+\frac {1}{4} g^2 x^3 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {2 f g \left (1-c^2 x^2\right ) \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{3 c^2}+\frac {\left (f^2 \sqrt {d-c^2 d x^2}\right ) \int \frac {a+b \cos ^{-1}(c x)}{\sqrt {1-c^2 x^2}} \, dx}{2 \sqrt {1-c^2 x^2}}+\frac {\left (b c f^2 \sqrt {d-c^2 d x^2}\right ) \int x \, dx}{2 \sqrt {1-c^2 x^2}}-\frac {\left (2 b f g \sqrt {d-c^2 d x^2}\right ) \int \left (1-c^2 x^2\right ) \, dx}{3 c \sqrt {1-c^2 x^2}}+\frac {\left (g^2 \sqrt {d-c^2 d x^2}\right ) \int \frac {x^2 \left (a+b \cos ^{-1}(c x)\right )}{\sqrt {1-c^2 x^2}} \, dx}{4 \sqrt {1-c^2 x^2}}+\frac {\left (b c g^2 \sqrt {d-c^2 d x^2}\right ) \int x^3 \, dx}{4 \sqrt {1-c^2 x^2}}\\ &=-\frac {2 b f g x \sqrt {d-c^2 d x^2}}{3 c \sqrt {1-c^2 x^2}}+\frac {b c f^2 x^2 \sqrt {d-c^2 d x^2}}{4 \sqrt {1-c^2 x^2}}+\frac {2 b c f g x^3 \sqrt {d-c^2 d x^2}}{9 \sqrt {1-c^2 x^2}}+\frac {b c g^2 x^4 \sqrt {d-c^2 d x^2}}{16 \sqrt {1-c^2 x^2}}+\frac {1}{2} f^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {g^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{8 c^2}+\frac {1}{4} g^2 x^3 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {2 f g \left (1-c^2 x^2\right ) \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{3 c^2}-\frac {f^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c \sqrt {1-c^2 x^2}}+\frac {\left (g^2 \sqrt {d-c^2 d x^2}\right ) \int \frac {a+b \cos ^{-1}(c x)}{\sqrt {1-c^2 x^2}} \, dx}{8 c^2 \sqrt {1-c^2 x^2}}-\frac {\left (b g^2 \sqrt {d-c^2 d x^2}\right ) \int x \, dx}{8 c \sqrt {1-c^2 x^2}}\\ &=-\frac {2 b f g x \sqrt {d-c^2 d x^2}}{3 c \sqrt {1-c^2 x^2}}+\frac {b c f^2 x^2 \sqrt {d-c^2 d x^2}}{4 \sqrt {1-c^2 x^2}}-\frac {b g^2 x^2 \sqrt {d-c^2 d x^2}}{16 c \sqrt {1-c^2 x^2}}+\frac {2 b c f g x^3 \sqrt {d-c^2 d x^2}}{9 \sqrt {1-c^2 x^2}}+\frac {b c g^2 x^4 \sqrt {d-c^2 d x^2}}{16 \sqrt {1-c^2 x^2}}+\frac {1}{2} f^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {g^2 x \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{8 c^2}+\frac {1}{4} g^2 x^3 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )-\frac {2 f g \left (1-c^2 x^2\right ) \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )}{3 c^2}-\frac {f^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{4 b c \sqrt {1-c^2 x^2}}-\frac {g^2 \sqrt {d-c^2 d x^2} \left (a+b \cos ^{-1}(c x)\right )^2}{16 b c^3 \sqrt {1-c^2 x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.40, size = 320, normalized size = 0.71 \[ \frac {48 a c \sqrt {1-c^2 x^2} \sqrt {d-c^2 d x^2} \left (12 c^2 f^2 x+16 f g \left (c^2 x^2-1\right )+3 g^2 x \left (2 c^2 x^2-1\right )\right )-144 a \sqrt {d} \sqrt {1-c^2 x^2} \left (4 c^2 f^2+g^2\right ) \tan ^{-1}\left (\frac {c x \sqrt {d-c^2 d x^2}}{\sqrt {d} \left (c^2 x^2-1\right )}\right )+144 b c^2 f^2 \sqrt {d-c^2 d x^2} \left (\cos \left (2 \cos ^{-1}(c x)\right )+2 \cos ^{-1}(c x) \left (\sin \left (2 \cos ^{-1}(c x)\right )-\cos ^{-1}(c x)\right )\right )-64 b c f g \sqrt {d-c^2 d x^2} \left (12 \left (1-c^2 x^2\right )^{3/2} \cos ^{-1}(c x)+9 c x-\cos \left (3 \cos ^{-1}(c x)\right )\right )+9 b g^2 \sqrt {d-c^2 d x^2} \left (-8 \cos ^{-1}(c x)^2+\cos \left (4 \cos ^{-1}(c x)\right )+4 \cos ^{-1}(c x) \sin \left (4 \cos ^{-1}(c x)\right )\right )}{1152 c^3 \sqrt {1-c^2 x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\sqrt {-c^{2} d x^{2} + d} {\left (a g^{2} x^{2} + 2 \, a f g x + a f^{2} + {\left (b g^{2} x^{2} + 2 \, b f g x + b f^{2}\right )} \arccos \left (c x\right )\right )}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.32, size = 912, normalized size = 2.03 \[ -\frac {a \,g^{2} x \left (-c^{2} d \,x^{2}+d \right )^{\frac {3}{2}}}{4 c^{2} d}+\frac {a \,g^{2} x \sqrt {-c^{2} d \,x^{2}+d}}{8 c^{2}}+\frac {a \,g^{2} d \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{8 c^{2} \sqrt {c^{2} d}}-\frac {2 a f g \left (-c^{2} d \,x^{2}+d \right )^{\frac {3}{2}}}{3 c^{2} d}+\frac {a \,f^{2} x \sqrt {-c^{2} d \,x^{2}+d}}{2}+\frac {a \,f^{2} d \arctan \left (\frac {\sqrt {c^{2} d}\, x}{\sqrt {-c^{2} d \,x^{2}+d}}\right )}{2 \sqrt {c^{2} d}}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f^{2} \sqrt {-c^{2} x^{2}+1}}{8 c \left (c^{2} x^{2}-1\right )}-\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f^{2} \arccos \left (c x \right ) x}{2 \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arccos \left (c x \right )^{2} f^{2}}{4 c \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, \sqrt {-c^{2} x^{2}+1}\, \arccos \left (c x \right )^{2} g^{2}}{16 c^{3} \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} c^{2} \arccos \left (c x \right ) x^{5}}{4 c^{2} x^{2}-4}-\frac {3 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \arccos \left (c x \right ) x^{3}}{8 \left (c^{2} x^{2}-1\right )}-\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \sqrt {-c^{2} x^{2}+1}}{128 c^{3} \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \arccos \left (c x \right ) x}{8 c^{2} \left (c^{2} x^{2}-1\right )}+\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \arccos \left (c x \right )}{3 c^{2} \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f^{2} c^{2} \arccos \left (c x \right ) x^{3}}{2 c^{2} x^{2}-2}-\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f^{2} c \sqrt {-c^{2} x^{2}+1}\, x^{2}}{4 \left (c^{2} x^{2}-1\right )}-\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} c \sqrt {-c^{2} x^{2}+1}\, x^{4}}{16 \left (c^{2} x^{2}-1\right )}+\frac {b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, g^{2} \sqrt {-c^{2} x^{2}+1}\, x^{2}}{16 c \left (c^{2} x^{2}-1\right )}+\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \,c^{2} \arccos \left (c x \right ) x^{4}}{3 \left (c^{2} x^{2}-1\right )}-\frac {4 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \arccos \left (c x \right ) x^{2}}{3 \left (c^{2} x^{2}-1\right )}-\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g c \sqrt {-c^{2} x^{2}+1}\, x^{3}}{9 \left (c^{2} x^{2}-1\right )}+\frac {2 b \sqrt {-d \left (c^{2} x^{2}-1\right )}\, f g \sqrt {-c^{2} x^{2}+1}\, x}{3 c \left (c^{2} x^{2}-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{2} \, {\left (\sqrt {-c^{2} d x^{2} + d} x + \frac {\sqrt {d} \arcsin \left (c x\right )}{c}\right )} a f^{2} + \frac {1}{8} \, a g^{2} {\left (\frac {\sqrt {-c^{2} d x^{2} + d} x}{c^{2}} - \frac {2 \, {\left (-c^{2} d x^{2} + d\right )}^{\frac {3}{2}} x}{c^{2} d} + \frac {\sqrt {d} \arcsin \left (c x\right )}{c^{3}}\right )} - \frac {2 \, {\left (-c^{2} d x^{2} + d\right )}^{\frac {3}{2}} a f g}{3 \, c^{2} d} + \sqrt {d} \int {\left (b g^{2} x^{2} + 2 \, b f g x + b f^{2}\right )} \sqrt {c x + 1} \sqrt {-c x + 1} \arctan \left (\sqrt {c x + 1} \sqrt {-c x + 1}, c x\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (f+g\,x\right )}^2\,\left (a+b\,\mathrm {acos}\left (c\,x\right )\right )\,\sqrt {d-c^2\,d\,x^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {- d \left (c x - 1\right ) \left (c x + 1\right )} \left (a + b \operatorname {acos}{\left (c x \right )}\right ) \left (f + g x\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________