3.719 \(\int (1+\frac {1}{1+\cot ^2(x)}) \csc ^2(x) \, dx\)

Optimal. Leaf size=6 \[ x-\cot (x) \]

[Out]

x-cot(x)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {14, 203} \[ x-\cot (x) \]

Antiderivative was successfully verified.

[In]

Int[(1 + (1 + Cot[x]^2)^(-1))*Csc[x]^2,x]

[Out]

x - Cot[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 203

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

Rubi steps

\begin {align*} \int \left (1+\frac {1}{1+\cot ^2(x)}\right ) \csc ^2(x) \, dx &=\operatorname {Subst}\left (\int \frac {1+\frac {1}{1+\frac {1}{x^2}}}{x^2} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {1}{x^2}+\frac {1}{1+x^2}\right ) \, dx,x,\tan (x)\right )\\ &=-\cot (x)+\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=x-\cot (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 6, normalized size = 1.00 \[ x-\cot (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + (1 + Cot[x]^2)^(-1))*Csc[x]^2,x]

[Out]

x - Cot[x]

________________________________________________________________________________________

fricas [B]  time = 0.66, size = 14, normalized size = 2.33 \[ \frac {x \sin \relax (x) - \cos \relax (x)}{\sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x*sin(x) - cos(x))/sin(x)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 16, normalized size = 2.67 \[ x - \frac {1}{2 \, \tan \left (\frac {1}{2} \, x\right )} + \frac {1}{2} \, \tan \left (\frac {1}{2} \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/2/tan(1/2*x) + 1/2*tan(1/2*x)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 7, normalized size = 1.17 \[ x -\cot \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-cot(x)

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 8, normalized size = 1.33 \[ x - \frac {1}{\tan \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/tan(x)

________________________________________________________________________________________

mupad [B]  time = 2.94, size = 6, normalized size = 1.00 \[ x-\mathrm {cot}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - cot(x)

________________________________________________________________________________________

sympy [B]  time = 0.70, size = 27, normalized size = 4.50 \[ \frac {x \csc ^{2}{\relax (x )}}{\cot ^{2}{\relax (x )} + 1} - \frac {\cot {\relax (x )} \csc ^{2}{\relax (x )}}{\cot ^{2}{\relax (x )} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*csc(x)**2/(cot(x)**2 + 1) - cot(x)*csc(x)**2/(cot(x)**2 + 1)

________________________________________________________________________________________