\(\int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx\) [444]

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

Optimal result

Integrand size = 19, antiderivative size = 52 \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=-\frac {\arctan \left (\frac {\sqrt [4]{a^4+b^4 \csc ^2(x)}}{a}\right )}{a}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{a^4+b^4 \csc ^2(x)}}{a}\right )}{a} \]

[Out]

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

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {4224, 272, 65, 304, 209, 212} \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt [4]{a^4+b^4 \csc ^2(x)}}{a}\right )}{a}-\frac {\arctan \left (\frac {\sqrt [4]{a^4+b^4 \csc ^2(x)}}{a}\right )}{a} \]

[In]

Int[Cot[x]/(a^4 + b^4*Csc[x]^2)^(1/4),x]

[Out]

-(ArcTan[(a^4 + b^4*Csc[x]^2)^(1/4)/a]/a) + ArcTanh[(a^4 + b^4*Csc[x]^2)^(1/4)/a]/a

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[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] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 209

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

Rule 212

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] && (GtQ[a, 0] || LtQ[b, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 4224

Int[((a_) + (b_.)*((c_.)*sec[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With
[{ff = FreeFactors[Sec[e + f*x], x]}, Dist[1/f, Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a + b*(c*ff*x)^n)^p/x)
, x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[(m - 1)/2] && (GtQ[m, 0] || EqQ[
n, 2] || EqQ[n, 4] || IGtQ[p, 0] || IntegersQ[2*n, p])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{x \sqrt [4]{a^4+b^4 x^2}} \, dx,x,\csc (x)\right ) \\ & = -\left (\frac {1}{2} \text {Subst}\left (\int \frac {1}{x \sqrt [4]{a^4+b^4 x}} \, dx,x,\csc ^2(x)\right )\right ) \\ & = -\frac {2 \text {Subst}\left (\int \frac {x^2}{-\frac {a^4}{b^4}+\frac {x^4}{b^4}} \, dx,x,\sqrt [4]{a^4+b^4 \csc ^2(x)}\right )}{b^4} \\ & = \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,\sqrt [4]{a^4+b^4 \csc ^2(x)}\right )-\text {Subst}\left (\int \frac {1}{a^2+x^2} \, dx,x,\sqrt [4]{a^4+b^4 \csc ^2(x)}\right ) \\ & = -\frac {\arctan \left (\frac {\sqrt [4]{a^4+b^4 \csc ^2(x)}}{a}\right )}{a}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{a^4+b^4 \csc ^2(x)}}{a}\right )}{a} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(256\) vs. \(2(52)=104\).

Time = 0.32 (sec) , antiderivative size = 256, normalized size of antiderivative = 4.92 \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=\frac {\sqrt [4]{-a^4-2 b^4+a^4 \cos (2 x)} \left (-2 \arctan \left (1-\frac {\sqrt {2} a \sqrt {\sin (x)}}{\sqrt [4]{-b^4-a^4 \sin ^2(x)}}\right )+2 \arctan \left (1+\frac {\sqrt {2} a \sqrt {\sin (x)}}{\sqrt [4]{-b^4-a^4 \sin ^2(x)}}\right )-\log \left (1+\frac {a^2 \sin (x)}{\sqrt {-b^4-a^4 \sin ^2(x)}}-\frac {\sqrt {2} a \sqrt {\sin (x)}}{\sqrt [4]{-b^4-a^4 \sin ^2(x)}}\right )+\log \left (1+\frac {a^2 \sin (x)}{\sqrt {-b^4-a^4 \sin ^2(x)}}+\frac {\sqrt {2} a \sqrt {\sin (x)}}{\sqrt [4]{-b^4-a^4 \sin ^2(x)}}\right )\right )}{2\ 2^{3/4} a \sqrt [4]{a^4+b^4 \csc ^2(x)} \sqrt {\sin (x)}} \]

[In]

Integrate[Cot[x]/(a^4 + b^4*Csc[x]^2)^(1/4),x]

[Out]

((-a^4 - 2*b^4 + a^4*Cos[2*x])^(1/4)*(-2*ArcTan[1 - (Sqrt[2]*a*Sqrt[Sin[x]])/(-b^4 - a^4*Sin[x]^2)^(1/4)] + 2*
ArcTan[1 + (Sqrt[2]*a*Sqrt[Sin[x]])/(-b^4 - a^4*Sin[x]^2)^(1/4)] - Log[1 + (a^2*Sin[x])/Sqrt[-b^4 - a^4*Sin[x]
^2] - (Sqrt[2]*a*Sqrt[Sin[x]])/(-b^4 - a^4*Sin[x]^2)^(1/4)] + Log[1 + (a^2*Sin[x])/Sqrt[-b^4 - a^4*Sin[x]^2] +
 (Sqrt[2]*a*Sqrt[Sin[x]])/(-b^4 - a^4*Sin[x]^2)^(1/4)]))/(2*2^(3/4)*a*(a^4 + b^4*Csc[x]^2)^(1/4)*Sqrt[Sin[x]])

Maple [F]

\[\int \frac {\cot \left (x \right )}{\left (a^{4}+b^{4} \left (\csc ^{2}\left (x \right )\right )\right )^{\frac {1}{4}}}d x\]

[In]

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

[Out]

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

Fricas [F(-1)]

Timed out. \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=\text {Timed out} \]

[In]

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

[Out]

Timed out

Sympy [F]

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.37 \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=-\frac {\arctan \left (\frac {{\left (a^{4} + \frac {b^{4}}{\sin \left (x\right )^{2}}\right )}^{\frac {1}{4}}}{a}\right )}{a} + \frac {\log \left (a + {\left (a^{4} + \frac {b^{4}}{\sin \left (x\right )^{2}}\right )}^{\frac {1}{4}}\right )}{2 \, a} - \frac {\log \left (-a + {\left (a^{4} + \frac {b^{4}}{\sin \left (x\right )^{2}}\right )}^{\frac {1}{4}}\right )}{2 \, a} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.48 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.40 \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=-\frac {\arctan \left (\frac {{\left (a^{4} + \frac {b^{4}}{\sin \left (x\right )^{2}}\right )}^{\frac {1}{4}}}{a}\right )}{a} + \frac {\log \left ({\left | a + {\left (a^{4} + \frac {b^{4}}{\sin \left (x\right )^{2}}\right )}^{\frac {1}{4}} \right |}\right )}{2 \, a} - \frac {\log \left ({\left | -a + {\left (a^{4} + \frac {b^{4}}{\sin \left (x\right )^{2}}\right )}^{\frac {1}{4}} \right |}\right )}{2 \, a} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.88 \[ \int \frac {\cot (x)}{\sqrt [4]{a^4+b^4 \csc ^2(x)}} \, dx=-\frac {\mathrm {atan}\left (\frac {{\left (\frac {b^4}{{\sin \left (x\right )}^2}+a^4\right )}^{1/4}}{a}\right )-\mathrm {atanh}\left (\frac {{\left (\frac {b^4}{{\sin \left (x\right )}^2}+a^4\right )}^{1/4}}{a}\right )}{a} \]

[In]

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

[Out]

-(atan((b^4/sin(x)^2 + a^4)^(1/4)/a) - atanh((b^4/sin(x)^2 + a^4)^(1/4)/a))/a