Optimal. Leaf size=75 \[ -\frac {13}{250} 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 {9}{250} e^{-3 x} \sin (x)-\frac {4}{25} e^{-3 x} x \sin (x)-\frac {3}{10} e^{-3 x} x^2 \sin (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, 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 = {4517, 4553,
14, 4518, 4554} \begin {gather*} -\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) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 4517
Rule 4518
Rule 4553
Rule 4554
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.03, size = 38, normalized size = 0.51 \begin {gather*} \frac {1}{250} e^{-3 x} \left (-\left (\left (13+30 x+25 x^2\right ) \cos (x)\right )-\left (9+40 x+75 x^2\right ) \sin (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, 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 \left (x \right )+\left (-\frac {3}{10} x^{2}-\frac {4}{25} x -\frac {9}{250}\right ) {\mathrm e}^{-3 x} \sin \left (x \right )\) | \(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]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.01, size = 33, normalized size = 0.44 \begin {gather*} -\frac {1}{250} \, {\left ({\left (25 \, x^{2} + 30 \, x + 13\right )} \cos \left (x\right ) + {\left (75 \, x^{2} + 40 \, x + 9\right )} \sin \left (x\right )\right )} e^{\left (-3 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.75, size = 37, normalized size = 0.49 \begin {gather*} -\frac {1}{250} \, {\left (25 \, x^{2} + 30 \, x + 13\right )} \cos \left (x\right ) e^{\left (-3 \, x\right )} - \frac {1}{250} \, {\left (75 \, x^{2} + 40 \, x + 9\right )} e^{\left (-3 \, x\right )} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.42, size = 80, normalized size = 1.07 \begin {gather*} - \frac {3 x^{2} e^{- 3 x} \sin {\left (x \right )}}{10} - \frac {x^{2} e^{- 3 x} \cos {\left (x \right )}}{10} - \frac {4 x e^{- 3 x} \sin {\left (x \right )}}{25} - \frac {3 x e^{- 3 x} \cos {\left (x \right )}}{25} - \frac {9 e^{- 3 x} \sin {\left (x \right )}}{250} - \frac {13 e^{- 3 x} \cos {\left (x \right )}}{250} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.55, size = 33, normalized size = 0.44 \begin {gather*} -\frac {1}{250} \, {\left ({\left (25 \, x^{2} + 30 \, x + 13\right )} \cos \left (x\right ) + {\left (75 \, x^{2} + 40 \, x + 9\right )} \sin \left (x\right )\right )} e^{\left (-3 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 39, normalized size = 0.52 \begin {gather*} -\frac {{\mathrm {e}}^{-3\,x}\,\left (13\,\cos \left (x\right )+9\,\sin \left (x\right )+25\,x^2\,\cos \left (x\right )+75\,x^2\,\sin \left (x\right )+30\,x\,\cos \left (x\right )+40\,x\,\sin \left (x\right )\right )}{250} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________