3.67 \(\int \cos (x) \sin (\frac{\pi }{6}+x) \, dx\)

Optimal. Leaf size=20 \[ \frac{x}{4}-\frac{1}{4} \cos \left (2 x+\frac{\pi }{6}\right ) \]

[Out]

x/4 - Cos[Pi/6 + 2*x]/4

________________________________________________________________________________________

Rubi [A]  time = 0.0144671, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {4574, 2638} \[ \frac{x}{4}-\frac{1}{4} \cos \left (2 x+\frac{\pi }{6}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]*Sin[Pi/6 + x],x]

[Out]

x/4 - Cos[Pi/6 + 2*x]/4

Rule 4574

Int[Cos[w_]^(q_.)*Sin[v_]^(p_.), x_Symbol] :> Int[ExpandTrigReduce[Sin[v]^p*Cos[w]^q, x], x] /; IGtQ[p, 0] &&
IGtQ[q, 0] && ((PolynomialQ[v, x] && PolynomialQ[w, x]) || (BinomialQ[{v, w}, x] && IndependentQ[Cancel[v/w],
x]))

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cos (x) \sin \left (\frac{\pi }{6}+x\right ) \, dx &=\int \left (\frac{1}{4}+\frac{1}{2} \sin \left (\frac{\pi }{6}+2 x\right )\right ) \, dx\\ &=\frac{x}{4}+\frac{1}{2} \int \sin \left (\frac{\pi }{6}+2 x\right ) \, dx\\ &=\frac{x}{4}-\frac{1}{4} \cos \left (\frac{\pi }{6}+2 x\right )\\ \end{align*}

Mathematica [A]  time = 0.0108803, size = 20, normalized size = 1. \[ \frac{x}{4}-\frac{1}{4} \cos \left (2 x+\frac{\pi }{6}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]*Sin[Pi/6 + x],x]

[Out]

x/4 - Cos[Pi/6 + 2*x]/4

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 15, normalized size = 0.8 \begin{align*}{\frac{x}{4}}-{\frac{1}{4}\cos \left ({\frac{\pi }{6}}+2\,x \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)*sin(1/6*Pi+x),x)

[Out]

1/4*x-1/4*cos(1/6*Pi+2*x)

________________________________________________________________________________________

Maxima [A]  time = 0.932546, size = 19, normalized size = 0.95 \begin{align*} \frac{1}{4} \, x - \frac{1}{4} \, \cos \left (\frac{1}{6} \, \pi + 2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sin(1/6*pi+x),x, algorithm="maxima")

[Out]

1/4*x - 1/4*cos(1/6*pi + 2*x)

________________________________________________________________________________________

Fricas [B]  time = 1.98278, size = 105, normalized size = 5.25 \begin{align*} -\frac{1}{4} \, \sqrt{3} \cos \left (\frac{1}{6} \, \pi + x\right )^{2} - \frac{1}{4} \, \cos \left (\frac{1}{6} \, \pi + x\right ) \sin \left (\frac{1}{6} \, \pi + x\right ) + \frac{1}{4} \, x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sin(1/6*pi+x),x, algorithm="fricas")

[Out]

-1/4*sqrt(3)*cos(1/6*pi + x)^2 - 1/4*cos(1/6*pi + x)*sin(1/6*pi + x) + 1/4*x

________________________________________________________________________________________

Sympy [B]  time = 0.544632, size = 37, normalized size = 1.85 \begin{align*} - \frac{x \sin{\left (x \right )} \cos{\left (x + \frac{\pi }{6} \right )}}{2} + \frac{x \sin{\left (x + \frac{\pi }{6} \right )} \cos{\left (x \right )}}{2} - \frac{\cos{\left (x \right )} \cos{\left (x + \frac{\pi }{6} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sin(1/6*pi+x),x)

[Out]

-x*sin(x)*cos(x + pi/6)/2 + x*sin(x + pi/6)*cos(x)/2 - cos(x)*cos(x + pi/6)/2

________________________________________________________________________________________

Giac [A]  time = 1.06048, size = 19, normalized size = 0.95 \begin{align*} \frac{1}{4} \, x - \frac{1}{4} \, \cos \left (\frac{1}{6} \, \pi + 2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sin(1/6*pi+x),x, algorithm="giac")

[Out]

1/4*x - 1/4*cos(1/6*pi + 2*x)