\(\int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx\) [398]

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

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 27, 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.111, Rules used = {2717, 2718} \[ \int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx=a x+\frac {b \sin (d+e x)}{e}-\frac {c \cos (d+e x)}{e} \]

[In]

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

[Out]

a*x - (c*Cos[d + e*x])/e + (b*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}& = a x+b \int \cos (d+e x) \, dx+c \int \sin (d+e x) \, dx \\ & = a x-\frac {c \cos (d+e x)}{e}+\frac {b \sin (d+e x)}{e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.81 \[ \int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx=a x-\frac {c \cos (d) \cos (e x)}{e}+\frac {b \cos (e x) \sin (d)}{e}+\frac {b \cos (d) \sin (e x)}{e}+\frac {c \sin (d) \sin (e x)}{e} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.04

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx=\frac {a e x - c \cos \left (e x + d\right ) + b \sin \left (e x + d\right )}{e} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.26 \[ \int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx=a x + 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 ) + 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(a+b*cos(e*x+d)+c*sin(e*x+d),x)

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 26.44 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.48 \[ \int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx=a\,x-\frac {2\,c-2\,b\,\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}{e\,\left ({\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2+1\right )} \]

[In]

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

[Out]

a*x - (2*c - 2*b*tan(d/2 + (e*x)/2))/(e*(tan(d/2 + (e*x)/2)^2 + 1))