Optimal. Leaf size=36 \[ -2-\frac {1}{2} e^{\frac {x-x^2}{3+x}}-\frac {3 e^{2 x}}{4 x}+x^2 \]
________________________________________________________________________________________
Rubi [A] time = 1.11, antiderivative size = 34, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 6, integrand size = 88, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.068, Rules used = {1594, 27, 12, 6688, 2197, 6706} \begin {gather*} x^2-\frac {1}{2} e^{\frac {(1-x) x}{x+3}}-\frac {3 e^{2 x}}{4 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 1594
Rule 2197
Rule 6688
Rule 6706
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {72 x^3+48 x^4+8 x^5+e^{2 x} \left (27-36 x-33 x^2-6 x^3\right )+e^{\frac {x-x^2}{3+x}} \left (-6 x^2+12 x^3+2 x^4\right )}{x^2 \left (36+24 x+4 x^2\right )} \, dx\\ &=\int \frac {72 x^3+48 x^4+8 x^5+e^{2 x} \left (27-36 x-33 x^2-6 x^3\right )+e^{\frac {x-x^2}{3+x}} \left (-6 x^2+12 x^3+2 x^4\right )}{4 x^2 (3+x)^2} \, dx\\ &=\frac {1}{4} \int \frac {72 x^3+48 x^4+8 x^5+e^{2 x} \left (27-36 x-33 x^2-6 x^3\right )+e^{\frac {x-x^2}{3+x}} \left (-6 x^2+12 x^3+2 x^4\right )}{x^2 (3+x)^2} \, dx\\ &=\frac {1}{4} \int \left (8 x-\frac {3 e^{2 x} (-1+2 x)}{x^2}+\frac {2 e^{-\frac {(-1+x) x}{3+x}} \left (-3+6 x+x^2\right )}{(3+x)^2}\right ) \, dx\\ &=x^2+\frac {1}{2} \int \frac {e^{-\frac {(-1+x) x}{3+x}} \left (-3+6 x+x^2\right )}{(3+x)^2} \, dx-\frac {3}{4} \int \frac {e^{2 x} (-1+2 x)}{x^2} \, dx\\ &=-\frac {1}{2} e^{\frac {(1-x) x}{3+x}}-\frac {3 e^{2 x}}{4 x}+x^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 34, normalized size = 0.94 \begin {gather*} -\frac {1}{2} e^{4-x-\frac {12}{3+x}}-\frac {3 e^{2 x}}{4 x}+x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 35, normalized size = 0.97 \begin {gather*} \frac {4 \, x^{3} - 2 \, x e^{\left (-\frac {x^{2} - x}{x + 3}\right )} - 3 \, e^{\left (2 \, x\right )}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 35, normalized size = 0.97 \begin {gather*} \frac {4 \, x^{3} - 2 \, x e^{\left (-\frac {x^{2} - x}{x + 3}\right )} - 3 \, e^{\left (2 \, x\right )}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 28, normalized size = 0.78
method | result | size |
risch | \(x^{2}-\frac {3 \,{\mathrm e}^{2 x}}{4 x}-\frac {{\mathrm e}^{-\frac {x \left (x -1\right )}{3+x}}}{2}\) | \(28\) |
norman | \(\frac {x^{4}+3 x^{3}-\frac {3 x \,{\mathrm e}^{\frac {-x^{2}+x}{3+x}}}{2}-\frac {3 x \,{\mathrm e}^{2 x}}{4}-\frac {x^{2} {\mathrm e}^{\frac {-x^{2}+x}{3+x}}}{2}-\frac {9 \,{\mathrm e}^{2 x}}{4}}{\left (3+x \right ) x}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.72, size = 33, normalized size = 0.92 \begin {gather*} x^{2} - \frac {{\left (2 \, x e^{\left (-\frac {12}{x + 3} + 4\right )} + 3 \, e^{\left (3 \, x\right )}\right )} e^{\left (-x\right )}}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.04, size = 34, normalized size = 0.94 \begin {gather*} x^2-\frac {{\mathrm {e}}^{\frac {x}{x+3}}\,{\mathrm {e}}^{-\frac {x^2}{x+3}}}{2}-\frac {3\,{\mathrm {e}}^{2\,x}}{4\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.31, size = 24, normalized size = 0.67 \begin {gather*} x^{2} - \frac {e^{\frac {- x^{2} + x}{x + 3}}}{2} - \frac {3 e^{2 x}}{4 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________