\(\int \cot (x) \sqrt {a+b \cot ^4(x)} \, dx\) [60]

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

Optimal result

Integrand size = 15, antiderivative size = 90 \[ \int \cot (x) \sqrt {a+b \cot ^4(x)} \, dx=\frac {1}{2} \sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot ^2(x)}{\sqrt {a+b \cot ^4(x)}}\right )+\frac {1}{2} \sqrt {a+b} \text {arctanh}\left (\frac {a-b \cot ^2(x)}{\sqrt {a+b} \sqrt {a+b \cot ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b \cot ^4(x)} \] Output:

1/2*b^(1/2)*arctanh(b^(1/2)*cot(x)^2/(a+b*cot(x)^4)^(1/2))+1/2*(a+b)^(1/2) 
*arctanh((a-b*cot(x)^2)/(a+b)^(1/2)/(a+b*cot(x)^4)^(1/2))-1/2*(a+b*cot(x)^ 
4)^(1/2)
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.96 \[ \int \cot (x) \sqrt {a+b \cot ^4(x)} \, dx=\frac {1}{2} \left (\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot ^2(x)}{\sqrt {a+b \cot ^4(x)}}\right )+\sqrt {a+b} \text {arctanh}\left (\frac {a-b \cot ^2(x)}{\sqrt {a+b} \sqrt {a+b \cot ^4(x)}}\right )-\sqrt {a+b \cot ^4(x)}\right ) \] Input:

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

Output:

(Sqrt[b]*ArcTanh[(Sqrt[b]*Cot[x]^2)/Sqrt[a + b*Cot[x]^4]] + Sqrt[a + b]*Ar 
cTanh[(a - b*Cot[x]^2)/(Sqrt[a + b]*Sqrt[a + b*Cot[x]^4])] - Sqrt[a + b*Co 
t[x]^4])/2
 

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.96, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.733, Rules used = {3042, 25, 4153, 25, 1577, 493, 719, 224, 219, 488, 219}

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 (x) \sqrt {a+b \cot ^4(x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\tan \left (x+\frac {\pi }{2}\right ) \sqrt {a+b \tan \left (x+\frac {\pi }{2}\right )^4}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \tan \left (x+\frac {\pi }{2}\right ) \sqrt {b \tan \left (x+\frac {\pi }{2}\right )^4+a}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \int -\frac {\cot (x) \sqrt {a+b \cot ^4(x)}}{\cot ^2(x)+1}d\cot (x)\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\cot (x) \sqrt {b \cot ^4(x)+a}}{\cot ^2(x)+1}d\cot (x)\)

\(\Big \downarrow \) 1577

\(\displaystyle -\frac {1}{2} \int \frac {\sqrt {b \cot ^4(x)+a}}{\cot ^2(x)+1}d\cot ^2(x)\)

\(\Big \downarrow \) 493

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

\(\Big \downarrow \) 719

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{2} \left (-(a+b) \int \frac {1}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^4(x)+a}}d\cot ^2(x)+\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot ^2(x)}{\sqrt {a+b \cot ^4(x)}}\right )-\sqrt {a+b \cot ^4(x)}\right )\)

\(\Big \downarrow \) 488

\(\displaystyle \frac {1}{2} \left ((a+b) \int \frac {1}{-\cot ^4(x)+a+b}d\frac {a-b \cot ^2(x)}{\sqrt {b \cot ^4(x)+a}}+\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot ^2(x)}{\sqrt {a+b \cot ^4(x)}}\right )-\sqrt {a+b \cot ^4(x)}\right )\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{2} \left (\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \cot ^2(x)}{\sqrt {a+b \cot ^4(x)}}\right )+\sqrt {a+b} \text {arctanh}\left (\frac {a-b \cot ^2(x)}{\sqrt {a+b} \sqrt {a+b \cot ^4(x)}}\right )-\sqrt {a+b \cot ^4(x)}\right )\)

Input:

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

Output:

(Sqrt[b]*ArcTanh[(Sqrt[b]*Cot[x]^2)/Sqrt[a + b*Cot[x]^4]] + Sqrt[a + b]*Ar 
cTanh[(a - b*Cot[x]^2)/(Sqrt[a + b]*Sqrt[a + b*Cot[x]^4])] - Sqrt[a + b*Co 
t[x]^4])/2
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], 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 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 488
Int[1/(((c_) + (d_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> -Subst[ 
Int[1/(b*c^2 + a*d^2 - x^2), x], x, (a*d - b*c*x)/Sqrt[a + b*x^2]] /; FreeQ 
[{a, b, c, d}, x]
 

rule 493
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
(c + d*x)^(n + 1)*((a + b*x^2)^p/(d*(n + 2*p + 1))), x] + Simp[2*(p/(d*(n + 
 2*p + 1)))   Int[(c + d*x)^n*(a + b*x^2)^(p - 1)*(a*d - b*c*x), x], x] /; 
FreeQ[{a, b, c, d, n}, x] && GtQ[p, 0] && NeQ[n + 2*p + 1, 0] && ( !Rationa 
lQ[n] || LtQ[n, 1]) &&  !ILtQ[n + 2*p, 0] && IntQuadraticQ[a, 0, b, c, d, n 
, p, x]
 

rule 719
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p 
_.), x_Symbol] :> Simp[g/e   Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] + 
Simp[(e*f - d*g)/e   Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, 
d, e, f, g, m, p}, x] &&  !IGtQ[m, 0]
 

rule 1577
Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] 
 :> Simp[1/2   Subst[Int[(d + e*x)^q*(a + c*x^2)^p, x], x, x^2], x] /; Free 
Q[{a, c, d, e, p, q}, x]
 

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

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.54

method result size
derivativedivides \(-\frac {\sqrt {b \left (\cot \left (x \right )^{2}+1\right )^{2}-2 b \left (\cot \left (x \right )^{2}+1\right )+a +b}}{2}+\frac {\sqrt {b}\, \ln \left (\frac {b \left (\cot \left (x \right )^{2}+1\right )-b}{\sqrt {b}}+\sqrt {b \left (\cot \left (x \right )^{2}+1\right )^{2}-2 b \left (\cot \left (x \right )^{2}+1\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (\cot \left (x \right )^{2}+1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\cot \left (x \right )^{2}+1\right )^{2}-2 b \left (\cot \left (x \right )^{2}+1\right )+a +b}}{\cot \left (x \right )^{2}+1}\right )}{2}\) \(139\)
default \(-\frac {\sqrt {b \left (\cot \left (x \right )^{2}+1\right )^{2}-2 b \left (\cot \left (x \right )^{2}+1\right )+a +b}}{2}+\frac {\sqrt {b}\, \ln \left (\frac {b \left (\cot \left (x \right )^{2}+1\right )-b}{\sqrt {b}}+\sqrt {b \left (\cot \left (x \right )^{2}+1\right )^{2}-2 b \left (\cot \left (x \right )^{2}+1\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (\cot \left (x \right )^{2}+1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\cot \left (x \right )^{2}+1\right )^{2}-2 b \left (\cot \left (x \right )^{2}+1\right )+a +b}}{\cot \left (x \right )^{2}+1}\right )}{2}\) \(139\)

Input:

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

Output:

-1/2*(b*(cot(x)^2+1)^2-2*b*(cot(x)^2+1)+a+b)^(1/2)+1/2*b^(1/2)*ln((b*(cot( 
x)^2+1)-b)/b^(1/2)+(b*(cot(x)^2+1)^2-2*b*(cot(x)^2+1)+a+b)^(1/2))+1/2*(a+b 
)^(1/2)*ln((2*a+2*b-2*b*(cot(x)^2+1)+2*(a+b)^(1/2)*(b*(cot(x)^2+1)^2-2*b*( 
cot(x)^2+1)+a+b)^(1/2))/(cot(x)^2+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 252 vs. \(2 (72) = 144\).

Time = 0.19 (sec) , antiderivative size = 1063, normalized size of antiderivative = 11.81 \[ \int \cot (x) \sqrt {a+b \cot ^4(x)} \, dx=\text {Too large to display} \] Input:

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

Output:

[1/4*sqrt(a + b)*log(1/2*(a^2 + 2*a*b + b^2)*cos(2*x)^2 + 1/2*a^2 + 1/2*b^ 
2 + 1/2*((a + b)*cos(2*x)^2 - 2*a*cos(2*x) + a - b)*sqrt(a + b)*sqrt(((a + 
 b)*cos(2*x)^2 - 2*(a - b)*cos(2*x) + a + b)/(cos(2*x)^2 - 2*cos(2*x) + 1) 
) - (a^2 - b^2)*cos(2*x)) + 1/4*sqrt(b)*log(-((a + 2*b)*cos(2*x)^2 - 2*(co 
s(2*x)^2 - 1)*sqrt(b)*sqrt(((a + b)*cos(2*x)^2 - 2*(a - b)*cos(2*x) + a + 
b)/(cos(2*x)^2 - 2*cos(2*x) + 1)) - 2*(a - 2*b)*cos(2*x) + a + 2*b)/(cos(2 
*x)^2 - 2*cos(2*x) + 1)) - 1/2*sqrt(((a + b)*cos(2*x)^2 - 2*(a - b)*cos(2* 
x) + a + b)/(cos(2*x)^2 - 2*cos(2*x) + 1)), 1/2*sqrt(-b)*arctan(sqrt(-b)*s 
qrt(((a + b)*cos(2*x)^2 - 2*(a - b)*cos(2*x) + a + b)/(cos(2*x)^2 - 2*cos( 
2*x) + 1))*(cos(2*x) - 1)/(b*cos(2*x) + b)) + 1/4*sqrt(a + b)*log(1/2*(a^2 
 + 2*a*b + b^2)*cos(2*x)^2 + 1/2*a^2 + 1/2*b^2 + 1/2*((a + b)*cos(2*x)^2 - 
 2*a*cos(2*x) + a - b)*sqrt(a + b)*sqrt(((a + b)*cos(2*x)^2 - 2*(a - b)*co 
s(2*x) + a + b)/(cos(2*x)^2 - 2*cos(2*x) + 1)) - (a^2 - b^2)*cos(2*x)) - 1 
/2*sqrt(((a + b)*cos(2*x)^2 - 2*(a - b)*cos(2*x) + a + b)/(cos(2*x)^2 - 2* 
cos(2*x) + 1)), -1/2*sqrt(-a - b)*arctan(((a + b)*cos(2*x)^2 - 2*a*cos(2*x 
) + a - b)*sqrt(-a - b)*sqrt(((a + b)*cos(2*x)^2 - 2*(a - b)*cos(2*x) + a 
+ b)/(cos(2*x)^2 - 2*cos(2*x) + 1))/((a^2 + 2*a*b + b^2)*cos(2*x)^2 + a^2 
+ 2*a*b + b^2 - 2*(a^2 - b^2)*cos(2*x))) + 1/4*sqrt(b)*log(-((a + 2*b)*cos 
(2*x)^2 - 2*(cos(2*x)^2 - 1)*sqrt(b)*sqrt(((a + b)*cos(2*x)^2 - 2*(a - b)* 
cos(2*x) + a + b)/(cos(2*x)^2 - 2*cos(2*x) + 1)) - 2*(a - 2*b)*cos(2*x)...
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 204 vs. \(2 (72) = 144\).

Time = 0.13 (sec) , antiderivative size = 204, normalized size of antiderivative = 2.27 \[ \int \cot (x) \sqrt {a+b \cot ^4(x)} \, dx=-\frac {b \arctan \left (-\frac {\sqrt {a + b} \sin \left (x\right )^{2} - \sqrt {a \sin \left (x\right )^{4} + b \sin \left (x\right )^{4} - 2 \, b \sin \left (x\right )^{2} + b}}{\sqrt {-b}}\right )}{\sqrt {-b}} - \frac {1}{2} \, \sqrt {a + b} \log \left ({\left | -{\left (\sqrt {a + b} \sin \left (x\right )^{2} - \sqrt {a \sin \left (x\right )^{4} + b \sin \left (x\right )^{4} - 2 \, b \sin \left (x\right )^{2} + b}\right )} {\left (a + b\right )} + \sqrt {a + b} b \right |}\right ) - \frac {{\left (\sqrt {a + b} \sin \left (x\right )^{2} - \sqrt {a \sin \left (x\right )^{4} + b \sin \left (x\right )^{4} - 2 \, b \sin \left (x\right )^{2} + b}\right )} b - \sqrt {a + b} b}{{\left (\sqrt {a + b} \sin \left (x\right )^{2} - \sqrt {a \sin \left (x\right )^{4} + b \sin \left (x\right )^{4} - 2 \, b \sin \left (x\right )^{2} + b}\right )}^{2} - b} \] Input:

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

Output:

-b*arctan(-(sqrt(a + b)*sin(x)^2 - sqrt(a*sin(x)^4 + b*sin(x)^4 - 2*b*sin( 
x)^2 + b))/sqrt(-b))/sqrt(-b) - 1/2*sqrt(a + b)*log(abs(-(sqrt(a + b)*sin( 
x)^2 - sqrt(a*sin(x)^4 + b*sin(x)^4 - 2*b*sin(x)^2 + b))*(a + b) + sqrt(a 
+ b)*b)) - ((sqrt(a + b)*sin(x)^2 - sqrt(a*sin(x)^4 + b*sin(x)^4 - 2*b*sin 
(x)^2 + b))*b - sqrt(a + b)*b)/((sqrt(a + b)*sin(x)^2 - sqrt(a*sin(x)^4 + 
b*sin(x)^4 - 2*b*sin(x)^2 + b))^2 - b)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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