3.66 \(\int (1-\sin (2 x))^2 \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0090706, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {2644} \[ \frac{3 x}{2}+\cos (2 x)-\frac{1}{4} \sin (2 x) \cos (2 x) \]

Antiderivative was successfully verified.

[In]

Int[(1 - Sin[2*x])^2,x]

[Out]

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

Rule 2644

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^2, x_Symbol] :> Simp[((2*a^2 + b^2)*x)/2, x] + (-Simp[(2*a*b*Cos[c
+ d*x])/d, x] - Simp[(b^2*Cos[c + d*x]*Sin[c + d*x])/(2*d), x]) /; FreeQ[{a, b, c, d}, x]

Rubi steps

\begin{align*} \int (1-\sin (2 x))^2 \, dx &=\frac{3 x}{2}+\cos (2 x)-\frac{1}{4} \cos (2 x) \sin (2 x)\\ \end{align*}

Mathematica [A]  time = 0.0077577, size = 18, normalized size = 0.82 \[ \frac{3 x}{2}-\frac{1}{8} \sin (4 x)+\cos (2 x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - Sin[2*x])^2,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 19, normalized size = 0.9 \begin{align*}{\frac{3\,x}{2}}+\cos \left ( 2\,x \right ) -{\frac{\cos \left ( 2\,x \right ) \sin \left ( 2\,x \right ) }{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-sin(2*x))^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.935611, size = 19, normalized size = 0.86 \begin{align*} \frac{3}{2} \, x + \cos \left (2 \, x\right ) - \frac{1}{8} \, \sin \left (4 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-sin(2*x))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.97602, size = 58, normalized size = 2.64 \begin{align*} -\frac{1}{4} \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right ) + \frac{3}{2} \, x + \cos \left (2 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-sin(2*x))^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.17712, size = 37, normalized size = 1.68 \begin{align*} \frac{x \sin ^{2}{\left (2 x \right )}}{2} + \frac{x \cos ^{2}{\left (2 x \right )}}{2} + x - \frac{\sin{\left (2 x \right )} \cos{\left (2 x \right )}}{4} + \cos{\left (2 x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-sin(2*x))**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.0555, size = 19, normalized size = 0.86 \begin{align*} \frac{3}{2} \, x + \cos \left (2 \, x\right ) - \frac{1}{8} \, \sin \left (4 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-sin(2*x))^2,x, algorithm="giac")

[Out]

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