### 3.278 $$\int \frac{\cos (x)}{1+\sin ^2(x)} \, dx$$

Optimal. Leaf size=3 $\tan ^{-1}(\sin (x))$

[Out]

ArcTan[Sin[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0179629, antiderivative size = 3, normalized size of antiderivative = 1., 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 = {3190, 203} $\tan ^{-1}(\sin (x))$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

ArcTan[Sin[x]]

Rule 3190

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

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 \frac{\cos (x)}{1+\sin ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sin (x)\right )\\ &=\tan ^{-1}(\sin (x))\\ \end{align*}

Mathematica [A]  time = 0.0041201, size = 3, normalized size = 1. $\tan ^{-1}(\sin (x))$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

ArcTan[Sin[x]]

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 4, normalized size = 1.3 \begin{align*} \arctan \left ( \sin \left ( x \right ) \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(sin(x))

________________________________________________________________________________________

Maxima [A]  time = 1.42151, size = 4, normalized size = 1.33 \begin{align*} \arctan \left (\sin \left (x\right )\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(sin(x))

________________________________________________________________________________________

Fricas [A]  time = 1.94026, size = 22, normalized size = 7.33 \begin{align*} \arctan \left (\sin \left (x\right )\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(sin(x))

________________________________________________________________________________________

Sympy [A]  time = 0.223876, size = 3, normalized size = 1. \begin{align*} \operatorname{atan}{\left (\sin{\left (x \right )} \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(sin(x))

________________________________________________________________________________________

Giac [A]  time = 1.06824, size = 4, normalized size = 1.33 \begin{align*} \arctan \left (\sin \left (x\right )\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(sin(x))