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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 16, 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 = {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 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])

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]

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.05, 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]

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 29, normalized size = 1.81 \[ \frac {1}{4} \, \sqrt {2} \log \left (-\frac {\cos \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) + 2}{\cos \relax (x)^{2} - 2}\right ) \]

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))

________________________________________________________________________________________

giac [B]  time = 1.00, size = 27, normalized size = 1.69 \[ -\frac {1}{4} \, \sqrt {2} \log \left (\sqrt {2} + \cos \relax (x)\right ) + \frac {1}{4} \, \sqrt {2} \log \left (\sqrt {2} - \cos \relax (x)\right ) \]

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))

________________________________________________________________________________________

maple [A]  time = 0.03, size = 14, normalized size = 0.88 \[ -\frac {\sqrt {2}\, \arctanh \left (\frac {\sqrt {2}\, \cos \relax (x )}{2}\right )}{2} \]

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 = 0.95, size = 24, normalized size = 1.50 \[ \frac {1}{4} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - \cos \relax (x)}{\sqrt {2} + \cos \relax (x)}\right ) \]

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)))

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 13, normalized size = 0.81 \[ -\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\cos \relax (x)}{2}\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 22.87, size = 46, normalized size = 2.88 \[ \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} \]

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

________________________________________________________________________________________