\(\int (1+2 \sin (x)) \, dx\) [104]

   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 = 6, antiderivative size = 6 \[ \int (1+2 \sin (x)) \, dx=x-2 \cos (x) \]

[Out]

x-2*cos(x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2718} \[ \int (1+2 \sin (x)) \, dx=x-2 \cos (x) \]

[In]

Int[1 + 2*Sin[x],x]

[Out]

x - 2*Cos[x]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = x+2 \int \sin (x) \, dx \\ & = x-2 \cos (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int (1+2 \sin (x)) \, dx=x-2 \cos (x) \]

[In]

Integrate[1 + 2*Sin[x],x]

[Out]

x - 2*Cos[x]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.17

method result size
default \(x -2 \cos \left (x \right )\) \(7\)
risch \(x -2 \cos \left (x \right )\) \(7\)
parts \(x -2 \cos \left (x \right )\) \(7\)
parallelrisch \(-2-2 \cos \left (x \right )+x\) \(8\)
norman \(\frac {x +x \tan \left (\frac {x}{2}\right )^{2}-4}{1+\tan \left (\frac {x}{2}\right )^{2}}\) \(23\)

[In]

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

[Out]

x-2*cos(x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int (1+2 \sin (x)) \, dx=x - 2 \, \cos \left (x\right ) \]

[In]

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

[Out]

x - 2*cos(x)

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.83 \[ \int (1+2 \sin (x)) \, dx=x - 2 \cos {\left (x \right )} \]

[In]

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

[Out]

x - 2*cos(x)

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int (1+2 \sin (x)) \, dx=x - 2 \, \cos \left (x\right ) \]

[In]

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

[Out]

x - 2*cos(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int (1+2 \sin (x)) \, dx=x - 2 \, \cos \left (x\right ) \]

[In]

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

[Out]

x - 2*cos(x)

Mupad [B] (verification not implemented)

Time = 18.42 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int (1+2 \sin (x)) \, dx=x-2\,\cos \left (x\right ) \]

[In]

int(2*sin(x) + 1,x)

[Out]

x - 2*cos(x)