3.125 \(\int \cos (x) \cos (2 x) \, dx\)

Optimal. Leaf size=15 \[ \frac{\sin (x)}{2}+\frac{1}{6} \sin (3 x) \]

[Out]

Sin[x]/2 + Sin[3*x]/6

_______________________________________________________________________________________

Rubi [A]  time = 0.0152933, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143 \[ \frac{\sin (x)}{2}+\frac{1}{6} \sin (3 x) \]

Antiderivative was successfully verified.

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

[Out]

Sin[x]/2 + Sin[3*x]/6

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.947779, size = 10, normalized size = 0.67 \[ \frac{\sin{\left (x \right )}}{2} + \frac{\sin{\left (3 x \right )}}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

sin(x)/2 + sin(3*x)/6

_______________________________________________________________________________________

Mathematica [A]  time = 0.00680412, size = 15, normalized size = 1. \[ \frac{\sin (x)}{2}+\frac{1}{6} \sin (3 x) \]

Antiderivative was successfully verified.

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

[Out]

Sin[x]/2 + Sin[3*x]/6

_______________________________________________________________________________________

Maple [A]  time = 0.015, size = 12, normalized size = 0.8 \[{\frac{\sin \left ( x \right ) }{2}}+{\frac{\sin \left ( 3\,x \right ) }{6}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*sin(x)+1/6*sin(3*x)

_______________________________________________________________________________________

Maxima [A]  time = 1.39047, size = 15, normalized size = 1. \[ \frac{1}{6} \, \sin \left (3 \, x\right ) + \frac{1}{2} \, \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/6*sin(3*x) + 1/2*sin(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.247074, size = 16, normalized size = 1.07 \[ \frac{1}{3} \,{\left (2 \, \cos \left (x\right )^{2} + 1\right )} \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.748108, size = 20, normalized size = 1.33 \[ - \frac{\sin{\left (x \right )} \cos{\left (2 x \right )}}{3} + \frac{2 \sin{\left (2 x \right )} \cos{\left (x \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.198428, size = 15, normalized size = 1. \[ \frac{1}{6} \, \sin \left (3 \, x\right ) + \frac{1}{2} \, \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/6*sin(3*x) + 1/2*sin(x)