\(\int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx\) [376]

   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 = 22, antiderivative size = 29 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=2 a x-\frac {2 c \cos (d+e x)}{e}-\frac {2 a \sin (d+e x)}{e} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2717, 2718} \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=-\frac {2 a \sin (d+e x)}{e}+2 a x-\frac {2 c \cos (d+e x)}{e} \]

[In]

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

[Out]

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

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, 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}& = 2 a x-(2 a) \int \cos (d+e x) \, dx+(2 c) \int \sin (d+e x) \, dx \\ & = 2 a x-\frac {2 c \cos (d+e x)}{e}-\frac {2 a \sin (d+e x)}{e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.83 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=2 a x-\frac {2 c \cos (d) \cos (e x)}{e}-\frac {2 a \cos (e x) \sin (d)}{e}-\frac {2 a \cos (d) \sin (e x)}{e}+\frac {2 c \sin (d) \sin (e x)}{e} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.49 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.03

method result size
default \(2 a x -\frac {2 c \cos \left (e x +d \right )}{e}-\frac {2 a \sin \left (e x +d \right )}{e}\) \(30\)
risch \(2 a x -\frac {2 c \cos \left (e x +d \right )}{e}-\frac {2 a \sin \left (e x +d \right )}{e}\) \(30\)
parts \(2 a x -\frac {2 c \cos \left (e x +d \right )}{e}-\frac {2 a \sin \left (e x +d \right )}{e}\) \(30\)
derivativedivides \(\frac {2 \left (e x +d \right ) a -2 c \cos \left (e x +d \right )-2 a \sin \left (e x +d \right )}{e}\) \(32\)
parallelrisch \(\frac {-2 a \sin \left (e x +d \right )-2 c \cos \left (e x +d \right )+2 c}{e}+2 a x\) \(32\)
norman \(\frac {\frac {4 c \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}}{e}+2 a x -\frac {4 a \tan \left (\frac {e x}{2}+\frac {d}{2}\right )}{e}+2 a x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}}{1+\tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}}\) \(69\)

[In]

int(2*a-2*a*cos(e*x+d)+2*c*sin(e*x+d),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.97 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=\frac {2 \, {\left (a e x - c \cos \left (e x + d\right ) - a \sin \left (e x + d\right )\right )}}{e} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.34 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=2 a x - 2 a \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 ) + 2 c \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 ) \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=2 \, a x - \frac {2 \, c \cos \left (e x + d\right )}{e} - \frac {2 \, a \sin \left (e x + d\right )}{e} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=2 \, a x - \frac {2 \, c \cos \left (e x + d\right )}{e} - \frac {2 \, a \sin \left (e x + d\right )}{e} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 27.29 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x)) \, dx=2\,a\,x-\frac {2\,c\,\cos \left (d+e\,x\right )}{e}-\frac {2\,a\,\sin \left (d+e\,x\right )}{e} \]

[In]

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

[Out]

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