Optimal. Leaf size=44 \[ \frac {1}{2} e^{-x} \left (-\left (\left (-6+x^2 (6+x (4+x))\right ) \cos (x)\right )+\left (6+x \left (12+6 x-x^3\right )\right ) \sin (x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(93\) vs. \(2(44)=88\).
time = 0.42, antiderivative size = 93, normalized size of antiderivative = 2.11, number of steps
used = 53, 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 {1}{2} e^{-x} x^4 \sin (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-2 e^{-x} x^3 \cos (x)+3 e^{-x} x^2 \sin (x)-3 e^{-x} x^2 \cos (x)+6 e^{-x} x \sin (x)+3 e^{-x} \sin (x)+3 e^{-x} \cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 4517
Rule 4518
Rule 4553
Rule 4554
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)-4 \int x^3 \left (-\frac {1}{2} e^{-x} \cos (x)-\frac {1}{2} e^{-x} \sin (x)\right ) \, dx\\ &=-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)-4 \int \left (-\frac {1}{2} e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^3 \sin (x)\right ) \, dx\\ &=-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \int e^{-x} x^3 \cos (x) \, dx+2 \int e^{-x} x^3 \sin (x) \, dx\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)-6 \int x^2 \left (-\frac {1}{2} e^{-x} \cos (x)-\frac {1}{2} e^{-x} \sin (x)\right ) \, dx-6 \int x^2 \left (-\frac {1}{2} e^{-x} \cos (x)+\frac {1}{2} e^{-x} \sin (x)\right ) \, dx\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)-6 \int \left (-\frac {1}{2} e^{-x} x^2 \cos (x)-\frac {1}{2} e^{-x} x^2 \sin (x)\right ) \, dx-6 \int \left (-\frac {1}{2} e^{-x} x^2 \cos (x)+\frac {1}{2} e^{-x} x^2 \sin (x)\right ) \, dx\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (3 \int e^{-x} x^2 \cos (x) \, dx\right )\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (-\frac {3}{2} e^{-x} x^2 \cos (x)+\frac {3}{2} e^{-x} x^2 \sin (x)-6 \int x \left (-\frac {1}{2} e^{-x} \cos (x)+\frac {1}{2} e^{-x} \sin (x)\right ) \, dx\right )\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (-\frac {3}{2} e^{-x} x^2 \cos (x)+\frac {3}{2} e^{-x} x^2 \sin (x)-6 \int \left (-\frac {1}{2} e^{-x} x \cos (x)+\frac {1}{2} e^{-x} x \sin (x)\right ) \, dx\right )\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (-\frac {3}{2} e^{-x} x^2 \cos (x)+\frac {3}{2} e^{-x} x^2 \sin (x)+3 \int e^{-x} x \cos (x) \, dx-3 \int e^{-x} x \sin (x) \, dx\right )\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (-\frac {3}{2} e^{-x} x^2 \cos (x)+3 e^{-x} x \sin (x)+\frac {3}{2} e^{-x} x^2 \sin (x)+3 \int \left (-\frac {1}{2} e^{-x} \cos (x)-\frac {1}{2} e^{-x} \sin (x)\right ) \, dx-3 \int \left (-\frac {1}{2} e^{-x} \cos (x)+\frac {1}{2} e^{-x} \sin (x)\right ) \, dx\right )\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (-\frac {3}{2} e^{-x} x^2 \cos (x)+3 e^{-x} x \sin (x)+\frac {3}{2} e^{-x} x^2 \sin (x)-2 \left (\frac {3}{2} \int e^{-x} \sin (x) \, dx\right )\right )\\ &=-2 e^{-x} x^3 \cos (x)-\frac {1}{2} e^{-x} x^4 \cos (x)-\frac {1}{2} e^{-x} x^4 \sin (x)+2 \left (-\frac {3}{2} e^{-x} x^2 \cos (x)+3 e^{-x} x \sin (x)+\frac {3}{2} e^{-x} x^2 \sin (x)-2 \left (-\frac {3}{4} e^{-x} \cos (x)-\frac {3}{4} e^{-x} \sin (x)\right )\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 47, normalized size = 1.07 \begin {gather*} \frac {1}{2} e^{-x} \left (-\left (\left (-6+6 x^2+4 x^3+x^4\right ) \cos (x)\right )+\left (6+12 x+6 x^2-x^4\right ) \sin (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 48, normalized size = 1.09
method | result | size |
parallelrisch | \(-\frac {\left (\left (x^{4}+4 x^{3}+6 x^{2}-6\right ) \cos \left (x \right )+\sin \left (x \right ) \left (x^{4}-6 x^{2}-12 x -6\right )\right ) {\mathrm e}^{-x}}{2}\) | \(42\) |
default | \(\left (-\frac {1}{2} x^{4}-2 x^{3}-3 x^{2}+3\right ) {\mathrm e}^{-x} \cos \left (x \right )+\left (-\frac {1}{2} x^{4}+3 x^{2}+6 x +3\right ) {\mathrm e}^{-x} \sin \left (x \right )\) | \(48\) |
risch | \(\left (-\frac {1}{4}+\frac {i}{4}\right ) \left (x^{4}+2 i x^{3}+2 x^{3}+6 i x^{2}+6 i x -6 x -6\right ) {\mathrm e}^{\left (-1+i\right ) x}+\left (-\frac {1}{4}-\frac {i}{4}\right ) \left (x^{4}-2 i x^{3}+2 x^{3}-6 i x^{2}-6 i x -6 x -6\right ) {\mathrm e}^{\left (-1-i\right ) x}\) | \(80\) |
norman | \(\frac {-3 x^{2} {\mathrm e}^{-x}-2 x^{3} {\mathrm e}^{-x}-\frac {x^{4} {\mathrm e}^{-x}}{2}+6 \,{\mathrm e}^{-x} \tan \left (\frac {x}{2}\right )-3 \,{\mathrm e}^{-x} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+12 x \,{\mathrm e}^{-x} \tan \left (\frac {x}{2}\right )+6 x^{2} {\mathrm e}^{-x} \tan \left (\frac {x}{2}\right )+3 x^{2} {\mathrm e}^{-x} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 x^{3} {\mathrm e}^{-x} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-x^{4} {\mathrm e}^{-x} \tan \left (\frac {x}{2}\right )+\frac {x^{4} {\mathrm e}^{-x} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}+3 \,{\mathrm e}^{-x}}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.36, size = 41, normalized size = 0.93 \begin {gather*} -\frac {1}{2} \, {\left ({\left (x^{4} + 4 \, x^{3} + 6 \, x^{2} - 6\right )} \cos \left (x\right ) + {\left (x^{4} - 6 \, x^{2} - 12 \, x - 6\right )} \sin \left (x\right )\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.58, size = 45, normalized size = 1.02 \begin {gather*} -\frac {1}{2} \, {\left (x^{4} + 4 \, x^{3} + 6 \, x^{2} - 6\right )} \cos \left (x\right ) e^{\left (-x\right )} - \frac {1}{2} \, {\left (x^{4} - 6 \, x^{2} - 12 \, x - 6\right )} e^{\left (-x\right )} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 85 vs.
\(2 (36) = 72\).
time = 1.19, size = 85, normalized size = 1.93 \begin {gather*} - \frac {x^{4} e^{- x} \sin {\left (x \right )}}{2} - \frac {x^{4} e^{- x} \cos {\left (x \right )}}{2} - 2 x^{3} e^{- x} \cos {\left (x \right )} + 3 x^{2} e^{- x} \sin {\left (x \right )} - 3 x^{2} e^{- x} \cos {\left (x \right )} + 6 x e^{- x} \sin {\left (x \right )} + 3 e^{- x} \sin {\left (x \right )} + 3 e^{- x} \cos {\left (x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 41, normalized size = 0.93 \begin {gather*} -\frac {1}{2} \, {\left ({\left (x^{4} + 4 \, x^{3} + 6 \, x^{2} - 6\right )} \cos \left (x\right ) + {\left (x^{4} - 6 \, x^{2} - 12 \, x - 6\right )} \sin \left (x\right )\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.26, size = 55, normalized size = 1.25 \begin {gather*} \frac {{\mathrm {e}}^{-x}\,\left (6\,\cos \left (x\right )+6\,\sin \left (x\right )-6\,x^2\,\cos \left (x\right )-4\,x^3\,\cos \left (x\right )-x^4\,\cos \left (x\right )+6\,x^2\,\sin \left (x\right )-x^4\,\sin \left (x\right )+12\,x\,\sin \left (x\right )\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 97, normalized size = 2.20 \begin {gather*} \left (-x^{4}-4 x^{3}-12 x^{2}-24 x -24\right ) \cos \left (x \right )-\left (x^{4}-4 x^{3}+12 x^{2}+48 x +48\right ) \sin \left (x \right )+24 x \,{\mathrm e}^{-x} \sin \left (x \right )+\left (3 x^{4}-12 x^{3}+12 x \right ) {\mathrm e}^{-x} \cos \left (x \right )+\left (3 x^{4}-12 x^{3}+12 x \right ) {\mathrm e}^{-x} \sin \left (x \right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________