3.677 \(\int e^{-x} \cos (3 x) \, dx\)

Optimal. Leaf size=27 \[ \frac{3}{10} e^{-x} \sin (3 x)-\frac{1}{10} e^{-x} \cos (3 x) \]

[Out]

-Cos[3*x]/(10*E^x) + (3*Sin[3*x])/(10*E^x)

________________________________________________________________________________________

Rubi [A]  time = 0.0103131, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {4433} \[ \frac{3}{10} e^{-x} \sin (3 x)-\frac{1}{10} e^{-x} \cos (3 x) \]

Antiderivative was successfully verified.

[In]

Int[Cos[3*x]/E^x,x]

[Out]

-Cos[3*x]/(10*E^x) + (3*Sin[3*x])/(10*E^x)

Rule 4433

Int[Cos[(d_.) + (e_.)*(x_)]*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Simp[(b*c*Log[F]*F^(c*(a + b*x))*C
os[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x] + Simp[(e*F^(c*(a + b*x))*Sin[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x]
 /; FreeQ[{F, a, b, c, d, e}, x] && NeQ[e^2 + b^2*c^2*Log[F]^2, 0]

Rubi steps

\begin{align*} \int e^{-x} \cos (3 x) \, dx &=-\frac{1}{10} e^{-x} \cos (3 x)+\frac{3}{10} e^{-x} \sin (3 x)\\ \end{align*}

Mathematica [A]  time = 0.026826, size = 20, normalized size = 0.74 \[ -\frac{1}{10} e^{-x} (\cos (3 x)-3 \sin (3 x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[3*x]/E^x,x]

[Out]

-(Cos[3*x] - 3*Sin[3*x])/(10*E^x)

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 22, normalized size = 0.8 \begin{align*} -{\frac{{{\rm e}^{-x}}\cos \left ( 3\,x \right ) }{10}}+{\frac{3\,{{\rm e}^{-x}}\sin \left ( 3\,x \right ) }{10}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(3*x)/exp(x),x)

[Out]

-1/10*exp(-x)*cos(3*x)+3/10*exp(-x)*sin(3*x)

________________________________________________________________________________________

Maxima [A]  time = 0.96265, size = 23, normalized size = 0.85 \begin{align*} -\frac{1}{10} \,{\left (\cos \left (3 \, x\right ) - 3 \, \sin \left (3 \, x\right )\right )} e^{\left (-x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(3*x)/exp(x),x, algorithm="maxima")

[Out]

-1/10*(cos(3*x) - 3*sin(3*x))*e^(-x)

________________________________________________________________________________________

Fricas [A]  time = 0.823648, size = 62, normalized size = 2.3 \begin{align*} -\frac{1}{10} \, \cos \left (3 \, x\right ) e^{\left (-x\right )} + \frac{3}{10} \, e^{\left (-x\right )} \sin \left (3 \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(3*x)/exp(x),x, algorithm="fricas")

[Out]

-1/10*cos(3*x)*e^(-x) + 3/10*e^(-x)*sin(3*x)

________________________________________________________________________________________

Sympy [A]  time = 0.483834, size = 20, normalized size = 0.74 \begin{align*} \frac{3 e^{- x} \sin{\left (3 x \right )}}{10} - \frac{e^{- x} \cos{\left (3 x \right )}}{10} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(3*x)/exp(x),x)

[Out]

3*exp(-x)*sin(3*x)/10 - exp(-x)*cos(3*x)/10

________________________________________________________________________________________

Giac [A]  time = 1.24043, size = 23, normalized size = 0.85 \begin{align*} -\frac{1}{10} \,{\left (\cos \left (3 \, x\right ) - 3 \, \sin \left (3 \, x\right )\right )} e^{\left (-x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(3*x)/exp(x),x, algorithm="giac")

[Out]

-1/10*(cos(3*x) - 3*sin(3*x))*e^(-x)