3.58 \(\int \sin ^2(3 x) \, dx\)

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

[Out]

x/2 - (Cos[3*x]*Sin[3*x])/6

_______________________________________________________________________________________

Rubi [A]  time = 0.0123712, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ \frac{x}{2}-\frac{1}{6} \sin (3 x) \cos (3 x) \]

Antiderivative was successfully verified.

[In]  Int[Sin[3*x]^2,x]

[Out]

x/2 - (Cos[3*x]*Sin[3*x])/6

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.507694, size = 14, normalized size = 0.78 \[ \frac{x}{2} - \frac{\sin{\left (3 x \right )} \cos{\left (3 x \right )}}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(sin(3*x)**2,x)

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.00436073, size = 14, normalized size = 0.78 \[ \frac{x}{2}-\frac{1}{12} \sin (6 x) \]

Antiderivative was successfully verified.

[In]  Integrate[Sin[3*x]^2,x]

[Out]

x/2 - Sin[6*x]/12

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 15, normalized size = 0.8 \[{\frac{x}{2}}-{\frac{\cos \left ( 3\,x \right ) \sin \left ( 3\,x \right ) }{6}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(sin(3*x)^2,x)

[Out]

1/2*x-1/6*cos(3*x)*sin(3*x)

_______________________________________________________________________________________

Maxima [A]  time = 1.41452, size = 14, normalized size = 0.78 \[ \frac{1}{2} \, x - \frac{1}{12} \, \sin \left (6 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sin(3*x)^2,x, algorithm="maxima")

[Out]

1/2*x - 1/12*sin(6*x)

_______________________________________________________________________________________

Fricas [A]  time = 0.233194, size = 19, normalized size = 1.06 \[ -\frac{1}{6} \, \cos \left (3 \, x\right ) \sin \left (3 \, x\right ) + \frac{1}{2} \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sin(3*x)^2,x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.040998, size = 14, normalized size = 0.78 \[ \frac{x}{2} - \frac{\sin{\left (3 x \right )} \cos{\left (3 x \right )}}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sin(3*x)**2,x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.20009, size = 14, normalized size = 0.78 \[ \frac{1}{2} \, x - \frac{1}{12} \, \sin \left (6 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sin(3*x)^2,x, algorithm="giac")

[Out]

1/2*x - 1/12*sin(6*x)