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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 11, normalized size of antiderivative = 1.00, 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 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]

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

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.03, size = 11, normalized size = 1.00 \[ -\frac {1}{2} \log (\cos (2 x)+3) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 11, normalized size = 1.00 \[ -\frac {1}{2} \, \log \left (\frac {1}{2} \, \cos \relax (x)^{2} + \frac {1}{2}\right ) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 9, normalized size = 0.82 \[ -\frac {1}{2} \, \log \left (\cos \relax (x)^{2} + 1\right ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 10, normalized size = 0.91 \[ -\frac {\ln \left (1+\cos ^{2}\relax (x )\right )}{2} \]

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.33, size = 9, normalized size = 0.82 \[ -\frac {1}{2} \, \log \left (\cos \relax (x)^{2} + 1\right ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 3.01, size = 17, normalized size = 1.55 \[ -\mathrm {atanh}\left (\frac {16}{3\,\left (12\,{\mathrm {tan}\relax (x)}^2+16\right )}-\frac {1}{3}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 10, normalized size = 0.91 \[ - \frac {\log {\left (\cos ^{2}{\relax (x )} + 1 \right )}}{2} \]

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

________________________________________________________________________________________