\(\int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx\) [1144]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F(-1)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 351 \[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{24 a^2 d}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}+\frac {\left (80 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)}}{24 a^2 d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {\left (32 a^2+b^2\right ) \operatorname {EllipticF}\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}}}{24 a d \sqrt {a+b \sin (c+d x)}}-\frac {b \left (12 a^2-b^2\right ) \operatorname {EllipticPi}\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}}}{8 a^2 d \sqrt {a+b \sin (c+d x)}} \] Output:

1/24*(32*a^2-3*b^2)*cot(d*x+c)*(a+b*sin(d*x+c))^(1/2)/a^2/d+1/4*b*cot(d*x+ 
c)*csc(d*x+c)*(a+b*sin(d*x+c))^(3/2)/a^2/d-1/3*cot(d*x+c)*csc(d*x+c)^2*(a+ 
b*sin(d*x+c))^(3/2)/a/d-1/24*(80*a^2+3*b^2)*EllipticE(cos(1/2*c+1/4*Pi+1/2 
*d*x),2^(1/2)*(b/(a+b))^(1/2))*(a+b*sin(d*x+c))^(1/2)/a^2/d/((a+b*sin(d*x+ 
c))/(a+b))^(1/2)-1/24*(32*a^2+b^2)*InverseJacobiAM(1/2*c-1/4*Pi+1/2*d*x,2^ 
(1/2)*(b/(a+b))^(1/2))*((a+b*sin(d*x+c))/(a+b))^(1/2)/a/d/(a+b*sin(d*x+c)) 
^(1/2)+1/8*b*(12*a^2-b^2)*EllipticPi(cos(1/2*c+1/4*Pi+1/2*d*x),2,2^(1/2)*( 
b/(a+b))^(1/2))*((a+b*sin(d*x+c))/(a+b))^(1/2)/a^2/d/(a+b*sin(d*x+c))^(1/2 
)
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 6.36 (sec) , antiderivative size = 473, normalized size of antiderivative = 1.35 \[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\frac {-\frac {4 \cot (c+d x) \left (-32 a^2-3 b^2+2 a b \csc (c+d x)+8 a^2 \csc ^2(c+d x)\right ) \sqrt {a+b \sin (c+d x)}}{a^2}+\frac {\frac {2 i \left (80 a^2+3 b^2\right ) \cos (2 (c+d x)) \csc ^2(c+d x) \left (2 a (a-b) E\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (c+d x)}\right )|\frac {a+b}{a-b}\right )+b \left (2 a \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (c+d x)}\right ),\frac {a+b}{a-b}\right )-b \operatorname {EllipticPi}\left (\frac {a+b}{a},i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (c+d x)}\right ),\frac {a+b}{a-b}\right )\right )\right ) \sec (c+d x) \sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sin (c+d x))}{a-b}}}{a b \sqrt {-\frac {1}{a+b}} \left (-2+\csc ^2(c+d x)\right )}-\frac {8 a \left (24 a^2+b^2\right ) \operatorname {EllipticF}\left (\frac {1}{4} (-2 c+\pi -2 d x),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{\sqrt {a+b \sin (c+d x)}}-\frac {2 b \left (8 a^2+9 b^2\right ) \operatorname {EllipticPi}\left (2,\frac {1}{4} (-2 c+\pi -2 d x),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{\sqrt {a+b \sin (c+d x)}}}{a^2}}{96 d} \] Input:

Integrate[Cot[c + d*x]^4*Sqrt[a + b*Sin[c + d*x]],x]
 

Output:

((-4*Cot[c + d*x]*(-32*a^2 - 3*b^2 + 2*a*b*Csc[c + d*x] + 8*a^2*Csc[c + d* 
x]^2)*Sqrt[a + b*Sin[c + d*x]])/a^2 + (((2*I)*(80*a^2 + 3*b^2)*Cos[2*(c + 
d*x)]*Csc[c + d*x]^2*(2*a*(a - b)*EllipticE[I*ArcSinh[Sqrt[-(a + b)^(-1)]* 
Sqrt[a + b*Sin[c + d*x]]], (a + b)/(a - b)] + b*(2*a*EllipticF[I*ArcSinh[S 
qrt[-(a + b)^(-1)]*Sqrt[a + b*Sin[c + d*x]]], (a + b)/(a - b)] - b*Ellipti 
cPi[(a + b)/a, I*ArcSinh[Sqrt[-(a + b)^(-1)]*Sqrt[a + b*Sin[c + d*x]]], (a 
 + b)/(a - b)]))*Sec[c + d*x]*Sqrt[-((b*(-1 + Sin[c + d*x]))/(a + b))]*Sqr 
t[-((b*(1 + Sin[c + d*x]))/(a - b))])/(a*b*Sqrt[-(a + b)^(-1)]*(-2 + Csc[c 
 + d*x]^2)) - (8*a*(24*a^2 + b^2)*EllipticF[(-2*c + Pi - 2*d*x)/4, (2*b)/( 
a + b)]*Sqrt[(a + b*Sin[c + d*x])/(a + b)])/Sqrt[a + b*Sin[c + d*x]] - (2* 
b*(8*a^2 + 9*b^2)*EllipticPi[2, (-2*c + Pi - 2*d*x)/4, (2*b)/(a + b)]*Sqrt 
[(a + b*Sin[c + d*x])/(a + b)])/Sqrt[a + b*Sin[c + d*x]])/a^2)/(96*d)
 

Rubi [A] (verified)

Time = 2.63 (sec) , antiderivative size = 353, normalized size of antiderivative = 1.01, number of steps used = 21, number of rules used = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.913, Rules used = {3042, 3204, 27, 3042, 3526, 27, 3042, 3538, 25, 3042, 3134, 3042, 3132, 3481, 3042, 3142, 3042, 3140, 3286, 3042, 3284}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a+b \sin (c+d x)}}{\tan (c+d x)^4}dx\)

\(\Big \downarrow \) 3204

\(\displaystyle -\frac {\int \frac {1}{4} \csc ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (32 a^2+2 b \sin (c+d x) a-3 b^2-3 \left (8 a^2+b^2\right ) \sin ^2(c+d x)\right )dx}{6 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {\int \csc ^2(c+d x) \sqrt {a+b \sin (c+d x)} \left (32 a^2+2 b \sin (c+d x) a-3 b^2-3 \left (8 a^2+b^2\right ) \sin ^2(c+d x)\right )dx}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\int \frac {\sqrt {a+b \sin (c+d x)} \left (32 a^2+2 b \sin (c+d x) a-3 b^2-3 \left (8 a^2+b^2\right ) \sin (c+d x)^2\right )}{\sin (c+d x)^2}dx}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3526

\(\displaystyle -\frac {\int \frac {\csc (c+d x) \left (-b \left (80 a^2+3 b^2\right ) \sin ^2(c+d x)-2 a \left (24 a^2+b^2\right ) \sin (c+d x)+3 b \left (12 a^2-b^2\right )\right )}{2 \sqrt {a+b \sin (c+d x)}}dx-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {\frac {1}{2} \int \frac {\csc (c+d x) \left (-b \left (80 a^2+3 b^2\right ) \sin ^2(c+d x)-2 a \left (24 a^2+b^2\right ) \sin (c+d x)+3 b \left (12 a^2-b^2\right )\right )}{\sqrt {a+b \sin (c+d x)}}dx-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{2} \int \frac {-b \left (80 a^2+3 b^2\right ) \sin (c+d x)^2-2 a \left (24 a^2+b^2\right ) \sin (c+d x)+3 b \left (12 a^2-b^2\right )}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3538

\(\displaystyle -\frac {\frac {1}{2} \left (-\left (\left (80 a^2+3 b^2\right ) \int \sqrt {a+b \sin (c+d x)}dx\right )-\frac {\int -\frac {\csc (c+d x) \left (3 \left (12 a^2-b^2\right ) b^2+a \left (32 a^2+b^2\right ) \sin (c+d x) b\right )}{\sqrt {a+b \sin (c+d x)}}dx}{b}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\int \frac {\csc (c+d x) \left (3 \left (12 a^2-b^2\right ) b^2+a \left (32 a^2+b^2\right ) \sin (c+d x) b\right )}{\sqrt {a+b \sin (c+d x)}}dx}{b}-\left (80 a^2+3 b^2\right ) \int \sqrt {a+b \sin (c+d x)}dx\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\int \frac {3 \left (12 a^2-b^2\right ) b^2+a \left (32 a^2+b^2\right ) \sin (c+d x) b}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx}{b}-\left (80 a^2+3 b^2\right ) \int \sqrt {a+b \sin (c+d x)}dx\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3134

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\int \frac {3 \left (12 a^2-b^2\right ) b^2+a \left (32 a^2+b^2\right ) \sin (c+d x) b}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx}{b}-\frac {\left (80 a^2+3 b^2\right ) \sqrt {a+b \sin (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}dx}{\sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\int \frac {3 \left (12 a^2-b^2\right ) b^2+a \left (32 a^2+b^2\right ) \sin (c+d x) b}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx}{b}-\frac {\left (80 a^2+3 b^2\right ) \sqrt {a+b \sin (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}dx}{\sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3132

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\int \frac {3 \left (12 a^2-b^2\right ) b^2+a \left (32 a^2+b^2\right ) \sin (c+d x) b}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3481

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {a b \left (32 a^2+b^2\right ) \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx+3 b^2 \left (12 a^2-b^2\right ) \int \frac {\csc (c+d x)}{\sqrt {a+b \sin (c+d x)}}dx}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {3 b^2 \left (12 a^2-b^2\right ) \int \frac {1}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx+a b \left (32 a^2+b^2\right ) \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3142

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {3 b^2 \left (12 a^2-b^2\right ) \int \frac {1}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx+\frac {a b \left (32 a^2+b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}}dx}{\sqrt {a+b \sin (c+d x)}}}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {3 b^2 \left (12 a^2-b^2\right ) \int \frac {1}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx+\frac {a b \left (32 a^2+b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}}dx}{\sqrt {a+b \sin (c+d x)}}}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3140

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {3 b^2 \left (12 a^2-b^2\right ) \int \frac {1}{\sin (c+d x) \sqrt {a+b \sin (c+d x)}}dx+\frac {2 a b \left (32 a^2+b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \sin (c+d x)}}}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3286

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\frac {3 b^2 \left (12 a^2-b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \int \frac {\csc (c+d x)}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}}dx}{\sqrt {a+b \sin (c+d x)}}+\frac {2 a b \left (32 a^2+b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \sin (c+d x)}}}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\frac {3 b^2 \left (12 a^2-b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \int \frac {1}{\sin (c+d x) \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}}dx}{\sqrt {a+b \sin (c+d x)}}+\frac {2 a b \left (32 a^2+b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \sin (c+d x)}}}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

\(\Big \downarrow \) 3284

\(\displaystyle -\frac {\frac {1}{2} \left (\frac {\frac {2 a b \left (32 a^2+b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \sin (c+d x)}}+\frac {6 b^2 \left (12 a^2-b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \sin (c+d x)}}}{b}-\frac {2 \left (80 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 )}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}\right )-\frac {\left (32 a^2-3 b^2\right ) \cot (c+d x) \sqrt {a+b \sin (c+d x)}}{d}}{24 a^2}+\frac {b \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^{3/2}}{4 a^2 d}-\frac {\cot (c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^{3/2}}{3 a d}\)

Input:

Int[Cot[c + d*x]^4*Sqrt[a + b*Sin[c + d*x]],x]
 

Output:

(b*Cot[c + d*x]*Csc[c + d*x]*(a + b*Sin[c + d*x])^(3/2))/(4*a^2*d) - (Cot[ 
c + d*x]*Csc[c + d*x]^2*(a + b*Sin[c + d*x])^(3/2))/(3*a*d) - (-(((32*a^2 
- 3*b^2)*Cot[c + d*x]*Sqrt[a + b*Sin[c + d*x]])/d) + ((-2*(80*a^2 + 3*b^2) 
*EllipticE[(c - Pi/2 + d*x)/2, (2*b)/(a + b)]*Sqrt[a + b*Sin[c + d*x]])/(d 
*Sqrt[(a + b*Sin[c + d*x])/(a + b)]) + ((2*a*b*(32*a^2 + b^2)*EllipticF[(c 
 - Pi/2 + d*x)/2, (2*b)/(a + b)]*Sqrt[(a + b*Sin[c + d*x])/(a + b)])/(d*Sq 
rt[a + b*Sin[c + d*x]]) + (6*b^2*(12*a^2 - b^2)*EllipticPi[2, (c - Pi/2 + 
d*x)/2, (2*b)/(a + b)]*Sqrt[(a + b*Sin[c + d*x])/(a + b)])/(d*Sqrt[a + b*S 
in[c + d*x]]))/b)/2)/(24*a^2)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3132
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a 
 + b]/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, 
b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
 

rule 3134
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[a + 
b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c + d*x])/(a + b)]   Int[Sqrt[a/(a + b) + ( 
b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2 
, 0] &&  !GtQ[a + b, 0]
 

rule 3140
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*S 
qrt[a + b]))*EllipticF[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[ 
{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
 

rule 3142
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[(a 
 + b*Sin[c + d*x])/(a + b)]/Sqrt[a + b*Sin[c + d*x]]   Int[1/Sqrt[a/(a + b) 
 + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - 
 b^2, 0] &&  !GtQ[a + b, 0]
 

rule 3204
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)/tan[(e_.) + (f_.)*(x_)]^4, 
x_Symbol] :> Simp[(-Cos[e + f*x])*((a + b*Sin[e + f*x])^(m + 1)/(3*a*f*Sin[ 
e + f*x]^3)), x] + (-Simp[b*(m - 2)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 
 1)/(6*a^2*f*Sin[e + f*x]^2)), x] - Simp[1/(6*a^2)   Int[((a + b*Sin[e + f* 
x])^m/Sin[e + f*x]^2)*Simp[8*a^2 - b^2*(m - 1)*(m - 2) + a*b*m*Sin[e + f*x] 
 - (6*a^2 - b^2*m*(m - 2))*Sin[e + f*x]^2, x], x], x]) /; FreeQ[{a, b, e, f 
, m}, x] && NeQ[a^2 - b^2, 0] &&  !LtQ[m, -1] && IntegerQ[2*m]
 

rule 3284
Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) 
 + (f_.)*(x_)]]), x_Symbol] :> Simp[(2/(f*(a + b)*Sqrt[c + d]))*EllipticPi[ 
2*(b/(a + b)), (1/2)*(e - Pi/2 + f*x), 2*(d/(c + d))], x] /; FreeQ[{a, b, c 
, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 
0] && GtQ[c + d, 0]
 

rule 3286
Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) 
 + (f_.)*(x_)]]), x_Symbol] :> Simp[Sqrt[(c + d*Sin[e + f*x])/(c + d)]/Sqrt 
[c + d*Sin[e + f*x]]   Int[1/((a + b*Sin[e + f*x])*Sqrt[c/(c + d) + (d/(c + 
 d))*Sin[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a* 
d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] &&  !GtQ[c + d, 0]
 

rule 3481
Int[(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)]))/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[ 
B/d   Int[(a + b*Sin[e + f*x])^m, x], x] - Simp[(B*c - A*d)/d   Int[(a + b* 
Sin[e + f*x])^m/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, 
 B, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 

rule 3526
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
 (f_.)*(x_)])^(n_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) 
 + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C - B*c*d + A*d^2))*Cos[e + f*x 
]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - 
d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^2))   Int[(a + b*Sin[e + f*x])^(m - 
 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(b*d*m + a*c*(n + 1)) + (c*C - B* 
d)*(b*c*m + a*d*(n + 1)) - (d*(A*(a*d*(n + 2) - b*c*(n + 1)) + B*(b*d*(n + 
1) - a*c*(n + 2))) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x 
] + b*(d*(B*c - A*d)*(m + n + 2) - C*(c^2*(m + 1) + d^2*(n + 1)))*Sin[e + f 
*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d 
, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
 

rule 3538
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^ 
2)/(Sqrt[(a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)])), x_Symbol] :> Simp[C/(b*d)   Int[Sqrt[a + b*Sin[e + f*x]], x] 
, x] - Simp[1/(b*d)   Int[Simp[a*c*C - A*b*d + (b*c*C - b*B*d + a*C*d)*Sin[ 
e + f*x], x]/(Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x], x] /; Fre 
eQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0 
] && NeQ[c^2 - d^2, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1493\) vs. \(2(329)=658\).

Time = 1.83 (sec) , antiderivative size = 1494, normalized size of antiderivative = 4.26

method result size
default \(\text {Expression too large to display}\) \(1494\)

Input:

int(cot(d*x+c)^4*(a+b*sin(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
 

Output:

1/24*(48*a^5*((a+b*sin(d*x+c))/(a-b))^(1/2)*(-(sin(d*x+c)-1)*b/(a+b))^(1/2 
)*(-b*(1+sin(d*x+c))/(a-b))^(1/2)*EllipticF(((a+b*sin(d*x+c))/(a-b))^(1/2) 
,((a-b)/(a+b))^(1/2))*sin(d*x+c)^3+32*((a+b*sin(d*x+c))/(a-b))^(1/2)*(-(si 
n(d*x+c)-1)*b/(a+b))^(1/2)*(-b*(1+sin(d*x+c))/(a-b))^(1/2)*EllipticF(((a+b 
*sin(d*x+c))/(a-b))^(1/2),((a-b)/(a+b))^(1/2))*a^4*b*sin(d*x+c)^3-78*b^2*( 
(a+b*sin(d*x+c))/(a-b))^(1/2)*(-(sin(d*x+c)-1)*b/(a+b))^(1/2)*(-b*(1+sin(d 
*x+c))/(a-b))^(1/2)*EllipticF(((a+b*sin(d*x+c))/(a-b))^(1/2),((a-b)/(a+b)) 
^(1/2))*a^3*sin(d*x+c)^3+b^3*((a+b*sin(d*x+c))/(a-b))^(1/2)*(-(sin(d*x+c)- 
1)*b/(a+b))^(1/2)*(-b*(1+sin(d*x+c))/(a-b))^(1/2)*EllipticF(((a+b*sin(d*x+ 
c))/(a-b))^(1/2),((a-b)/(a+b))^(1/2))*a^2*sin(d*x+c)^3-3*((a+b*sin(d*x+c)) 
/(a-b))^(1/2)*(-(sin(d*x+c)-1)*b/(a+b))^(1/2)*(-b*(1+sin(d*x+c))/(a-b))^(1 
/2)*EllipticF(((a+b*sin(d*x+c))/(a-b))^(1/2),((a-b)/(a+b))^(1/2))*a*b^4*si 
n(d*x+c)^3-80*((a+b*sin(d*x+c))/(a-b))^(1/2)*(-(sin(d*x+c)-1)*b/(a+b))^(1/ 
2)*(-b*(1+sin(d*x+c))/(a-b))^(1/2)*EllipticE(((a+b*sin(d*x+c))/(a-b))^(1/2 
),((a-b)/(a+b))^(1/2))*a^5*sin(d*x+c)^3+77*((a+b*sin(d*x+c))/(a-b))^(1/2)* 
(-(sin(d*x+c)-1)*b/(a+b))^(1/2)*(-b*(1+sin(d*x+c))/(a-b))^(1/2)*EllipticE( 
((a+b*sin(d*x+c))/(a-b))^(1/2),((a-b)/(a+b))^(1/2))*a^3*b^2*sin(d*x+c)^3+3 
*((a+b*sin(d*x+c))/(a-b))^(1/2)*(-(sin(d*x+c)-1)*b/(a+b))^(1/2)*(-b*(1+sin 
(d*x+c))/(a-b))^(1/2)*EllipticE(((a+b*sin(d*x+c))/(a-b))^(1/2),((a-b)/(a+b 
))^(1/2))*a*b^4*sin(d*x+c)^3+36*((a+b*sin(d*x+c))/(a-b))^(1/2)*(-(sin(d...
 

Fricas [F]

\[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int { \sqrt {b \sin \left (d x + c\right ) + a} \cot \left (d x + c\right )^{4} \,d x } \] Input:

integrate(cot(d*x+c)^4*(a+b*sin(d*x+c))^(1/2),x, algorithm="fricas")
 

Output:

integral(sqrt(b*sin(d*x + c) + a)*cot(d*x + c)^4, x)
 

Sympy [F]

\[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \sqrt {a + b \sin {\left (c + d x \right )}} \cot ^{4}{\left (c + d x \right )}\, dx \] Input:

integrate(cot(d*x+c)**4*(a+b*sin(d*x+c))**(1/2),x)
 

Output:

Integral(sqrt(a + b*sin(c + d*x))*cot(c + d*x)**4, x)
 

Maxima [F]

\[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int { \sqrt {b \sin \left (d x + c\right ) + a} \cot \left (d x + c\right )^{4} \,d x } \] Input:

integrate(cot(d*x+c)^4*(a+b*sin(d*x+c))^(1/2),x, algorithm="maxima")
 

Output:

integrate(sqrt(b*sin(d*x + c) + a)*cot(d*x + c)^4, x)
 

Giac [F(-1)]

Timed out. \[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\text {Timed out} \] Input:

integrate(cot(d*x+c)^4*(a+b*sin(d*x+c))^(1/2),x, algorithm="giac")
 

Output:

Timed out
 

Mupad [F(-1)]

Timed out. \[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^4\,\sqrt {a+b\,\sin \left (c+d\,x\right )} \,d x \] Input:

int(cot(c + d*x)^4*(a + b*sin(c + d*x))^(1/2),x)
 

Output:

int(cot(c + d*x)^4*(a + b*sin(c + d*x))^(1/2), x)
 

Reduce [F]

\[ \int \cot ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \sqrt {\sin \left (d x +c \right ) b +a}\, \cot \left (d x +c \right )^{4}d x \] Input:

int(cot(d*x+c)^4*(a+b*sin(d*x+c))^(1/2),x)
 

Output:

int(sqrt(sin(c + d*x)*b + a)*cot(c + d*x)**4,x)