Optimal. Leaf size=21 \[ x+\frac {3+\frac {e^x}{x}+\log (x)}{8+2 x} \]
________________________________________________________________________________________
Rubi [B] time = 0.73, antiderivative size = 51, normalized size of antiderivative = 2.43, number of steps used = 21, number of rules used = 10, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {1594, 27, 12, 6742, 44, 43, 2177, 2178, 2314, 31} \begin {gather*} x-\frac {e^x}{8 (x+4)}+\frac {3}{2 (x+4)}+\frac {e^x}{8 x}-\frac {x \log (x)}{8 (x+4)}+\frac {\log (x)}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 31
Rule 43
Rule 44
Rule 1594
Rule 2177
Rule 2178
Rule 2314
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4 x+30 x^2+16 x^3+2 x^4+e^x \left (-4+2 x+x^2\right )-x^2 \log (x)}{x^2 \left (32+16 x+2 x^2\right )} \, dx\\ &=\int \frac {4 x+30 x^2+16 x^3+2 x^4+e^x \left (-4+2 x+x^2\right )-x^2 \log (x)}{2 x^2 (4+x)^2} \, dx\\ &=\frac {1}{2} \int \frac {4 x+30 x^2+16 x^3+2 x^4+e^x \left (-4+2 x+x^2\right )-x^2 \log (x)}{x^2 (4+x)^2} \, dx\\ &=\frac {1}{2} \int \left (\frac {30}{(4+x)^2}+\frac {4}{x (4+x)^2}+\frac {16 x}{(4+x)^2}+\frac {2 x^2}{(4+x)^2}+\frac {e^x \left (-4+2 x+x^2\right )}{x^2 (4+x)^2}-\frac {\log (x)}{(4+x)^2}\right ) \, dx\\ &=-\frac {15}{4+x}+\frac {1}{2} \int \frac {e^x \left (-4+2 x+x^2\right )}{x^2 (4+x)^2} \, dx-\frac {1}{2} \int \frac {\log (x)}{(4+x)^2} \, dx+2 \int \frac {1}{x (4+x)^2} \, dx+8 \int \frac {x}{(4+x)^2} \, dx+\int \frac {x^2}{(4+x)^2} \, dx\\ &=-\frac {15}{4+x}-\frac {x \log (x)}{8 (4+x)}+\frac {1}{8} \int \frac {1}{4+x} \, dx+\frac {1}{2} \int \left (-\frac {e^x}{4 x^2}+\frac {e^x}{4 x}+\frac {e^x}{4 (4+x)^2}-\frac {e^x}{4 (4+x)}\right ) \, dx+2 \int \left (\frac {1}{16 x}-\frac {1}{4 (4+x)^2}-\frac {1}{16 (4+x)}\right ) \, dx+8 \int \left (-\frac {4}{(4+x)^2}+\frac {1}{4+x}\right ) \, dx+\int \left (1+\frac {16}{(4+x)^2}-\frac {8}{4+x}\right ) \, dx\\ &=x+\frac {3}{2 (4+x)}+\frac {\log (x)}{8}-\frac {x \log (x)}{8 (4+x)}-\frac {1}{8} \int \frac {e^x}{x^2} \, dx+\frac {1}{8} \int \frac {e^x}{x} \, dx+\frac {1}{8} \int \frac {e^x}{(4+x)^2} \, dx-\frac {1}{8} \int \frac {e^x}{4+x} \, dx\\ &=\frac {e^x}{8 x}+x+\frac {3}{2 (4+x)}-\frac {e^x}{8 (4+x)}+\frac {\text {Ei}(x)}{8}-\frac {\text {Ei}(4+x)}{8 e^4}+\frac {\log (x)}{8}-\frac {x \log (x)}{8 (4+x)}-\frac {1}{8} \int \frac {e^x}{x} \, dx+\frac {1}{8} \int \frac {e^x}{4+x} \, dx\\ &=\frac {e^x}{8 x}+x+\frac {3}{2 (4+x)}-\frac {e^x}{8 (4+x)}+\frac {\log (x)}{8}-\frac {x \log (x)}{8 (4+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 32, normalized size = 1.52 \begin {gather*} \frac {e^x+x \left (3+8 x+2 x^2\right )+x \log (x)}{2 x (4+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 31, normalized size = 1.48 \begin {gather*} \frac {2 \, x^{3} + 8 \, x^{2} + x \log \relax (x) + 3 \, x + e^{x}}{2 \, {\left (x^{2} + 4 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 31, normalized size = 1.48 \begin {gather*} \frac {2 \, x^{3} + 8 \, x^{2} + x \log \relax (x) + 3 \, x + e^{x}}{2 \, {\left (x^{2} + 4 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 26, normalized size = 1.24
method | result | size |
norman | \(\frac {x^{3}-\frac {29 x}{2}+\frac {x \ln \relax (x )}{2}+\frac {{\mathrm e}^{x}}{2}}{\left (4+x \right ) x}\) | \(26\) |
risch | \(\frac {\ln \relax (x )}{2 x +8}+\frac {2 x^{3}+8 x^{2}+3 x +{\mathrm e}^{x}}{2 \left (4+x \right ) x}\) | \(37\) |
default | \(-\frac {{\mathrm e}^{x}}{8 \left (4+x \right )}+\frac {{\mathrm e}^{x}}{8 x}-\frac {\ln \relax (x ) x}{8 \left (4+x \right )}+x +\frac {\ln \relax (x )}{8}+\frac {3}{2 \left (4+x \right )}\) | \(40\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.54, size = 27, normalized size = 1.29 \begin {gather*} x + \frac {x \log \relax (x) + e^{x}}{2 \, {\left (x^{2} + 4 \, x\right )}} + \frac {3}{2 \, {\left (x + 4\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.66, size = 24, normalized size = 1.14 \begin {gather*} x+\frac {\frac {{\mathrm {e}}^x}{2}+x\,\left (\frac {\ln \relax (x)}{2}+\frac {3}{2}\right )}{x\,\left (x+4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.34, size = 27, normalized size = 1.29 \begin {gather*} x + \frac {e^{x}}{2 x^{2} + 8 x} + \frac {\log {\relax (x )}}{2 x + 8} + \frac {3}{2 x + 8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________