\(\int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx\) [472]

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

Optimal result

Integrand size = 11, antiderivative size = 1 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[Out]

x

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 1, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4465, 8} \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[In]

Int[(Cos[x]^2 + Sin[x]^2)^(-1),x]

[Out]

x

Rule 8

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

Rule 4465

Int[(u_.)*((a_.) + cos[(d_.) + (e_.)*(x_)]^2*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]^2)^(p_.), x_Symbol] :> Dist
[(a + c)^p, Int[ActivateTrig[u], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[b - c, 0]

Rubi steps \begin{align*} \text {integral}& = \int 1 \, dx \\ & = x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 1, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[In]

Integrate[(Cos[x]^2 + Sin[x]^2)^(-1),x]

[Out]

x

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 2, normalized size of antiderivative = 2.00

method result size
default \(x\) \(2\)
risch \(x\) \(2\)
norman \(\frac {x +x \tan \left (\frac {x}{2}\right )^{4}+2 x \tan \left (\frac {x}{2}\right )^{2}}{\left (1+\tan \left (\frac {x}{2}\right )^{2}\right )^{2}}\) \(31\)

[In]

int(1/(sin(x)^2+cos(x)^2),x,method=_RETURNVERBOSE)

[Out]

x

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 1, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[In]

integrate(1/(cos(x)^2+sin(x)^2),x, algorithm="fricas")

[Out]

x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 10 vs. \(2 (0) = 0\).

Time = 0.20 (sec) , antiderivative size = 10, normalized size of antiderivative = 10.00 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=\frac {x}{\sin ^{2}{\left (x \right )} + \cos ^{2}{\left (x \right )}} \]

[In]

integrate(1/(cos(x)**2+sin(x)**2),x)

[Out]

x/(sin(x)**2 + cos(x)**2)

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 1, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[In]

integrate(1/(cos(x)^2+sin(x)^2),x, algorithm="maxima")

[Out]

x

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 1, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[In]

integrate(1/(cos(x)^2+sin(x)^2),x, algorithm="giac")

[Out]

x

Mupad [B] (verification not implemented)

Time = 28.22 (sec) , antiderivative size = 1, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\cos ^2(x)+\sin ^2(x)} \, dx=x \]

[In]

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

[Out]

x