\(\int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx\) [151]

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

Optimal result

Integrand size = 23, antiderivative size = 109 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx=-\frac {2 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {5 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{2 \sqrt {2} d}+\frac {a \sqrt {a+a \sec (c+d x)}}{2 d (1-\sec (c+d x))} \] Output:

-2*a^(3/2)*arctanh((a+a*sec(d*x+c))^(1/2)/a^(1/2))/d+5/4*2^(1/2)*a^(3/2)*a 
rctanh(1/2*(a+a*sec(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/d+1/2*a*(a+a*sec(d*x+c) 
)^(1/2)/d/(1-sec(d*x+c))
 

Mathematica [A] (verified)

Time = 0.23 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.92 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx=\frac {(a (1+\sec (c+d x)))^{3/2} \left (-2 \text {arctanh}\left (\sqrt {1+\sec (c+d x)}\right )+\frac {5 \text {arctanh}\left (\frac {\sqrt {1+\sec (c+d x)}}{\sqrt {2}}\right )}{2 \sqrt {2}}-\frac {\sqrt {1+\sec (c+d x)}}{2 (-1+\sec (c+d x))}\right )}{d (1+\sec (c+d x))^{3/2}} \] Input:

Integrate[Cot[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2),x]
 

Output:

((a*(1 + Sec[c + d*x]))^(3/2)*(-2*ArcTanh[Sqrt[1 + Sec[c + d*x]]] + (5*Arc 
Tanh[Sqrt[1 + Sec[c + d*x]]/Sqrt[2]])/(2*Sqrt[2]) - Sqrt[1 + Sec[c + d*x]] 
/(2*(-1 + Sec[c + d*x]))))/(d*(1 + Sec[c + d*x])^(3/2))
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.03, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 25, 4368, 27, 114, 27, 174, 73, 219, 220}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\left (\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a\right )^{3/2}}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^3}dx\)

\(\Big \downarrow \) 4368

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

\(\Big \downarrow \) 27

\(\displaystyle \frac {a^2 \int \frac {\cos (c+d x)}{(1-\sec (c+d x))^2 \sqrt {\sec (c+d x) a+a}}d\sec (c+d x)}{d}\)

\(\Big \downarrow \) 114

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 174

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {a^2 \left (\frac {1}{4} \left (\frac {8 \int \frac {1}{\frac {\sec (c+d x) a+a}{a}-1}d\sqrt {\sec (c+d x) a+a}}{a}+\frac {5 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a}}\right )+\frac {\sqrt {a \sec (c+d x)+a}}{2 a (1-\sec (c+d x))}\right )}{d}\)

\(\Big \downarrow \) 220

\(\displaystyle \frac {a^2 \left (\frac {1}{4} \left (\frac {5 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a}}-\frac {8 \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {a}}\right )}{\sqrt {a}}\right )+\frac {\sqrt {a \sec (c+d x)+a}}{2 a (1-\sec (c+d x))}\right )}{d}\)

Input:

Int[Cot[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2),x]
 

Output:

(a^2*(((-8*ArcTanh[Sqrt[a + a*Sec[c + d*x]]/Sqrt[a]])/Sqrt[a] + (5*Sqrt[2] 
*ArcTanh[Sqrt[a + a*Sec[c + d*x]]/(Sqrt[2]*Sqrt[a])])/Sqrt[a])/4 + Sqrt[a 
+ a*Sec[c + d*x]]/(2*a*(1 - Sec[c + d*x]))))/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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 114
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[b*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1 
)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Simp[1/((m + 1)*(b*c - a*d)*(b*e 
 - a*f))   Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) 
 - b*(d*e*(m + n + 2) + c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], 
 x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && ILtQ[m, -1] && (IntegerQ[n] || 
 IntegersQ[2*n, 2*p] || ILtQ[m + n + p + 3, 0])
 

rule 174
Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* 
((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d)   Int[(e + f*x)^ 
p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d)   Int[(e + f*x)^p/(c + d 
*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

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

rule 4368
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_), x_Symbol] :> Simp[-(d*b^(m - 1))^(-1)   Subst[Int[(-a + b*x)^((m - 1)/2 
)*((a + b*x)^((m - 1)/2 + n)/x), x], x, Csc[c + d*x]], x] /; FreeQ[{a, b, c 
, d, n}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[n]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(255\) vs. \(2(88)=176\).

Time = 0.98 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.35

method result size
default \(-\frac {a \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\left (-12 \cos \left (d x +c \right )-12\right ) \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+\left (-15 \cos \left (d x +c \right )-15\right ) \arctan \left (\frac {\sqrt {2}}{2 \sqrt {-\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+\left (-2 \cos \left (d x +c \right )^{2}-12 \cos \left (d x +c \right )-10\right ) \sqrt {2}\, \sqrt {-\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \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 )+\left (2 \cos \left (d x +c \right )^{2}-8 \cos \left (d x +c \right )+6\right ) \cot \left (d x +c \right ) \csc \left (d x +c \right )\right )}{12 d \left (1+\cos \left (d x +c \right )\right )}\) \(256\)

Input:

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

Output:

-1/12/d*a*(a*(1+sec(d*x+c)))^(1/2)/(1+cos(d*x+c))*((-12*cos(d*x+c)-12)*2^( 
1/2)*arctan(1/2*2^(1/2)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2))*(-2*cos(d*x+ 
c)/(1+cos(d*x+c)))^(1/2)+(-15*cos(d*x+c)-15)*arctan(1/2*2^(1/2)/(-cos(d*x+ 
c)/(1+cos(d*x+c)))^(1/2))*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)+(-2*cos(d*x 
+c)^2-12*cos(d*x+c)-10)*2^(1/2)*(-cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-2*cos 
(d*x+c)/(1+cos(d*x+c)))^(1/2)*cot(d*x+c)*csc(d*x+c)+(2*cos(d*x+c)^2-8*cos( 
d*x+c)+6)*cot(d*x+c)*csc(d*x+c))
 

Fricas [B] (verification not implemented)

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

Time = 0.10 (sec) , antiderivative size = 373, normalized size of antiderivative = 3.42 \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx=\left [\frac {5 \, \sqrt {\frac {1}{2}} {\left (a \cos \left (d x + c\right ) - a\right )} \sqrt {a} \log \left (\frac {4 \, \sqrt {\frac {1}{2}} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right ) - 1}\right ) + 2 \, a \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) + 4 \, {\left (a \cos \left (d x + c\right ) - a\right )} \sqrt {a} \log \left (-2 \, a \cos \left (d x + c\right ) + 2 \, \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) - a\right )}{4 \, {\left (d \cos \left (d x + c\right ) - d\right )}}, -\frac {5 \, \sqrt {\frac {1}{2}} {\left (a \cos \left (d x + c\right ) - a\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{a \cos \left (d x + c\right ) + a}\right ) - 4 \, {\left (a \cos \left (d x + c\right ) - a\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{a \cos \left (d x + c\right ) + a}\right ) - a \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right ) - d\right )}}\right ] \] Input:

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

Output:

[1/4*(5*sqrt(1/2)*(a*cos(d*x + c) - a)*sqrt(a)*log((4*sqrt(1/2)*sqrt(a)*sq 
rt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c) + 3*a*cos(d*x + c) + a) 
/(cos(d*x + c) - 1)) + 2*a*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x 
 + c) + 4*(a*cos(d*x + c) - a)*sqrt(a)*log(-2*a*cos(d*x + c) + 2*sqrt(a)*s 
qrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c) - a))/(d*cos(d*x + c) 
- d), -1/2*(5*sqrt(1/2)*(a*cos(d*x + c) - a)*sqrt(-a)*arctan(2*sqrt(1/2)*s 
qrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(a*cos(d*x + 
c) + a)) - 4*(a*cos(d*x + c) - a)*sqrt(-a)*arctan(sqrt(-a)*sqrt((a*cos(d*x 
 + c) + a)/cos(d*x + c))*cos(d*x + c)/(a*cos(d*x + c) + a)) - a*sqrt((a*co 
s(d*x + c) + a)/cos(d*x + c))*cos(d*x + c))/(d*cos(d*x + c) - d)]
 

Sympy [F(-1)]

Timed out. \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
                                                                                    
                                                                                    
 

Maxima [F]

\[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}} \cot \left (d x + c\right )^{3} \,d x } \] Input:

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

Output:

integrate((a*sec(d*x + c) + a)^(3/2)*cot(d*x + c)^3, x)
 

Giac [F(-1)]

Timed out. \[ \int \cot ^3(c+d x) (a+a \sec (c+d x))^{3/2} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

sqrt(a)*a*(int(sqrt(sec(c + d*x) + 1)*cot(c + d*x)**3*sec(c + d*x),x) + in 
t(sqrt(sec(c + d*x) + 1)*cot(c + d*x)**3,x))