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

Optimal. Leaf size=6 \[ x-2 \cos (x) \]

[Out]

x-2*cos(x)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2718} \begin {gather*} x-2 \cos (x) \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \text {Integral} &=x+2 \int \sin (x) \, dx\\ &=x-2 \cos (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 6, normalized size = 1.00 \begin {gather*} x-2 \cos (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - 2*Cos[x]

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 7, normalized size = 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 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-4}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) \(23\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-2*cos(x)

________________________________________________________________________________________

Maxima [A]
time = 0.44, size = 6, normalized size = 1.00 \begin {gather*} x - 2 \, \cos \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2*cos(x)

________________________________________________________________________________________

Fricas [A]
time = 0.59, size = 6, normalized size = 1.00 \begin {gather*} x - 2 \, \cos \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2*cos(x)

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 5, normalized size = 0.83 \begin {gather*} x - 2 \cos {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2*cos(x)

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 6, normalized size = 1.00 \begin {gather*} x - 2 \, \cos \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2*cos(x)

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 6, normalized size = 1.00 \begin {gather*} x-2\,\cos \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 2*cos(x)

________________________________________________________________________________________

Chatgpt [A]
time = 1.00, size = 6, normalized size = 1.00 \begin {gather*} x -2 \cos \left (x \right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x-2*cos(x)

________________________________________________________________________________________