Optimal. Leaf size=26 \[ 4-\frac {x \left (\frac {1}{x}+3 \left (e^x+x\right )\right )}{(1+e) (6+x)} \]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 46, normalized size of antiderivative = 1.77, number of steps used = 13, number of rules used = 9, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {6741, 27, 12, 6742, 683, 2199, 2194, 2177, 2178} \begin {gather*} -\frac {3 x}{1+e}+\frac {18 e^x}{(1+e) (x+6)}-\frac {109}{(1+e) (x+6)}-\frac {3 e^x}{1+e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 683
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {1-36 x-3 x^2+e^x \left (-18-18 x-3 x^2\right )}{36 (1+e)+12 (1+e) x+(1+e) x^2} \, dx\\ &=\int \frac {1-36 x-3 x^2+e^x \left (-18-18 x-3 x^2\right )}{(1+e) (6+x)^2} \, dx\\ &=\frac {\int \frac {1-36 x-3 x^2+e^x \left (-18-18 x-3 x^2\right )}{(6+x)^2} \, dx}{1+e}\\ &=\frac {\int \left (\frac {1-36 x-3 x^2}{(6+x)^2}-\frac {3 e^x \left (6+6 x+x^2\right )}{(6+x)^2}\right ) \, dx}{1+e}\\ &=\frac {\int \frac {1-36 x-3 x^2}{(6+x)^2} \, dx}{1+e}-\frac {3 \int \frac {e^x \left (6+6 x+x^2\right )}{(6+x)^2} \, dx}{1+e}\\ &=\frac {\int \left (-3+\frac {109}{(6+x)^2}\right ) \, dx}{1+e}-\frac {3 \int \left (e^x+\frac {6 e^x}{(6+x)^2}-\frac {6 e^x}{6+x}\right ) \, dx}{1+e}\\ &=-\frac {3 x}{1+e}-\frac {109}{(1+e) (6+x)}-\frac {3 \int e^x \, dx}{1+e}-\frac {18 \int \frac {e^x}{(6+x)^2} \, dx}{1+e}+\frac {18 \int \frac {e^x}{6+x} \, dx}{1+e}\\ &=-\frac {3 e^x}{1+e}-\frac {3 x}{1+e}-\frac {109}{(1+e) (6+x)}+\frac {18 e^x}{(1+e) (6+x)}+\frac {18 \text {Ei}(6+x)}{e^6 (1+e)}-\frac {18 \int \frac {e^x}{6+x} \, dx}{1+e}\\ &=-\frac {3 e^x}{1+e}-\frac {3 x}{1+e}-\frac {109}{(1+e) (6+x)}+\frac {18 e^x}{(1+e) (6+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 27, normalized size = 1.04 \begin {gather*} -\frac {109+3 \left (6+e^x\right ) x+3 x^2}{(1+e) (6+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 28, normalized size = 1.08 \begin {gather*} -\frac {3 \, x^{2} + 3 \, x e^{x} + 18 \, x + 109}{{\left (x + 6\right )} e + x + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.31, size = 30, normalized size = 1.15 \begin {gather*} -\frac {3 \, x^{2} + 3 \, x e^{x} + 18 \, x + 109}{x e + x + 6 \, e + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.59, size = 38, normalized size = 1.46
method | result | size |
norman | \(\frac {-\frac {3 x^{2}}{1+{\mathrm e}}-\frac {3 x \,{\mathrm e}^{x}}{1+{\mathrm e}}-\frac {1}{1+{\mathrm e}}}{x +6}\) | \(38\) |
risch | \(-\frac {3 x}{1+{\mathrm e}}-\frac {109 \,{\mathrm e}}{\left (1+{\mathrm e}\right ) \left (x \,{\mathrm e}+6 \,{\mathrm e}+x +6\right )}-\frac {109}{\left (1+{\mathrm e}\right ) \left (x \,{\mathrm e}+6 \,{\mathrm e}+x +6\right )}-\frac {3 x \,{\mathrm e}^{x}}{\left (1+{\mathrm e}\right ) \left (x +6\right )}\) | \(71\) |
default | \(-\frac {109}{\left (1+{\mathrm e}\right ) \left (x +6\right )}-\frac {3 x}{1+{\mathrm e}}-\frac {18 \left (-\frac {{\mathrm e}^{x}}{x +6}-{\mathrm e}^{-6} \expIntegralEi \left (1, -x -6\right )\right )}{1+{\mathrm e}}-\frac {18 \,{\mathrm e}^{-6} \expIntegralEi \left (1, -x -6\right )}{1+{\mathrm e}}-\frac {3 \,{\mathrm e}^{x}}{1+{\mathrm e}}\) | \(80\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\frac {3 \, x e^{x}}{x {\left (e + 1\right )} + 6 \, e + 6} - \frac {3 \, x}{e + 1} + \frac {18 \, e^{\left (-6\right )} E_{2}\left (-x - 6\right )}{{\left (x + 6\right )} {\left (e + 1\right )}} - \frac {109}{x {\left (e + 1\right )} + 6 \, e + 6} + 18 \, \int \frac {e^{x}}{x^{2} {\left (e + 1\right )} + 12 \, x {\left (e + 1\right )} + 36 \, e + 36}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.27, size = 23, normalized size = 0.88 \begin {gather*} -\frac {x\,\left (18\,x+18\,{\mathrm {e}}^x-1\right )}{6\,\left (\mathrm {e}+1\right )\,\left (x+6\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.29, size = 44, normalized size = 1.69 \begin {gather*} - \frac {3 x}{1 + e} - \frac {3 x e^{x}}{x + e x + 6 + 6 e} - \frac {109}{x \left (1 + e\right ) + 6 + 6 e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________