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

Optimal. Leaf size=11 \[ -\frac{1}{2} \log \left (\cos ^2(x)+1\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0317343, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {4335, 260} \[ -\frac{1}{2} \log \left (\cos ^2(x)+1\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 4335

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

Rule 260

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]

Rubi steps

\begin{align*} \int \frac{\cos (x) \sin (x)}{1+\cos ^2(x)} \, dx &=-\operatorname{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]  time = 0.028184, size = 11, normalized size = 1. \[ -\frac{1}{2} \log (\cos (2 x)+3) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 10, normalized size = 0.9 \begin{align*} -{\frac{\ln \left ( 1+ \left ( \cos \left ( x \right ) \right ) ^{2} \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.947922, size = 12, normalized size = 1.09 \begin{align*} -\frac{1}{2} \, \log \left (\cos \left (x\right )^{2} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.05358, size = 41, normalized size = 3.73 \begin{align*} -\frac{1}{2} \, \log \left (\frac{1}{2} \, \cos \left (x\right )^{2} + \frac{1}{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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]  time = 0.194233, size = 10, normalized size = 0.91 \begin{align*} - \frac{\log{\left (\cos ^{2}{\left (x \right )} + 1 \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.07364, size = 12, normalized size = 1.09 \begin{align*} -\frac{1}{2} \, \log \left (\cos \left (x\right )^{2} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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