\(\int \cos (x) \sin (x) \, dx\) [26]

   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 = 5, antiderivative size = 8 \[ \int \cos (x) \sin (x) \, dx=\frac {\sin ^2(x)}{2} \]

[Out]

1/2*sin(x)^2

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, 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.400, Rules used = {2644, 30} \[ \int \cos (x) \sin (x) \, dx=\frac {\sin ^2(x)}{2} \]

[In]

Int[Cos[x]*Sin[x],x]

[Out]

Sin[x]^2/2

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2644

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rubi steps \begin{align*} \text {integral}& = \text {Subst}(\int x \, dx,x,\sin (x)) \\ & = \frac {\sin ^2(x)}{2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \cos (x) \sin (x) \, dx=-\frac {1}{2} \cos ^2(x) \]

[In]

Integrate[Cos[x]*Sin[x],x]

[Out]

-1/2*Cos[x]^2

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.88

method result size
derivativedivides \(\frac {\left (\sin ^{2}\left (x \right )\right )}{2}\) \(7\)
default \(\frac {\left (\sin ^{2}\left (x \right )\right )}{2}\) \(7\)
risch \(-\frac {\cos \left (2 x \right )}{4}\) \(7\)
parallelrisch \(\frac {1}{4}-\frac {\cos \left (2 x \right )}{4}\) \(9\)
norman \(\frac {2 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{2}}\) \(19\)
meijerg \(\frac {\sqrt {\pi }\, \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (2 x \right )}{\sqrt {\pi }}\right )}{4}\) \(19\)

[In]

int(cos(x)*sin(x),x,method=_RETURNVERBOSE)

[Out]

1/2*sin(x)^2

Fricas [A] (verification not implemented)

none

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

[In]

integrate(cos(x)*sin(x),x, algorithm="fricas")

[Out]

-1/2*cos(x)^2

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.62 \[ \int \cos (x) \sin (x) \, dx=\frac {\sin ^{2}{\left (x \right )}}{2} \]

[In]

integrate(cos(x)*sin(x),x)

[Out]

sin(x)**2/2

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \cos (x) \sin (x) \, dx=-\frac {1}{2} \, \cos \left (x\right )^{2} \]

[In]

integrate(cos(x)*sin(x),x, algorithm="maxima")

[Out]

-1/2*cos(x)^2

Giac [A] (verification not implemented)

none

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

[In]

integrate(cos(x)*sin(x),x, algorithm="giac")

[Out]

-1/2*cos(x)^2

Mupad [B] (verification not implemented)

Time = 0.01 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \cos (x) \sin (x) \, dx=\frac {{\sin \left (x\right )}^2}{2} \]

[In]

int(cos(x)*sin(x),x)

[Out]

sin(x)^2/2