Optimal. Leaf size=285 \[ \frac {\left (4 a^2-7 b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} F\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 b^2 d \sqrt {a+b \sin (c+d x)}}-\frac {\left (4 a^2+3 b^2\right ) \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 a b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}-\frac {b \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \Pi \left (2;\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{a d \sqrt {a+b \sin (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.67, antiderivative size = 285, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {2894, 3059, 2655, 2653, 3002, 2663, 2661, 2807, 2805} \[ \frac {\left (4 a^2-7 b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} F\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 b^2 d \sqrt {a+b \sin (c+d x)}}-\frac {\left (4 a^2+3 b^2\right ) \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 a b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}-\frac {b \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \Pi \left (2;\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{a d \sqrt {a+b \sin (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2805
Rule 2807
Rule 2894
Rule 3002
Rule 3059
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{\sqrt {a+b \sin (c+d x)}} \, dx &=-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}-\frac {2 \int \frac {\csc (c+d x) \left (\frac {3 b^2}{4}+\frac {5}{2} a b \sin (c+d x)+\frac {1}{4} \left (4 a^2+3 b^2\right ) \sin ^2(c+d x)\right )}{\sqrt {a+b \sin (c+d x)}} \, dx}{3 a b}\\ &=-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}+\frac {2 \int \frac {\csc (c+d x) \left (-\frac {3 b^3}{4}+\frac {1}{4} a \left (4 a^2-7 b^2\right ) \sin (c+d x)\right )}{\sqrt {a+b \sin (c+d x)}} \, dx}{3 a b^2}-\frac {\left (4 a^2+3 b^2\right ) \int \sqrt {a+b \sin (c+d x)} \, dx}{6 a b^2}\\ &=-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}+\frac {1}{6} \left (-7+\frac {4 a^2}{b^2}\right ) \int \frac {1}{\sqrt {a+b \sin (c+d x)}} \, dx-\frac {b \int \frac {\csc (c+d x)}{\sqrt {a+b \sin (c+d x)}} \, dx}{2 a}-\frac {\left (\left (4 a^2+3 b^2\right ) \sqrt {a+b \sin (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}} \, dx}{6 a b^2 \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\\ &=-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}-\frac {\left (4 a^2+3 b^2\right ) E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{3 a b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {\left (\left (-7+\frac {4 a^2}{b^2}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}} \, dx}{6 \sqrt {a+b \sin (c+d x)}}-\frac {\left (b \sqrt {\frac {a+b \sin (c+d x)}{a+b}}\right ) \int \frac {\csc (c+d x)}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}} \, dx}{2 a \sqrt {a+b \sin (c+d x)}}\\ &=-\frac {2 \cos (c+d x) \sqrt {a+b \sin (c+d x)}}{3 b d}-\frac {\cot (c+d x) \sqrt {a+b \sin (c+d x)}}{a d}-\frac {\left (4 a^2+3 b^2\right ) E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{3 a b^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {\left (7-\frac {4 a^2}{b^2}\right ) F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{3 d \sqrt {a+b \sin (c+d x)}}-\frac {b \Pi \left (2;\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{a d \sqrt {a+b \sin (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 3.64, size = 416, normalized size = 1.46 \[ \frac {\frac {2 \left (4 a^2+9 b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \Pi \left (2;\frac {1}{4} (-2 c-2 d x+\pi )|\frac {2 b}{a+b}\right )}{a b \sqrt {a+b \sin (c+d x)}}+\frac {2 i \left (4 a^2+3 b^2\right ) \sec (c+d x) \sqrt {-\frac {b (\sin (c+d x)-1)}{a+b}} \sqrt {-\frac {b (\sin (c+d x)+1)}{a-b}} \left (b \left (b \Pi \left (\frac {a+b}{a};i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (c+d x)}\right )|\frac {a+b}{a-b}\right )-2 a F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (c+d x)}\right )|\frac {a+b}{a-b}\right )\right )-2 a (a-b) E\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (c+d x)}\right )|\frac {a+b}{a-b}\right )\right )}{a^2 b^3 \sqrt {-\frac {1}{a+b}}}-\frac {4 \cot (c+d x) (2 a \sin (c+d x)+3 b) \sqrt {a+b \sin (c+d x)}}{a b}+\frac {40 \sqrt {\frac {a+b \sin (c+d x)}{a+b}} F\left (\frac {1}{4} (-2 c-2 d x+\pi )|\frac {2 b}{a+b}\right )}{\sqrt {a+b \sin (c+d x)}}}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (d x + c\right )^{2} \cot \left (d x + c\right )^{2}}{\sqrt {b \sin \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 3.08, size = 704, normalized size = 2.47 \[ \frac {\sqrt {-\left (-a -b \sin \left (d x +c \right )\right ) \left (\cos ^{2}\left (d x +c \right )\right )}\, \left (\left (-2 a^{3} b^{2}-3 a \,b^{4}\right ) \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+\sqrt {-\frac {b \sin \left (d x +c \right )}{a +b}+\frac {b}{a +b}}\, \sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {b \sin \left (d x +c \right )}{a -b}-\frac {b}{a -b}}\, \left (3 \EllipticPi \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \frac {a b -b^{2}}{a b}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{4}-3 \EllipticPi \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \frac {a b -b^{2}}{a b}, \sqrt {\frac {a -b}{a +b}}\right ) b^{5}-4 \EllipticF \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{4} b -6 \EllipticF \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{3} b^{2}+7 \EllipticF \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{2} b^{3}+3 \EllipticF \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{4}+4 \EllipticE \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{5}-\EllipticE \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{3} b^{2}-3 \EllipticE \left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{4}\right ) \sin \left (d x +c \right )+2 a^{2} b^{3} \left (\cos ^{4}\left (d x +c \right )\right )-5 a^{2} b^{3} \left (\cos ^{2}\left (d x +c \right )\right )\right )}{3 b^{3} \sqrt {\left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) b +\left (\cos ^{2}\left (d x +c \right )\right ) a}\, a^{2} \sin \left (d x +c \right ) \cos \left (d x +c \right ) \sqrt {a +b \sin \left (d x +c \right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (d x + c\right )^{2} \cot \left (d x + c\right )^{2}}{\sqrt {b \sin \left (d x + c\right ) + a}}\,{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 \frac {{\cos \left (c+d\,x\right )}^2\,{\mathrm {cot}\left (c+d\,x\right )}^2}{\sqrt {a+b\,\sin \left (c+d\,x\right )}} \,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 \frac {\cos ^{2}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}}{\sqrt {a + b \sin {\left (c + d x \right )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________