3.1.66 \(\int (1-\sin (2 x))^2 \, dx\) [66]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2723} \begin {gather*} \frac {3 x}{2}+\cos (2 x)-\frac {1}{4} \sin (2 x) \cos (2 x) \end {gather*}

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 2723

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.01, size = 18, normalized size = 0.82 \begin {gather*} \frac {3 x}{2}+\cos (2 x)-\frac {1}{8} \sin (4 x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 2.02, size = 14, normalized size = 0.64 \begin {gather*} \frac {3 x}{2}+\text {Cos}\left [2 x\right ]-\frac {\text {Sin}\left [4 x\right ]}{8} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 19, normalized size = 0.86

method result size
risch \(\frac {3 x}{2}-\frac {\sin \left (4 x \right )}{8}+\cos \left (2 x \right )\) \(15\)
derivativedivides \(\frac {3 x}{2}+\cos \left (2 x \right )-\frac {\cos \left (2 x \right ) \sin \left (2 x \right )}{4}\) \(19\)
default \(\frac {3 x}{2}+\cos \left (2 x \right )-\frac {\cos \left (2 x \right ) \sin \left (2 x \right )}{4}\) \(19\)
norman \(\frac {2 \left (\tan ^{2}\left (x \right )\right )+\frac {3 x}{2}+\frac {\left (\tan ^{3}\left (x \right )\right )}{2}+3 x \left (\tan ^{2}\left (x \right )\right )+\frac {3 x \left (\tan ^{4}\left (x \right )\right )}{2}-\frac {\tan \left (x \right )}{2}+2}{\left (1+\tan ^{2}\left (x \right )\right )^{2}}\) \(45\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-sin(2*x))^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 14, normalized size = 0.64 \begin {gather*} \frac {3}{2} \, x + \cos \left (2 \, x\right ) - \frac {1}{8} \, \sin \left (4 \, x\right ) \end {gather*}

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 = 0.36, size = 18, normalized size = 0.82 \begin {gather*} -\frac {1}{4} \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right ) + \frac {3}{2} \, x + \cos \left (2 \, x\right ) \end {gather*}

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.08, size = 37, normalized size = 1.68 \begin {gather*} \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 {gather*}

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 = 0.00, size = 28, normalized size = 1.27 \begin {gather*} \frac {x}{2}-\frac {\sin \left (4 x\right )}{8}+\frac {\cos \left (2 x\right )}{2}+\frac {\cos \left (2 x\right )}{2}+x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.26, size = 14, normalized size = 0.64 \begin {gather*} \frac {3\,x}{2}+\cos \left (2\,x\right )-\frac {\sin \left (4\,x\right )}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________