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

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

Optimal result

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

[Out]

-1/2*ln(1+cos(x)^2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 11, 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.154, Rules used = {4420, 266} \[ \int \frac {\cos (x) \sin (x)}{1+\cos ^2(x)} \, dx=-\frac {1}{2} \log \left (\cos ^2(x)+1\right ) \]

[In]

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

[Out]

-1/2*Log[1 + Cos[x]^2]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4420

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, Dist[-d/(
b*c), Subst[Int[SubstFor[1, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[c*(a
+ b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Sin] || EqQ[F, sin])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\cos (x)\right ) \\ & = -\frac {1}{2} \log \left (1+\cos ^2(x)\right ) \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

-1/2*Log[3 + Cos[2*x]]

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91

method result size
derivativedivides \(-\frac {\ln \left (\cos \left (x \right )^{2}+1\right )}{2}\) \(10\)
default \(-\frac {\ln \left (\cos \left (x \right )^{2}+1\right )}{2}\) \(10\)
norman \(-\frac {\ln \left (\tan \left (\frac {x}{2}\right )^{4}+1\right )}{2}+\ln \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )\) \(22\)
risch \(i x -\frac {\ln \left ({\mathrm e}^{4 i x}+6 \,{\mathrm e}^{2 i x}+1\right )}{2}\) \(23\)
parallelrisch \(\ln \left (\frac {\sqrt {2}}{\sqrt {\frac {3+\cos \left (2 x \right )}{\cos \left (2 x \right )+3+4 \cos \left (x \right )}}}\right )+\ln \left (\frac {1}{\cos \left (x \right )+1}\right )\) \(35\)

[In]

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

[Out]

-1/2*ln(cos(x)^2+1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {\cos (x) \sin (x)}{1+\cos ^2(x)} \, dx=-\frac {1}{2} \, \log \left (\frac {1}{2} \, \cos \left (x\right )^{2} + \frac {1}{2}\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \frac {\cos (x) \sin (x)}{1+\cos ^2(x)} \, dx=-\frac {1}{2} \, \log \left (\cos \left (x\right )^{2} + 1\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \frac {\cos (x) \sin (x)}{1+\cos ^2(x)} \, dx=-\frac {1}{2} \, \log \left (\cos \left (x\right )^{2} + 1\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 26.78 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.55 \[ \int \frac {\cos (x) \sin (x)}{1+\cos ^2(x)} \, dx=-\mathrm {atanh}\left (\frac {16}{3\,\left (12\,{\mathrm {tan}\left (x\right )}^2+16\right )}-\frac {1}{3}\right ) \]

[In]

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

[Out]

-atanh(16/(3*(12*tan(x)^2 + 16)) - 1/3)