3.398 \(\int (a+b \cos (d+e x)+c \sin (d+e x)) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0157105, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2637, 2638} \[ a x+\frac{b \sin (d+e x)}{e}-\frac{c \cos (d+e x)}{e} \]

Antiderivative was successfully verified.

[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 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 (a+b \cos (d+e x)+c \sin (d+e x)) \, dx &=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]  time = 0.0143011, size = 49, normalized size = 1.81 \[ a x+\frac{b \sin (d) \cos (e x)}{e}+\frac{b \cos (d) \sin (e x)}{e}+\frac{c \sin (d) \sin (e x)}{e}-\frac{c \cos (d) \cos (e x)}{e} \]

Antiderivative was successfully verified.

[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]  time = 0.002, size = 28, normalized size = 1. \begin{align*} ax-{\frac{c\cos \left ( ex+d \right ) }{e}}+{\frac{b\sin \left ( ex+d \right ) }{e}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.978144, size = 36, normalized size = 1.33 \begin{align*} a x - \frac{c \cos \left (e x + d\right )}{e} + \frac{b \sin \left (e x + d\right )}{e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Fricas [A]  time = 2.01996, size = 61, normalized size = 2.26 \begin{align*} \frac{a e x - c \cos \left (e x + d\right ) + b \sin \left (e x + d\right )}{e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[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]  time = 0.154906, size = 34, normalized size = 1.26 \begin{align*} 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 ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

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

________________________________________________________________________________________

Giac [A]  time = 1.11897, size = 36, normalized size = 1.33 \begin{align*} -c \cos \left (x e + d\right ) e^{\left (-1\right )} + b e^{\left (-1\right )} \sin \left (x e + d\right ) + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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