3.59 \(\int \cos ^2(x) \, dx\)

Optimal. Leaf size=14 \[ \frac{x}{2}+\frac{1}{2} \sin (x) \cos (x) \]

[Out]

x/2 + (Cos[x]*Sin[x])/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0105966, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5 \[ \frac{x}{2}+\frac{1}{2} \sin (x) \cos (x) \]

Antiderivative was successfully verified.

[In]  Int[Cos[x]^2,x]

[Out]

x/2 + (Cos[x]*Sin[x])/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.486551, size = 10, normalized size = 0.71 \[ \frac{x}{2} + \frac{\sin{\left (x \right )} \cos{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(cos(x)**2,x)

[Out]

x/2 + sin(x)*cos(x)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.00281425, size = 14, normalized size = 1. \[ \frac{x}{2}+\frac{1}{4} \sin (2 x) \]

Antiderivative was successfully verified.

[In]  Integrate[Cos[x]^2,x]

[Out]

x/2 + Sin[2*x]/4

_______________________________________________________________________________________

Maple [A]  time = 0., size = 11, normalized size = 0.8 \[{\frac{x}{2}}+{\frac{\cos \left ( x \right ) \sin \left ( x \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(cos(x)^2,x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.40424, size = 14, normalized size = 1. \[ \frac{1}{2} \, x + \frac{1}{4} \, \sin \left (2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)^2,x, algorithm="maxima")

[Out]

1/2*x + 1/4*sin(2*x)

_______________________________________________________________________________________

Fricas [A]  time = 0.216031, size = 14, normalized size = 1. \[ \frac{1}{2} \, \cos \left (x\right ) \sin \left (x\right ) + \frac{1}{2} \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)^2,x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.035631, size = 10, normalized size = 0.71 \[ \frac{x}{2} + \frac{\sin{\left (x \right )} \cos{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)**2,x)

[Out]

x/2 + sin(x)*cos(x)/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.199655, size = 14, normalized size = 1. \[ \frac{1}{2} \, x + \frac{1}{4} \, \sin \left (2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)^2,x, algorithm="giac")

[Out]

1/2*x + 1/4*sin(2*x)