Optimal. Leaf size=23 \[ \frac {1+e^x-\frac {e^{2+x}+x}{5+x}}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.71, antiderivative size = 42, normalized size of antiderivative = 1.83, number of steps used = 13, number of rules used = 6, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.109, Rules used = {1594, 27, 6742, 74, 2177, 2178} \begin {gather*} \frac {e^{x+2}}{5 (x+5)}+\frac {5}{(x+5) x}+\frac {\left (5-e^2\right ) e^x}{5 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 74
Rule 1594
Rule 2177
Rule 2178
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-25-10 x+e^{2+x} \left (5-3 x-x^2\right )+e^x \left (-25+15 x+9 x^2+x^3\right )}{x^2 \left (25+10 x+x^2\right )} \, dx\\ &=\int \frac {-25-10 x+e^{2+x} \left (5-3 x-x^2\right )+e^x \left (-25+15 x+9 x^2+x^3\right )}{x^2 (5+x)^2} \, dx\\ &=\int \left (-\frac {5 (5+2 x)}{x^2 (5+x)^2}+\frac {e^x \left (-5 \left (5-e^2\right )+3 \left (5-e^2\right ) x+\left (9-e^2\right ) x^2+x^3\right )}{x^2 (5+x)^2}\right ) \, dx\\ &=-\left (5 \int \frac {5+2 x}{x^2 (5+x)^2} \, dx\right )+\int \frac {e^x \left (-5 \left (5-e^2\right )+3 \left (5-e^2\right ) x+\left (9-e^2\right ) x^2+x^3\right )}{x^2 (5+x)^2} \, dx\\ &=\frac {5}{x (5+x)}+\int \left (\frac {e^x \left (-5+e^2\right )}{5 x^2}+\frac {e^x \left (5-e^2\right )}{5 x}-\frac {e^{2+x}}{5 (5+x)^2}+\frac {e^{2+x}}{5 (5+x)}\right ) \, dx\\ &=\frac {5}{x (5+x)}-\frac {1}{5} \int \frac {e^{2+x}}{(5+x)^2} \, dx+\frac {1}{5} \int \frac {e^{2+x}}{5+x} \, dx+\frac {1}{5} \left (5-e^2\right ) \int \frac {e^x}{x} \, dx+\frac {1}{5} \left (-5+e^2\right ) \int \frac {e^x}{x^2} \, dx\\ &=\frac {e^x \left (5-e^2\right )}{5 x}+\frac {e^{2+x}}{5 (5+x)}+\frac {5}{x (5+x)}+\frac {1}{5} \left (5-e^2\right ) \text {Ei}(x)+\frac {\text {Ei}(5+x)}{5 e^3}-\frac {1}{5} \int \frac {e^{2+x}}{5+x} \, dx+\frac {1}{5} \left (-5+e^2\right ) \int \frac {e^x}{x} \, dx\\ &=\frac {e^x \left (5-e^2\right )}{5 x}+\frac {e^{2+x}}{5 (5+x)}+\frac {5}{x (5+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 25, normalized size = 1.09 \begin {gather*} \frac {5-e^{2+x}+e^x (5+x)}{x (5+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 29, normalized size = 1.26 \begin {gather*} \frac {{\left ({\left (x - e^{2} + 5\right )} e^{\left (x + 2\right )} + 5 \, e^{2}\right )} e^{\left (-2\right )}}{x^{2} + 5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 26, normalized size = 1.13 \begin {gather*} \frac {x e^{x} - e^{\left (x + 2\right )} + 5 \, e^{x} + 5}{x^{2} + 5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 25, normalized size = 1.09
method | result | size |
norman | \(\frac {5+\left (5-{\mathrm e}^{2}\right ) {\mathrm e}^{x}+{\mathrm e}^{x} x}{\left (5+x \right ) x}\) | \(25\) |
risch | \(\frac {5}{\left (5+x \right ) x}-\frac {\left ({\mathrm e}^{2}-x -5\right ) {\mathrm e}^{x}}{\left (5+x \right ) x}\) | \(31\) |
default | \(-\frac {1}{5+x}+\frac {1}{x}+\frac {{\mathrm e}^{x}}{x}+5 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{25 \left (5+x \right )}-\frac {7 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -x -5\right )}{125}-\frac {{\mathrm e}^{x}}{25 x}-\frac {3 \expIntegralEi \left (1, -x \right )}{125}\right )-3 \,{\mathrm e}^{2} \left (\frac {{\mathrm e}^{x}}{25+5 x}+\frac {6 \,{\mathrm e}^{-5} \expIntegralEi \left (1, -x -5\right )}{25}-\frac {\expIntegralEi \left (1, -x \right )}{25}\right )-{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{x}}{5+x}-{\mathrm e}^{-5} \expIntegralEi \left (1, -x -5\right )\right )\) | \(114\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 42, normalized size = 1.83 \begin {gather*} \frac {{\left (x - e^{2} + 5\right )} e^{x}}{x^{2} + 5 \, x} + \frac {2 \, x + 5}{x^{2} + 5 \, x} - \frac {2}{x + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.14, size = 24, normalized size = 1.04 \begin {gather*} \frac {x\,{\mathrm {e}}^x-{\mathrm {e}}^x\,\left ({\mathrm {e}}^2-5\right )+5}{x^2+5\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.18, size = 24, normalized size = 1.04 \begin {gather*} \frac {\left (x - e^{2} + 5\right ) e^{x}}{x^{2} + 5 x} + \frac {5}{x^{2} + 5 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________