Optimal. Leaf size=128 \[ \frac{x^2}{2}+\frac{1}{8} e^{2 x} x-\frac{3 e^{2 x}}{32}+\frac{1}{4} e^{2 x} x \sin ^2(x)-\frac{1}{16} e^{2 x} \sin ^2(x)+e^x x \sin (x)+\frac{1}{32} e^{2 x} \sin (2 x)-e^x x \cos (x)+e^x \cos (x)-\frac{1}{32} e^{2 x} \cos (2 x)-\frac{1}{4} e^{2 x} x \sin (x) \cos (x)+\frac{1}{16} e^{2 x} \sin (x) \cos (x) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.292078, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.667 \[ \frac{x^2}{2}+\frac{1}{8} e^{2 x} x-\frac{3 e^{2 x}}{32}+\frac{1}{4} e^{2 x} x \sin ^2(x)-\frac{1}{16} e^{2 x} \sin ^2(x)+e^x x \sin (x)+\frac{1}{32} e^{2 x} \sin (2 x)-e^x x \cos (x)+e^x \cos (x)-\frac{1}{32} e^{2 x} \cos (2 x)-\frac{1}{4} e^{2 x} x \sin (x) \cos (x)+\frac{1}{16} e^{2 x} \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In] Int[x*(1 + E^x*Sin[x])^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ \int x \left (e^{x} \sin{\left (x \right )} + 1\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(x*(1+exp(x)*sin(x))**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.188626, size = 67, normalized size = 0.52 \[ \frac{1}{8} \left (4 x^2+e^{2 x} (2 x-1)+8 e^x x \sin (x)-e^{2 x} x \cos (2 x)-8 e^x (x-1) \cos (x)-e^{2 x} (2 x-1) \sin (x) \cos (x)\right ) \]
Antiderivative was successfully verified.
[In] Integrate[x*(1 + E^x*Sin[x])^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.009, size = 63, normalized size = 0.5 \[{\frac{{x}^{2}}{2}}+2\, \left ( -x/2+1/2 \right ){{\rm e}^{x}}\cos \left ( x \right ) +{{\rm e}^{x}}x\sin \left ( x \right ) +{\frac{ \left ({{\rm e}^{x}} \right ) ^{2}x}{4}}-{\frac{ \left ({{\rm e}^{x}} \right ) ^{2}}{8}}-{\frac{x{{\rm e}^{2\,x}}\cos \left ( 2\,x \right ) }{8}}+{\frac{{{\rm e}^{2\,x}}\sin \left ( 2\,x \right ) }{2} \left ( -{\frac{x}{4}}+{\frac{1}{8}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(x*(1+exp(x)*sin(x))^2,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.3714, size = 78, normalized size = 0.61 \[ -\frac{1}{8} \, x \cos \left (2 \, x\right ) e^{\left (2 \, x\right )} -{\left (x - 1\right )} \cos \left (x\right ) e^{x} - \frac{1}{16} \,{\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} \sin \left (2 \, x\right ) + x e^{x} \sin \left (x\right ) + \frac{1}{2} \, x^{2} + \frac{1}{8} \,{\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((e^x*sin(x) + 1)^2*x,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.233844, size = 74, normalized size = 0.58 \[ -{\left (x - 1\right )} \cos \left (x\right ) e^{x} + \frac{1}{2} \, x^{2} - \frac{1}{8} \,{\left (2 \, x \cos \left (x\right )^{2} - 3 \, x + 1\right )} e^{\left (2 \, x\right )} - \frac{1}{8} \,{\left ({\left (2 \, x - 1\right )} \cos \left (x\right ) e^{\left (2 \, x\right )} - 8 \, x e^{x}\right )} \sin \left (x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((e^x*sin(x) + 1)^2*x,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 8.01265, size = 109, normalized size = 0.85 \[ \frac{x^{2}}{2} + \frac{3 x e^{2 x} \sin ^{2}{\left (x \right )}}{8} - \frac{x e^{2 x} \sin{\left (x \right )} \cos{\left (x \right )}}{4} + \frac{x e^{2 x} \cos ^{2}{\left (x \right )}}{8} + x e^{x} \sin{\left (x \right )} - x e^{x} \cos{\left (x \right )} - \frac{e^{2 x} \sin ^{2}{\left (x \right )}}{8} + \frac{e^{2 x} \sin{\left (x \right )} \cos{\left (x \right )}}{8} - \frac{e^{2 x} \cos ^{2}{\left (x \right )}}{8} + e^{x} \cos{\left (x \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*(1+exp(x)*sin(x))**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.202307, size = 77, normalized size = 0.6 \[ \frac{1}{2} \, x^{2} - \frac{1}{16} \,{\left (2 \, x \cos \left (2 \, x\right ) +{\left (2 \, x - 1\right )} \sin \left (2 \, x\right )\right )} e^{\left (2 \, x\right )} + \frac{1}{8} \,{\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} -{\left ({\left (x - 1\right )} \cos \left (x\right ) - x \sin \left (x\right )\right )} e^{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((e^x*sin(x) + 1)^2*x,x, algorithm="giac")
[Out]