3.390 \(\int (2 a+2 b \cos (d+e x)-2 a \sin (d+e x)) \, dx\)

Optimal. Leaf size=29 \[ \frac {2 a \cos (d+e x)}{e}+2 a x+\frac {2 b \sin (d+e x)}{e} \]

[Out]

2*a*x+2*a*cos(e*x+d)/e+2*b*sin(e*x+d)/e

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2637, 2638} \[ \frac {2 a \cos (d+e x)}{e}+2 a x+\frac {2 b \sin (d+e x)}{e} \]

Antiderivative was successfully verified.

[In]

Int[2*a + 2*b*Cos[d + e*x] - 2*a*Sin[d + e*x],x]

[Out]

2*a*x + (2*a*Cos[d + e*x])/e + (2*b*Sin[d + e*x])/e

Rule 2637

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

Rule 2638

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

Rubi steps

\begin {align*} \int (2 a+2 b \cos (d+e x)-2 a \sin (d+e x)) \, dx &=2 a x-(2 a) \int \sin (d+e x) \, dx+(2 b) \int \cos (d+e x) \, dx\\ &=2 a x+\frac {2 a \cos (d+e x)}{e}+\frac {2 b \sin (d+e x)}{e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 53, normalized size = 1.83 \[ -\frac {2 a \sin (d) \sin (e x)}{e}+\frac {2 a \cos (d) \cos (e x)}{e}+2 a x+\frac {2 b \sin (d) \cos (e x)}{e}+\frac {2 b \cos (d) \sin (e x)}{e} \]

Antiderivative was successfully verified.

[In]

Integrate[2*a + 2*b*Cos[d + e*x] - 2*a*Sin[d + e*x],x]

[Out]

2*a*x + (2*a*Cos[d]*Cos[e*x])/e + (2*b*Cos[e*x]*Sin[d])/e + (2*b*Cos[d]*Sin[e*x])/e - (2*a*Sin[d]*Sin[e*x])/e

________________________________________________________________________________________

fricas [A]  time = 2.90, size = 26, normalized size = 0.90 \[ \frac {2 \, {\left (a e x + a \cos \left (e x + d\right ) + b \sin \left (e x + d\right )\right )}}{e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*a+2*b*cos(e*x+d)-2*a*sin(e*x+d),x, algorithm="fricas")

[Out]

2*(a*e*x + a*cos(e*x + d) + b*sin(e*x + d))/e

________________________________________________________________________________________

giac [A]  time = 0.14, size = 29, normalized size = 1.00 \[ 2 \, a \cos \left (x e + d\right ) e^{\left (-1\right )} + 2 \, b e^{\left (-1\right )} \sin \left (x e + d\right ) + 2 \, a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*a+2*b*cos(e*x+d)-2*a*sin(e*x+d),x, algorithm="giac")

[Out]

2*a*cos(x*e + d)*e^(-1) + 2*b*e^(-1)*sin(x*e + d) + 2*a*x

________________________________________________________________________________________

maple [A]  time = 0.00, size = 30, normalized size = 1.03 \[ 2 a x +\frac {2 a \cos \left (e x +d \right )}{e}+\frac {2 b \sin \left (e x +d \right )}{e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*a+2*b*cos(e*x+d)-2*a*sin(e*x+d),x)

[Out]

2*a*x+2*a*cos(e*x+d)/e+2*b*sin(e*x+d)/e

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 29, normalized size = 1.00 \[ 2 \, a x + \frac {2 \, a \cos \left (e x + d\right )}{e} + \frac {2 \, b \sin \left (e x + d\right )}{e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*a+2*b*cos(e*x+d)-2*a*sin(e*x+d),x, algorithm="maxima")

[Out]

2*a*x + 2*a*cos(e*x + d)/e + 2*b*sin(e*x + d)/e

________________________________________________________________________________________

mupad [B]  time = 2.44, size = 29, normalized size = 1.00 \[ 2\,a\,x+\frac {2\,a\,\cos \left (d+e\,x\right )}{e}+\frac {2\,b\,\sin \left (d+e\,x\right )}{e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*a + 2*b*cos(d + e*x) - 2*a*sin(d + e*x),x)

[Out]

2*a*x + (2*a*cos(d + e*x))/e + (2*b*sin(d + e*x))/e

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 39, normalized size = 1.34 \[ 2 a x - 2 a \left (\begin {cases} - \frac {\cos {\left (d + e x \right )}}{e} & \text {for}\: e \neq 0 \\x \sin {\relax (d )} & \text {otherwise} \end {cases}\right ) + 2 b \left (\begin {cases} \frac {\sin {\left (d + e x \right )}}{e} & \text {for}\: e \neq 0 \\x \cos {\relax (d )} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*a+2*b*cos(e*x+d)-2*a*sin(e*x+d),x)

[Out]

2*a*x - 2*a*Piecewise((-cos(d + e*x)/e, Ne(e, 0)), (x*sin(d), True)) + 2*b*Piecewise((sin(d + e*x)/e, Ne(e, 0)
), (x*cos(d), True))

________________________________________________________________________________________