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[d + e*x])/e + (2*b*Sin[d + e*x])/e

________________________________________________________________________________________

Rubi [A]  time = 0.0144019, antiderivative size = 29, normalized size of antiderivative = 1., 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.0119253, 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

________________________________________________________________________________________

Maple [A]  time = 0., size = 30, normalized size = 1. \begin{align*} 2\,ax+2\,{\frac{a\cos \left ( ex+d \right ) }{e}}+2\,{\frac{b\sin \left ( ex+d \right ) }{e}} \end{align*}

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.990877, size = 39, normalized size = 1.34 \begin{align*} 2 \, a x + \frac{2 \, a \cos \left (e x + d\right )}{e} + \frac{2 \, b \sin \left (e x + d\right )}{e} \end{align*}

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

________________________________________________________________________________________

Fricas [A]  time = 2.14906, size = 63, normalized size = 2.17 \begin{align*} \frac{2 \,{\left (a e x + a \cos \left (e x + d\right ) + b \sin \left (e x + d\right )\right )}}{e} \end{align*}

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

________________________________________________________________________________________

Sympy [A]  time = 0.153007, size = 39, normalized size = 1.34 \begin{align*} 2 a x - 2 a \left (\begin{cases} - \frac{\cos{\left (d + e x \right )}}{e} & \text{for}\: e \neq 0 \\x \sin{\left (d \right )} & \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{\left (d \right )} & \text{otherwise} \end{cases}\right ) \end{align*}

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

________________________________________________________________________________________

Giac [A]  time = 1.12482, size = 39, normalized size = 1.34 \begin{align*} 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 \end{align*}

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