3.37 \(\int \frac{\sin (x)}{1+\sin ^2(x)} \, dx\)

Optimal. Leaf size=16 \[ -\frac{\tanh ^{-1}\left (\frac{\cos (x)}{\sqrt{2}}\right )}{\sqrt{2}} \]

[Out]

-(ArcTanh[Cos[x]/Sqrt[2]]/Sqrt[2])

________________________________________________________________________________________

Rubi [A]  time = 0.0184993, antiderivative size = 16, 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 = {3186, 206} \[ -\frac{\tanh ^{-1}\left (\frac{\cos (x)}{\sqrt{2}}\right )}{\sqrt{2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(ArcTanh[Cos[x]/Sqrt[2]]/Sqrt[2])

Rule 3186

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

Rule 206

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

Rubi steps

\begin{align*} \int \frac{\sin (x)}{1+\sin ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{2-x^2} \, dx,x,\cos (x)\right )\\ &=-\frac{\tanh ^{-1}\left (\frac{\cos (x)}{\sqrt{2}}\right )}{\sqrt{2}}\\ \end{align*}

Mathematica [C]  time = 0.0506998, size = 46, normalized size = 2.88 \[ -\frac{i \left (\tan ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right )-i}{\sqrt{2}}\right )-\tan ^{-1}\left (\frac{\tan \left (\frac{x}{2}\right )+i}{\sqrt{2}}\right )\right )}{\sqrt{2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((-I)*(ArcTan[(-I + Tan[x/2])/Sqrt[2]] - ArcTan[(I + Tan[x/2])/Sqrt[2]]))/Sqrt[2]

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 14, normalized size = 0.9 \begin{align*} -{\frac{\sqrt{2}}{2}{\it Artanh} \left ({\frac{\cos \left ( x \right ) \sqrt{2}}{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*arctanh(1/2*cos(x)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.42643, size = 32, normalized size = 2. \begin{align*} \frac{1}{4} \, \sqrt{2} \log \left (-\frac{\sqrt{2} - \cos \left (x\right )}{\sqrt{2} + \cos \left (x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*sqrt(2)*log(-(sqrt(2) - cos(x))/(sqrt(2) + cos(x)))

________________________________________________________________________________________

Fricas [B]  time = 1.99284, size = 92, normalized size = 5.75 \begin{align*} \frac{1}{4} \, \sqrt{2} \log \left (-\frac{\cos \left (x\right )^{2} - 2 \, \sqrt{2} \cos \left (x\right ) + 2}{\cos \left (x\right )^{2} - 2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*sqrt(2)*log(-(cos(x)^2 - 2*sqrt(2)*cos(x) + 2)/(cos(x)^2 - 2))

________________________________________________________________________________________

Sympy [B]  time = 25.3179, size = 46, normalized size = 2.88 \begin{align*} \frac{\sqrt{2} \log{\left (\tan ^{2}{\left (\frac{x}{2} \right )} - 2 \sqrt{2} + 3 \right )}}{4} - \frac{\sqrt{2} \log{\left (\tan ^{2}{\left (\frac{x}{2} \right )} + 2 \sqrt{2} + 3 \right )}}{4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(2)*log(tan(x/2)**2 - 2*sqrt(2) + 3)/4 - sqrt(2)*log(tan(x/2)**2 + 2*sqrt(2) + 3)/4

________________________________________________________________________________________

Giac [A]  time = 1.09137, size = 36, normalized size = 2.25 \begin{align*} -\frac{1}{4} \, \sqrt{2} \log \left (\sqrt{2} + \cos \left (x\right )\right ) + \frac{1}{4} \, \sqrt{2} \log \left (\sqrt{2} - \cos \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*sqrt(2)*log(sqrt(2) + cos(x)) + 1/4*sqrt(2)*log(sqrt(2) - cos(x))