3.566 \(\int e^{-3 x} x^2 \sin (x) \, dx\)

Optimal. Leaf size=75 \[ -\frac {3}{10} e^{-3 x} x^2 \sin (x)-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {4}{25} e^{-3 x} x \sin (x)-\frac {9}{250} e^{-3 x} \sin (x)-\frac {3}{25} e^{-3 x} x \cos (x)-\frac {13}{250} e^{-3 x} \cos (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {4432, 4465, 14, 4433, 4466} \[ -\frac {3}{10} e^{-3 x} x^2 \sin (x)-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {4}{25} e^{-3 x} x \sin (x)-\frac {9}{250} e^{-3 x} \sin (x)-\frac {3}{25} e^{-3 x} x \cos (x)-\frac {13}{250} e^{-3 x} \cos (x) \]

Antiderivative was successfully verified.

[In]

Int[(x^2*Sin[x])/E^(3*x),x]

[Out]

(-13*Cos[x])/(250*E^(3*x)) - (3*x*Cos[x])/(25*E^(3*x)) - (x^2*Cos[x])/(10*E^(3*x)) - (9*Sin[x])/(250*E^(3*x))
- (4*x*Sin[x])/(25*E^(3*x)) - (3*x^2*Sin[x])/(10*E^(3*x))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 4432

Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*Sin[(d_.) + (e_.)*(x_)], x_Symbol] :> Simp[(b*c*Log[F]*F^(c*(a + b*x))*S
in[d + e*x])/(e^2 + b^2*c^2*Log[F]^2), x] - Simp[(e*F^(c*(a + b*x))*Cos[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]

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]

Rule 4465

Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*((f_.)*(x_))^(m_.)*Sin[(d_.) + (e_.)*(x_)]^(n_.), x_Symbol] :> Module[{u
 = IntHide[F^(c*(a + b*x))*Sin[d + e*x]^n, x]}, Dist[(f*x)^m, u, x] - Dist[f*m, Int[(f*x)^(m - 1)*u, x], x]] /
; FreeQ[{F, a, b, c, d, e, f}, x] && IGtQ[n, 0] && GtQ[m, 0]

Rule 4466

Int[Cos[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_)))*((f_.)*(x_))^(m_.), x_Symbol] :> Module[{u
 = IntHide[F^(c*(a + b*x))*Cos[d + e*x]^n, x]}, Dist[(f*x)^m, u, x] - Dist[f*m, Int[(f*x)^(m - 1)*u, x], x]] /
; FreeQ[{F, a, b, c, d, e, f}, x] && IGtQ[n, 0] && GtQ[m, 0]

Rubi steps

\begin {align*} \int e^{-3 x} x^2 \sin (x) \, dx &=-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x)-2 \int x \left (-\frac {1}{10} e^{-3 x} \cos (x)-\frac {3}{10} e^{-3 x} \sin (x)\right ) \, dx\\ &=-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x)-2 \int \left (-\frac {1}{10} e^{-3 x} x \cos (x)-\frac {3}{10} e^{-3 x} x \sin (x)\right ) \, dx\\ &=-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x)+\frac {1}{5} \int e^{-3 x} x \cos (x) \, dx+\frac {3}{5} \int e^{-3 x} x \sin (x) \, dx\\ &=-\frac {3}{25} e^{-3 x} x \cos (x)-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {4}{25} e^{-3 x} x \sin (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x)-\frac {1}{5} \int \left (-\frac {3}{10} e^{-3 x} \cos (x)+\frac {1}{10} e^{-3 x} \sin (x)\right ) \, dx-\frac {3}{5} \int \left (-\frac {1}{10} e^{-3 x} \cos (x)-\frac {3}{10} e^{-3 x} \sin (x)\right ) \, dx\\ &=-\frac {3}{25} e^{-3 x} x \cos (x)-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {4}{25} e^{-3 x} x \sin (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x)-\frac {1}{50} \int e^{-3 x} \sin (x) \, dx+2 \left (\frac {3}{50} \int e^{-3 x} \cos (x) \, dx\right )+\frac {9}{50} \int e^{-3 x} \sin (x) \, dx\\ &=-\frac {2}{125} e^{-3 x} \cos (x)-\frac {3}{25} e^{-3 x} x \cos (x)-\frac {1}{10} e^{-3 x} x^2 \cos (x)-\frac {6}{125} e^{-3 x} \sin (x)-\frac {4}{25} e^{-3 x} x \sin (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x)+2 \left (-\frac {9}{500} e^{-3 x} \cos (x)+\frac {3}{500} e^{-3 x} \sin (x)\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 38, normalized size = 0.51 \[ \frac {1}{250} e^{-3 x} \left (-\left (75 x^2+40 x+9\right ) \sin (x)-\left (\left (25 x^2+30 x+13\right ) \cos (x)\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*Sin[x])/E^(3*x),x]

[Out]

(-((13 + 30*x + 25*x^2)*Cos[x]) - (9 + 40*x + 75*x^2)*Sin[x])/(250*E^(3*x))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int e^{-3 x} x^2 \sin (x) \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(x^2*Sin[x])/E^(3*x),x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.11, size = 37, normalized size = 0.49 \[ -\frac {1}{250} \, {\left (25 \, x^{2} + 30 \, x + 13\right )} \cos \relax (x) e^{\left (-3 \, x\right )} - \frac {1}{250} \, {\left (75 \, x^{2} + 40 \, x + 9\right )} e^{\left (-3 \, x\right )} \sin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sin(x)/exp(3*x),x, algorithm="fricas")

[Out]

-1/250*(25*x^2 + 30*x + 13)*cos(x)*e^(-3*x) - 1/250*(75*x^2 + 40*x + 9)*e^(-3*x)*sin(x)

________________________________________________________________________________________

giac [A]  time = 0.57, size = 33, normalized size = 0.44 \[ -\frac {1}{250} \, {\left ({\left (25 \, x^{2} + 30 \, x + 13\right )} \cos \relax (x) + {\left (75 \, x^{2} + 40 \, x + 9\right )} \sin \relax (x)\right )} e^{\left (-3 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sin(x)/exp(3*x),x, algorithm="giac")

[Out]

-1/250*((25*x^2 + 30*x + 13)*cos(x) + (75*x^2 + 40*x + 9)*sin(x))*e^(-3*x)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 36, normalized size = 0.48




method result size



default \(\left (-\frac {1}{10} x^{2}-\frac {3}{25} x -\frac {13}{250}\right ) {\mathrm e}^{-3 x} \cos \relax (x )+\left (-\frac {3}{10} x^{2}-\frac {4}{25} x -\frac {9}{250}\right ) {\mathrm e}^{-3 x} \sin \relax (x )\) \(36\)
risch \(\left (-\frac {1}{500}+\frac {3 i}{500}\right ) \left (25 x^{2}+5 i x +15 x +3 i+4\right ) {\mathrm e}^{\left (-3+i\right ) x}+\left (-\frac {1}{500}-\frac {3 i}{500}\right ) \left (25 x^{2}-5 i x +15 x -3 i+4\right ) {\mathrm e}^{\left (-3-i\right ) x}\) \(54\)
norman \(\frac {\left (-\frac {13}{250}-\frac {3 x}{25}-\frac {x^{2}}{10}+\frac {13 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{250}-\frac {8 x \tan \left (\frac {x}{2}\right )}{25}+\frac {3 x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{25}-\frac {3 x^{2} \tan \left (\frac {x}{2}\right )}{5}+\frac {x^{2} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{10}-\frac {9 \tan \left (\frac {x}{2}\right )}{125}\right ) {\mathrm e}^{-3 x}}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) \(78\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*sin(x)/exp(3*x),x,method=_RETURNVERBOSE)

[Out]

(-1/10*x^2-3/25*x-13/250)*exp(-3*x)*cos(x)+(-3/10*x^2-4/25*x-9/250)*exp(-3*x)*sin(x)

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 33, normalized size = 0.44 \[ -\frac {1}{250} \, {\left ({\left (25 \, x^{2} + 30 \, x + 13\right )} \cos \relax (x) + {\left (75 \, x^{2} + 40 \, x + 9\right )} \sin \relax (x)\right )} e^{\left (-3 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sin(x)/exp(3*x),x, algorithm="maxima")

[Out]

-1/250*((25*x^2 + 30*x + 13)*cos(x) + (75*x^2 + 40*x + 9)*sin(x))*e^(-3*x)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 39, normalized size = 0.52 \[ -\frac {{\mathrm {e}}^{-3\,x}\,\left (13\,\cos \relax (x)+9\,\sin \relax (x)+25\,x^2\,\cos \relax (x)+75\,x^2\,\sin \relax (x)+30\,x\,\cos \relax (x)+40\,x\,\sin \relax (x)\right )}{250} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*exp(-3*x)*sin(x),x)

[Out]

-(exp(-3*x)*(13*cos(x) + 9*sin(x) + 25*x^2*cos(x) + 75*x^2*sin(x) + 30*x*cos(x) + 40*x*sin(x)))/250

________________________________________________________________________________________

sympy [A]  time = 2.28, size = 80, normalized size = 1.07 \[ - \frac {3 x^{2} e^{- 3 x} \sin {\relax (x )}}{10} - \frac {x^{2} e^{- 3 x} \cos {\relax (x )}}{10} - \frac {4 x e^{- 3 x} \sin {\relax (x )}}{25} - \frac {3 x e^{- 3 x} \cos {\relax (x )}}{25} - \frac {9 e^{- 3 x} \sin {\relax (x )}}{250} - \frac {13 e^{- 3 x} \cos {\relax (x )}}{250} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*sin(x)/exp(3*x),x)

[Out]

-3*x**2*exp(-3*x)*sin(x)/10 - x**2*exp(-3*x)*cos(x)/10 - 4*x*exp(-3*x)*sin(x)/25 - 3*x*exp(-3*x)*cos(x)/25 - 9
*exp(-3*x)*sin(x)/250 - 13*exp(-3*x)*cos(x)/250

________________________________________________________________________________________