3.233 \(\int \cos (x) \sin (a+x) \, dx\)

Optimal. Leaf size=18 \[ \frac{1}{2} x \sin (a)-\frac{1}{4} \cos (a+2 x) \]

[Out]

-Cos[a + 2*x]/4 + (x*Sin[a])/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0281243, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286 \[ \frac{1}{2} x \sin (a)-\frac{1}{4} \cos (a+2 x) \]

Antiderivative was successfully verified.

[In]  Int[Cos[x]*Sin[a + x],x]

[Out]

-Cos[a + 2*x]/4 + (x*Sin[a])/2

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \sin{\left (a \right )} \int \frac{1}{2}\, dx - \frac{\cos{\left (a + 2 x \right )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(cos(x)*sin(a+x),x)

[Out]

sin(a)*Integral(1/2, x) - cos(a + 2*x)/4

_______________________________________________________________________________________

Mathematica [A]  time = 0.0239456, size = 18, normalized size = 1. \[ \frac{1}{4} (2 x \sin (a)-\cos (a+2 x)) \]

Antiderivative was successfully verified.

[In]  Integrate[Cos[x]*Sin[a + x],x]

[Out]

(-Cos[a + 2*x] + 2*x*Sin[a])/4

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 15, normalized size = 0.8 \[ -{\frac{\cos \left ( a+2\,x \right ) }{4}}+{\frac{x\sin \left ( a \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(cos(x)*sin(a+x),x)

[Out]

-1/4*cos(a+2*x)+1/2*x*sin(a)

_______________________________________________________________________________________

Maxima [A]  time = 1.37006, size = 19, normalized size = 1.06 \[ \frac{1}{2} \, x \sin \left (a\right ) - \frac{1}{4} \, \cos \left (a + 2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)*sin(a + x),x, algorithm="maxima")

[Out]

1/2*x*sin(a) - 1/4*cos(a + 2*x)

_______________________________________________________________________________________

Fricas [A]  time = 0.238898, size = 38, normalized size = 2.11 \[ -\frac{1}{2} \, \cos \left (a + x\right )^{2} \cos \left (a\right ) - \frac{1}{2} \, \cos \left (a + x\right ) \sin \left (a + x\right ) \sin \left (a\right ) + \frac{1}{2} \, x \sin \left (a\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)*sin(a + x),x, algorithm="fricas")

[Out]

-1/2*cos(a + x)^2*cos(a) - 1/2*cos(a + x)*sin(a + x)*sin(a) + 1/2*x*sin(a)

_______________________________________________________________________________________

Sympy [A]  time = 0.74076, size = 32, normalized size = 1.78 \[ - \frac{x \sin{\left (x \right )} \cos{\left (a + x \right )}}{2} + \frac{x \sin{\left (a + x \right )} \cos{\left (x \right )}}{2} - \frac{\cos{\left (x \right )} \cos{\left (a + x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)*sin(a+x),x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.198968, size = 19, normalized size = 1.06 \[ \frac{1}{2} \, x \sin \left (a\right ) - \frac{1}{4} \, \cos \left (a + 2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(x)*sin(a + x),x, algorithm="giac")

[Out]

1/2*x*sin(a) - 1/4*cos(a + 2*x)