3.718 \(\int \csc ^2(x) (1+\sin ^2(x)) \, dx\)

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

[Out]

x-cot(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3012, 8} \[ x-\cot (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x - Cot[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3012

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
+ f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

x - Cot[x]

________________________________________________________________________________________

fricas [B]  time = 0.67, 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(csc(x)^2*(1+sin(x)^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.15, 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(csc(x)^2*(1+sin(x)^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^2*(1+sin(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(csc(x)^2*(1+sin(x)^2),x, algorithm="maxima")

[Out]

x - 1/tan(x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - cot(x)

________________________________________________________________________________________

sympy [A]  time = 4.21, size = 3, normalized size = 0.50 \[ x - \cot {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**2*(1+sin(x)**2),x)

[Out]

x - cot(x)

________________________________________________________________________________________