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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 22 \[ \int (1-\sin (2 x))^2 \, dx=\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] (verified)

Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2723} \[ \int (1-\sin (2 x))^2 \, dx=\frac {3 x}{2}+\cos (2 x)-\frac {1}{4} \sin (2 x) \cos (2 x) \]

[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*} \text {integral}& = \frac {3 x}{2}+\cos (2 x)-\frac {1}{4} \cos (2 x) \sin (2 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int (1-\sin (2 x))^2 \, dx=\frac {3 x}{2}+\cos (2 x)-\frac {1}{8} \sin (4 x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68

method result size
risch \(\frac {3 x}{2}-\frac {\sin \left (4 x \right )}{8}+\cos \left (2 x \right )\) \(15\)
parallelrisch \(\frac {3 x}{2}+1-\frac {\sin \left (4 x \right )}{8}+\cos \left (2 x \right )\) \(16\)
derivativedivides \(\frac {3 x}{2}+\cos \left (2 x \right )-\frac {\sin \left (2 x \right ) \cos \left (2 x \right )}{4}\) \(19\)
default \(\frac {3 x}{2}+\cos \left (2 x \right )-\frac {\sin \left (2 x \right ) \cos \left (2 x \right )}{4}\) \(19\)
parts \(\frac {3 x}{2}+\cos \left (2 x \right )-\frac {\sin \left (2 x \right ) \cos \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\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int (1-\sin (2 x))^2 \, dx=-\frac {1}{4} \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right ) + \frac {3}{2} \, x + \cos \left (2 \, x\right ) \]

[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] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.68 \[ \int (1-\sin (2 x))^2 \, dx=\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 )} \]

[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)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.64 \[ \int (1-\sin (2 x))^2 \, dx=\frac {3}{2} \, x + \cos \left (2 \, x\right ) - \frac {1}{8} \, \sin \left (4 \, x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.64 \[ \int (1-\sin (2 x))^2 \, dx=\frac {3}{2} \, x + \cos \left (2 \, x\right ) - \frac {1}{8} \, \sin \left (4 \, x\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.64 \[ \int (1-\sin (2 x))^2 \, dx=\frac {3\,x}{2}+\cos \left (2\,x\right )-\frac {\sin \left (4\,x\right )}{8} \]

[In]

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

[Out]

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