\(\int e^{-x} \cos (3 x) \, dx\) [677]

   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 = 10, antiderivative size = 27 \[ \int e^{-x} \cos (3 x) \, dx=-\frac {1}{10} e^{-x} \cos (3 x)+\frac {3}{10} e^{-x} \sin (3 x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {4518} \[ \int e^{-x} \cos (3 x) \, dx=\frac {3}{10} e^{-x} \sin (3 x)-\frac {1}{10} e^{-x} \cos (3 x) \]

[In]

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

[Out]

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

Rule 4518

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*} \text {integral}& = -\frac {1}{10} e^{-x} \cos (3 x)+\frac {3}{10} e^{-x} \sin (3 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.74 \[ \int e^{-x} \cos (3 x) \, dx=-\frac {1}{10} e^{-x} (\cos (3 x)-3 \sin (3 x)) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.67

method result size
parallelrisch \(-\frac {{\mathrm e}^{-x} \left (\cos \left (3 x \right )-3 \sin \left (3 x \right )\right )}{10}\) \(18\)
default \(-\frac {{\mathrm e}^{-x} \cos \left (3 x \right )}{10}+\frac {3 \,{\mathrm e}^{-x} \sin \left (3 x \right )}{10}\) \(22\)
norman \(\frac {\left (-\frac {1}{10}+\frac {\left (\tan ^{2}\left (\frac {3 x}{2}\right )\right )}{10}+\frac {3 \tan \left (\frac {3 x}{2}\right )}{5}\right ) {\mathrm e}^{-x}}{1+\tan ^{2}\left (\frac {3 x}{2}\right )}\) \(32\)
risch \(-\frac {{\mathrm e}^{\left (-1+3 i\right ) x}}{20}-\frac {3 i {\mathrm e}^{\left (-1+3 i\right ) x}}{20}-\frac {{\mathrm e}^{\left (-1-3 i\right ) x}}{20}+\frac {3 i {\mathrm e}^{\left (-1-3 i\right ) x}}{20}\) \(36\)

[In]

int(cos(3*x)/exp(x),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.78 \[ \int e^{-x} \cos (3 x) \, dx=-\frac {1}{10} \, \cos \left (3 \, x\right ) e^{\left (-x\right )} + \frac {3}{10} \, e^{\left (-x\right )} \sin \left (3 \, x\right ) \]

[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] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.74 \[ \int e^{-x} \cos (3 x) \, dx=\frac {3 e^{- x} \sin {\left (3 x \right )}}{10} - \frac {e^{- x} \cos {\left (3 x \right )}}{10} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.63 \[ \int e^{-x} \cos (3 x) \, dx=-\frac {1}{10} \, {\left (\cos \left (3 \, x\right ) - 3 \, \sin \left (3 \, x\right )\right )} e^{\left (-x\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.63 \[ \int e^{-x} \cos (3 x) \, dx=-\frac {1}{10} \, {\left (\cos \left (3 \, x\right ) - 3 \, \sin \left (3 \, x\right )\right )} e^{\left (-x\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.63 \[ \int e^{-x} \cos (3 x) \, dx=-\frac {{\mathrm {e}}^{-x}\,\left (\cos \left (3\,x\right )-3\,\sin \left (3\,x\right )\right )}{10} \]

[In]

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

[Out]

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