Optimal. Leaf size=18 \[ 9+\log \left (\frac {\frac {4}{x}+x}{1+e^x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.58, antiderivative size = 19, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 8, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {6741, 6725, 2282, 36, 29, 31, 1802, 260} \begin {gather*} \log \left (x^2+4\right )-\log \left (e^x+1\right )-\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 260
Rule 1802
Rule 2282
Rule 6725
Rule 6741
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-4+x^2+e^x \left (-4-4 x+x^2-x^3\right )}{\left (1+e^x\right ) x \left (4+x^2\right )} \, dx\\ &=\int \left (\frac {1}{1+e^x}+\frac {-4-4 x+x^2-x^3}{x \left (4+x^2\right )}\right ) \, dx\\ &=\int \frac {1}{1+e^x} \, dx+\int \frac {-4-4 x+x^2-x^3}{x \left (4+x^2\right )} \, dx\\ &=\int \left (-1-\frac {1}{x}+\frac {2 x}{4+x^2}\right ) \, dx+\operatorname {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,e^x\right )\\ &=-x-\log (x)+2 \int \frac {x}{4+x^2} \, dx+\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )-\operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,e^x\right )\\ &=-\log \left (1+e^x\right )-\log (x)+\log \left (4+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 19, normalized size = 1.06 \begin {gather*} -\log \left (1+e^x\right )-\log (x)+\log \left (4+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 18, normalized size = 1.00 \begin {gather*} \log \left (x^{2} + 4\right ) - \log \relax (x) - \log \left (e^{x} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 18, normalized size = 1.00 \begin {gather*} \log \left (x^{2} + 4\right ) - \log \relax (x) - \log \left (e^{x} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 19, normalized size = 1.06
method | result | size |
norman | \(-\ln \relax (x )-\ln \left ({\mathrm e}^{x}+1\right )+\ln \left (x^{2}+4\right )\) | \(19\) |
risch | \(-\ln \relax (x )-\ln \left ({\mathrm e}^{x}+1\right )+\ln \left (x^{2}+4\right )\) | \(19\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 18, normalized size = 1.00 \begin {gather*} \log \left (x^{2} + 4\right ) - \log \relax (x) - \log \left (e^{x} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.14, size = 18, normalized size = 1.00 \begin {gather*} \ln \left (x^2+4\right )-\ln \left ({\mathrm {e}}^x+1\right )-\ln \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 15, normalized size = 0.83 \begin {gather*} - \log {\relax (x )} + \log {\left (x^{2} + 4 \right )} - \log {\left (e^{x} + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________