\(\int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\) [145]

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

Optimal result

Integrand size = 23, antiderivative size = 201 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\frac {2 \sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {9 \sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{8 \sqrt {2} d}+\frac {7 \cot (c+d x) \sqrt {a+a \sec (c+d x)}}{8 d}+\frac {\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{12 a d}-\frac {\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{2 a d \left (2+\frac {\tan ^2(c+d x)}{1+\sec (c+d x)}\right )} \] Output:

2*a^(1/2)*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/d-9/16*a^(1/2) 
*arctan(1/2*a^(1/2)*tan(d*x+c)*2^(1/2)/(a+a*sec(d*x+c))^(1/2))*2^(1/2)/d+7 
/8*cot(d*x+c)*(a+a*sec(d*x+c))^(1/2)/d+1/12*cot(d*x+c)^3*(a+a*sec(d*x+c))^ 
(3/2)/a/d-1/2*cot(d*x+c)^3*(a+a*sec(d*x+c))^(3/2)/a/d/(2+tan(d*x+c)^2/(1+s 
ec(d*x+c)))
 

Mathematica [A] (warning: unable to verify)

Time = 5.66 (sec) , antiderivative size = 187, normalized size of antiderivative = 0.93 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\frac {\sqrt {a (1+\sec (c+d x))} \left (\frac {(11+4 \cos (c+d x)-31 \cos (2 (c+d x))) \csc ^3(c+d x)}{\sqrt {\sec (c+d x)}}+96 \arctan \left (\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\frac {1}{1+\sec (c+d x)}}}\right ) \sqrt {\frac {\sec (c+d x)}{(1+\sec (c+d x))^2}} \sqrt {1+\sec (c+d x)}-27 \arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\sec ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {1}{1+\sec (c+d x)}} \sqrt {1+\sec (c+d x)}\right )}{48 d \sqrt {\sec (c+d x)}} \] Input:

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

Output:

(Sqrt[a*(1 + Sec[c + d*x])]*(((11 + 4*Cos[c + d*x] - 31*Cos[2*(c + d*x)])* 
Csc[c + d*x]^3)/Sqrt[Sec[c + d*x]] + 96*ArcTan[Tan[(c + d*x)/2]/Sqrt[(1 + 
Sec[c + d*x])^(-1)]]*Sqrt[Sec[c + d*x]/(1 + Sec[c + d*x])^2]*Sqrt[1 + Sec[ 
c + d*x]] - 27*ArcSin[Tan[(c + d*x)/2]]*Sqrt[Sec[(c + d*x)/2]^2]*Sqrt[(1 + 
 Sec[c + d*x])^(-1)]*Sqrt[1 + Sec[c + d*x]]))/(48*d*Sqrt[Sec[c + d*x]])
 

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.02, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {3042, 4375, 374, 25, 27, 445, 27, 445, 27, 397, 216}

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 \sec (c+d x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a \csc \left (c+d x+\frac {\pi }{2}\right )+a}}{\cot \left (c+d x+\frac {\pi }{2}\right )^4}dx\)

\(\Big \downarrow \) 4375

\(\displaystyle -\frac {2 \int \frac {\cot ^4(c+d x) (\sec (c+d x) a+a)^2}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )^2}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{a d}\)

\(\Big \downarrow \) 374

\(\displaystyle -\frac {2 \left (\frac {\int -\frac {a \cot ^4(c+d x) (\sec (c+d x) a+a)^2 \left (\frac {5 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{4 a}+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {2 \left (\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}-\frac {\int \frac {a \cot ^4(c+d x) (\sec (c+d x) a+a)^2 \left (\frac {5 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{4 a}\right )}{a d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {2 \left (\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}-\frac {1}{4} \int \frac {\cot ^4(c+d x) (\sec (c+d x) a+a)^2 \left (\frac {5 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )}{a d}\)

\(\Big \downarrow \) 445

\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (\frac {1}{6} \int -\frac {3 a \cot ^2(c+d x) (\sec (c+d x) a+a) \left (7-\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \int \frac {\cot ^2(c+d x) (\sec (c+d x) a+a) \left (7-\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

\(\Big \downarrow \) 445

\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} \int \frac {a \left (\frac {7 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+23\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} a \int \frac {\frac {7 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+23}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

\(\Big \downarrow \) 397

\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} a \left (16 \int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )-9 \int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} a \left (\frac {9 \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {2} \sqrt {a}}-\frac {16 \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a}}\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\)

Input:

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

Output:

(-2*((-1/6*(Cot[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2)) - (a*(-1/2*(a*((-16 
*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/Sqrt[a] + (9*Arc 
Tan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(Sqrt[2]*S 
qrt[a]))) + (7*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/2))/2)/4 + (Cot[c + 
d*x]^3*(a + a*Sec[c + d*x])^(3/2))/(4*(2 + (a*Tan[c + d*x]^2)/(a + a*Sec[c 
 + d*x])))))/(a*d)
 

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 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 374
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[(-b)*(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q 
 + 1)/(a*e*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(e*x)^m*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[b*c*(m + 1) + 2*(b*c - 
a*d)*(p + 1) + d*b*(m + 2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b, 
c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IntBinomialQ[a, b, 
 c, d, e, m, 2, p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 445
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_ 
.)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^2)^(p 
+ 1)*((c + d*x^2)^(q + 1)/(a*c*g*(m + 1))), x] + Simp[1/(a*c*g^2*(m + 1)) 
 Int[(g*x)^(m + 2)*(a + b*x^2)^p*(c + d*x^2)^q*Simp[a*f*c*(m + 1) - e*(b*c 
+ a*d)*(m + 2 + 1) - e*2*(b*c*p + a*d*q) - b*e*d*(m + 2*(p + q + 2) + 1)*x^ 
2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && LtQ[m, -1]
 

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

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 
Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(356\) vs. \(2(172)=344\).

Time = 0.83 (sec) , antiderivative size = 357, normalized size of antiderivative = 1.78

method result size
default \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\left (96 \cos \left (d x +c \right )^{2}+192 \cos \left (d x +c \right )+96\right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{\sqrt {\cot \left (d x +c \right )^{2}-2 \csc \left (d x +c \right ) \cot \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}}\right )+\left (-54 \cos \left (d x +c \right )^{2}-108 \cos \left (d x +c \right )-54\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )+\sqrt {2}\, \left (79 \cos \left (d x +c \right )^{4}+232 \cos \left (d x +c \right )^{3}+90 \cos \left (d x +c \right )^{2}-168 \cos \left (d x +c \right )-105\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \cot \left (d x +c \right ) \csc \left (d x +c \right )^{2}+\left (34 \cos \left (d x +c \right )^{4}+66 \cos \left (d x +c \right )^{3}-150 \cos \left (d x +c \right )^{2}-34 \cos \left (d x +c \right )+84\right ) \cot \left (d x +c \right ) \csc \left (d x +c \right )^{2}\right )}{96 d \left (1+\cos \left (d x +c \right )\right )^{2}}\) \(357\)

Input:

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

Output:

1/96/d*(a*(1+sec(d*x+c)))^(1/2)/(1+cos(d*x+c))^2*((96*cos(d*x+c)^2+192*cos 
(d*x+c)+96)*2^(1/2)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*arctanh(2^(1/2)/( 
cot(d*x+c)^2-2*csc(d*x+c)*cot(d*x+c)+csc(d*x+c)^2-1)^(1/2)*(csc(d*x+c)-cot 
(d*x+c)))+(-54*cos(d*x+c)^2-108*cos(d*x+c)-54)*(-2*cos(d*x+c)/(1+cos(d*x+c 
)))^(1/2)*ln((-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)-cot(d*x+c)+csc(d*x+c))+2 
^(1/2)*(79*cos(d*x+c)^4+232*cos(d*x+c)^3+90*cos(d*x+c)^2-168*cos(d*x+c)-10 
5)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos(d*x+c)))^(1/2) 
*cot(d*x+c)*csc(d*x+c)^2+(34*cos(d*x+c)^4+66*cos(d*x+c)^3-150*cos(d*x+c)^2 
-34*cos(d*x+c)+84)*cot(d*x+c)*csc(d*x+c)^2)
 

Fricas [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 537, normalized size of antiderivative = 2.67 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx =\text {Too large to display} \] Input:

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

Output:

[1/48*(27*sqrt(1/2)*(cos(d*x + c)^2 - 1)*sqrt(-a)*log((4*sqrt(1/2)*sqrt(-a 
)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) + 3*a* 
cos(d*x + c)^2 + 2*a*cos(d*x + c) - a)/(cos(d*x + c)^2 + 2*cos(d*x + c) + 
1))*sin(d*x + c) + 24*(cos(d*x + c)^2 - 1)*sqrt(-a)*log(-(8*a*cos(d*x + c) 
^3 - 4*(2*cos(d*x + c)^2 - cos(d*x + c))*sqrt(-a)*sqrt((a*cos(d*x + c) + a 
)/cos(d*x + c))*sin(d*x + c) - 7*a*cos(d*x + c) + a)/(cos(d*x + c) + 1))*s 
in(d*x + c) + 2*(31*cos(d*x + c)^3 - 2*cos(d*x + c)^2 - 21*cos(d*x + c))*s 
qrt((a*cos(d*x + c) + a)/cos(d*x + c)))/((d*cos(d*x + c)^2 - d)*sin(d*x + 
c)), 1/24*(27*sqrt(1/2)*(cos(d*x + c)^2 - 1)*sqrt(a)*arctan(2*sqrt(1/2)*sq 
rt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c))) 
*sin(d*x + c) + 24*(cos(d*x + c)^2 - 1)*sqrt(a)*arctan(2*sqrt(a)*sqrt((a*c 
os(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c)/(2*a*cos(d*x + c) 
^2 + a*cos(d*x + c) - a))*sin(d*x + c) + (31*cos(d*x + c)^3 - 2*cos(d*x + 
c)^2 - 21*cos(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d*x + c)))/((d*cos(d 
*x + c)^2 - d)*sin(d*x + c))]
 

Sympy [F]

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

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

Output:

Integral(sqrt(a*(sec(c + d*x) + 1))*cot(c + d*x)**4, x)
 

Maxima [F]

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 365 vs. \(2 (172) = 344\).

Time = 0.41 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.82 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=-\frac {\sqrt {2} {\left (\frac {48 \, \sqrt {2} \sqrt {-a} a \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right )}{{\left | a \right |}} + 27 \, \sqrt {-a} \log \left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right ) + 6 \, \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {8 \, {\left (15 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} \sqrt {-a} a - 24 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} \sqrt {-a} a^{2} + 13 \, \sqrt {-a} a^{3}\right )}}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a\right )}^{3}}\right )} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{96 \, d} \] Input:

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

Output:

-1/96*sqrt(2)*(48*sqrt(2)*sqrt(-a)*a*log(abs(2*(sqrt(-a)*tan(1/2*d*x + 1/2 
*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 - 4*sqrt(2)*abs(a) - 6*a)/abs 
(2*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 
 + 4*sqrt(2)*abs(a) - 6*a))/abs(a) + 27*sqrt(-a)*log((sqrt(-a)*tan(1/2*d*x 
 + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2) + 6*sqrt(-a*tan(1/2*d* 
x + 1/2*c)^2 + a)*tan(1/2*d*x + 1/2*c) + 8*(15*(sqrt(-a)*tan(1/2*d*x + 1/2 
*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^4*sqrt(-a)*a - 24*(sqrt(-a)*tan 
(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*sqrt(-a)*a^2 + 
13*sqrt(-a)*a^3)/((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1 
/2*c)^2 + a))^2 - a)^3)*sgn(cos(d*x + c))/d
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

sqrt(a)*int(sqrt(sec(c + d*x) + 1)*cot(c + d*x)**4,x)