Optimal. Leaf size=21 \[ \frac {e^x-x \left (e^4+x\right )}{x (3+x)} \]
________________________________________________________________________________________
Rubi [A] time = 0.45, antiderivative size = 36, normalized size of antiderivative = 1.71, number of steps used = 13, number of rules used = 6, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {6, 1594, 27, 6742, 2177, 2178} \begin {gather*} -\frac {e^x}{3 (x+3)}+\frac {3-e^4}{x+3}+\frac {e^x}{3 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 27
Rule 1594
Rule 2177
Rule 2178
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\left (-3+e^4\right ) x^2+e^x \left (-3+x+x^2\right )}{9 x^2+6 x^3+x^4} \, dx\\ &=\int \frac {\left (-3+e^4\right ) x^2+e^x \left (-3+x+x^2\right )}{x^2 \left (9+6 x+x^2\right )} \, dx\\ &=\int \frac {\left (-3+e^4\right ) x^2+e^x \left (-3+x+x^2\right )}{x^2 (3+x)^2} \, dx\\ &=\int \left (\frac {-3+e^4}{(3+x)^2}+\frac {e^x \left (-3+x+x^2\right )}{x^2 (3+x)^2}\right ) \, dx\\ &=\frac {3-e^4}{3+x}+\int \frac {e^x \left (-3+x+x^2\right )}{x^2 (3+x)^2} \, dx\\ &=\frac {3-e^4}{3+x}+\int \left (-\frac {e^x}{3 x^2}+\frac {e^x}{3 x}+\frac {e^x}{3 (3+x)^2}-\frac {e^x}{3 (3+x)}\right ) \, dx\\ &=\frac {3-e^4}{3+x}-\frac {1}{3} \int \frac {e^x}{x^2} \, dx+\frac {1}{3} \int \frac {e^x}{x} \, dx+\frac {1}{3} \int \frac {e^x}{(3+x)^2} \, dx-\frac {1}{3} \int \frac {e^x}{3+x} \, dx\\ &=\frac {e^x}{3 x}-\frac {e^x}{3 (3+x)}+\frac {3-e^4}{3+x}+\frac {\text {Ei}(x)}{3}-\frac {\text {Ei}(3+x)}{3 e^3}-\frac {1}{3} \int \frac {e^x}{x} \, dx+\frac {1}{3} \int \frac {e^x}{3+x} \, dx\\ &=\frac {e^x}{3 x}-\frac {e^x}{3 (3+x)}+\frac {3-e^4}{3+x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 23, normalized size = 1.10 \begin {gather*} \frac {e^x+3 x-e^4 x}{3 x+x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 23, normalized size = 1.10 \begin {gather*} -\frac {x e^{4} - 3 \, x - e^{x}}{x^{2} + 3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 23, normalized size = 1.10 \begin {gather*} -\frac {x e^{4} - 3 \, x - e^{x}}{x^{2} + 3 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 21, normalized size = 1.00
method | result | size |
norman | \(\frac {\left (3-{\mathrm e}^{4}\right ) x +{\mathrm e}^{x}}{\left (3+x \right ) x}\) | \(21\) |
risch | \(-\frac {{\mathrm e}^{4}}{3+x}+\frac {3}{3+x}+\frac {{\mathrm e}^{x}}{\left (3+x \right ) x}\) | \(29\) |
default | \(-\frac {{\mathrm e}^{4}}{3+x}-\frac {{\mathrm e}^{x}}{3 \left (3+x \right )}+\frac {3}{3+x}+\frac {{\mathrm e}^{x}}{3 x}\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 29, normalized size = 1.38 \begin {gather*} -\frac {e^{4}}{x + 3} + \frac {e^{x}}{x^{2} + 3 \, x} + \frac {3}{x + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.17, size = 20, normalized size = 0.95 \begin {gather*} \frac {{\mathrm {e}}^x-x\,\left ({\mathrm {e}}^4-3\right )}{x^2+3\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 17, normalized size = 0.81 \begin {gather*} \frac {e^{x}}{x^{2} + 3 x} - \frac {-3 + e^{4}}{x + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________