Optimal. Leaf size=28 \[ 2-\frac {e \left (2+e^x\right )}{x}+\frac {5 x}{-3+x}-\frac {3 (1+x)}{2} \]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 31, normalized size of antiderivative = 1.11, number of steps used = 8, number of rules used = 6, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {1594, 27, 12, 6688, 2197, 683} \begin {gather*} -\frac {3 x}{2}-\frac {15}{3-x}-\frac {e^{x+1}}{x}-\frac {2 e}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 683
Rule 1594
Rule 2197
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-57 x^2+18 x^3-3 x^4+e \left (36-24 x+4 x^2\right )+e^{1+x} \left (18-30 x+14 x^2-2 x^3\right )}{x^2 \left (18-12 x+2 x^2\right )} \, dx\\ &=\int \frac {-57 x^2+18 x^3-3 x^4+e \left (36-24 x+4 x^2\right )+e^{1+x} \left (18-30 x+14 x^2-2 x^3\right )}{2 (-3+x)^2 x^2} \, dx\\ &=\frac {1}{2} \int \frac {-57 x^2+18 x^3-3 x^4+e \left (36-24 x+4 x^2\right )+e^{1+x} \left (18-30 x+14 x^2-2 x^3\right )}{(-3+x)^2 x^2} \, dx\\ &=\frac {1}{2} \int \left (\frac {4 e}{x^2}-\frac {2 e^{1+x} (-1+x)}{x^2}-\frac {3 \left (19-6 x+x^2\right )}{(-3+x)^2}\right ) \, dx\\ &=-\frac {2 e}{x}-\frac {3}{2} \int \frac {19-6 x+x^2}{(-3+x)^2} \, dx-\int \frac {e^{1+x} (-1+x)}{x^2} \, dx\\ &=-\frac {2 e}{x}-\frac {e^{1+x}}{x}-\frac {3}{2} \int \left (1+\frac {10}{(-3+x)^2}\right ) \, dx\\ &=-\frac {15}{3-x}-\frac {2 e}{x}-\frac {e^{1+x}}{x}-\frac {3 x}{2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 29, normalized size = 1.04 \begin {gather*} \frac {15}{-3+x}-\frac {2 e}{x}-\frac {e^{1+x}}{x}-\frac {3 x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 41, normalized size = 1.46 \begin {gather*} -\frac {3 \, x^{3} - 9 \, x^{2} + 4 \, {\left (x - 3\right )} e + 2 \, {\left (x - 3\right )} e^{\left (x + 1\right )} - 30 \, x}{2 \, {\left (x^{2} - 3 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 47, normalized size = 1.68 \begin {gather*} -\frac {3 \, x^{3} - 9 \, x^{2} + 4 \, x e + 2 \, x e^{\left (x + 1\right )} - 30 \, x - 12 \, e - 6 \, e^{\left (x + 1\right )}}{2 \, {\left (x^{2} - 3 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 37, normalized size = 1.32
method | result | size |
risch | \(-\frac {3 x}{2}+\frac {\frac {\left (30-4 \,{\mathrm e}\right ) x}{2}+6 \,{\mathrm e}}{x \left (x -3\right )}-\frac {{\mathrm e}^{x +1}}{x}\) | \(37\) |
norman | \(\frac {\left (\frac {57}{2}-2 \,{\mathrm e}\right ) x -\frac {3 x^{3}}{2}+3 \,{\mathrm e} \,{\mathrm e}^{x}-x \,{\mathrm e} \,{\mathrm e}^{x}+6 \,{\mathrm e}}{x \left (x -3\right )}\) | \(41\) |
default | \(\frac {15}{x -3}-\frac {3 x}{2}-\frac {2 \,{\mathrm e}}{x}+9 \,{\mathrm e} \left (-\frac {5 \expIntegralEi \left (1, -x \right )}{27}-\frac {{\mathrm e}^{x}}{9 x}-\frac {{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )}{27}-\frac {{\mathrm e}^{x}}{9 \left (x -3\right )}\right )-15 \,{\mathrm e} \left (-\frac {\expIntegralEi \left (1, -x \right )}{9}-\frac {2 \,{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )}{9}-\frac {{\mathrm e}^{x}}{3 \left (x -3\right )}\right )+7 \,{\mathrm e} \left (-\frac {{\mathrm e}^{x}}{x -3}-{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )\right )-{\mathrm e} \left (-4 \,{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )-\frac {3 \,{\mathrm e}^{x}}{x -3}\right )\) | \(140\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 80, normalized size = 2.86 \begin {gather*} -\frac {2}{3} \, {\left (\frac {3 \, {\left (2 \, x - 3\right )}}{x^{2} - 3 \, x} + 2 \, \log \left (x - 3\right ) - 2 \, \log \relax (x)\right )} e + \frac {4}{3} \, {\left (\frac {3}{x - 3} + \log \left (x - 3\right ) - \log \relax (x)\right )} e - \frac {3}{2} \, x - \frac {2 \, e}{x - 3} - \frac {e^{\left (x + 1\right )}}{x} + \frac {15}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.17, size = 25, normalized size = 0.89 \begin {gather*} \frac {15}{x-3}-\frac {3\,x}{2}-\frac {{\mathrm {e}}^{x+1}+2\,\mathrm {e}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.34, size = 34, normalized size = 1.21 \begin {gather*} - \frac {3 x}{2} - \frac {x \left (-15 + 2 e\right ) - 6 e}{x^{2} - 3 x} - \frac {e e^{x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________