Optimal. Leaf size=18 \[ 9+\log \left (\frac {\frac {4}{x}+x}{1+e^x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, 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 = {6873, 6857,
2320, 36, 29, 31, 1816, 266} \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 266
Rule 1816
Rule 2320
Rule 6857
Rule 6873
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+\text {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,e^x\right )\\ &=-x-\log (x)+2 \int \frac {x}{4+x^2} \, dx+\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )-\text {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.41, size = 24, normalized size = 1.33 \begin {gather*} -x-2 \tanh ^{-1}\left (1+2 e^x\right )-\log (x)+\log \left (4+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 19, normalized size = 1.06
method | result | size |
norman | \(-\ln \left (x \right )-\ln \left ({\mathrm e}^{x}+1\right )+\ln \left (x^{2}+4\right )\) | \(19\) |
risch | \(-\ln \left (x \right )-\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.32, size = 18, normalized size = 1.00 \begin {gather*} \log \left (x^{2} + 4\right ) - \log \left (x\right ) - \log \left (e^{x} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 18, normalized size = 1.00 \begin {gather*} \log \left (x^{2} + 4\right ) - \log \left (x\right ) - \log \left (e^{x} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.06, size = 15, normalized size = 0.83 \begin {gather*} - \log {\left (x \right )} + \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]
________________________________________________________________________________________
Giac [A]
time = 0.38, size = 18, normalized size = 1.00 \begin {gather*} \log \left (x^{2} + 4\right ) - \log \left (x\right ) - \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 \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________