Optimal. Leaf size=12 \[ \frac {x (5+x)}{5+e^x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.75, antiderivative size = 22, normalized size of antiderivative = 1.83, number
of steps used = 41, number of rules used = 14, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules
used = {6873, 6874, 2216, 2215, 2221, 2317, 2438, 2222, 2320, 36, 29, 31, 2611, 6724}
\begin {gather*} \frac {x^2}{e^x+5}+\frac {5 x}{e^x+5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 2215
Rule 2216
Rule 2221
Rule 2222
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 6724
Rule 6873
Rule 6874
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {25+10 x+e^x \left (5-3 x-x^2\right )}{\left (5+e^x\right )^2} \, dx\\ &=\int \left (\frac {5 x (5+x)}{\left (5+e^x\right )^2}-\frac {-5+3 x+x^2}{5+e^x}\right ) \, dx\\ &=5 \int \frac {x (5+x)}{\left (5+e^x\right )^2} \, dx-\int \frac {-5+3 x+x^2}{5+e^x} \, dx\\ &=5 \int \left (\frac {5 x}{\left (5+e^x\right )^2}+\frac {x^2}{\left (5+e^x\right )^2}\right ) \, dx-\int \left (-\frac {5}{5+e^x}+\frac {3 x}{5+e^x}+\frac {x^2}{5+e^x}\right ) \, dx\\ &=-\left (3 \int \frac {x}{5+e^x} \, dx\right )+5 \int \frac {1}{5+e^x} \, dx+5 \int \frac {x^2}{\left (5+e^x\right )^2} \, dx+25 \int \frac {x}{\left (5+e^x\right )^2} \, dx-\int \frac {x^2}{5+e^x} \, dx\\ &=-\frac {3 x^2}{10}-\frac {x^3}{15}+\frac {1}{5} \int \frac {e^x x^2}{5+e^x} \, dx+\frac {3}{5} \int \frac {e^x x}{5+e^x} \, dx-5 \int \frac {e^x x}{\left (5+e^x\right )^2} \, dx+5 \int \frac {x}{5+e^x} \, dx+5 \text {Subst}\left (\int \frac {1}{x (5+x)} \, dx,x,e^x\right )-\int \frac {e^x x^2}{\left (5+e^x\right )^2} \, dx+\int \frac {x^2}{5+e^x} \, dx\\ &=\frac {5 x}{5+e^x}+\frac {x^2}{5}+\frac {x^2}{5+e^x}+\frac {3}{5} x \log \left (1+\frac {e^x}{5}\right )+\frac {1}{5} x^2 \log \left (1+\frac {e^x}{5}\right )-\frac {1}{5} \int \frac {e^x x^2}{5+e^x} \, dx-\frac {2}{5} \int x \log \left (1+\frac {e^x}{5}\right ) \, dx-\frac {3}{5} \int \log \left (1+\frac {e^x}{5}\right ) \, dx-2 \int \frac {x}{5+e^x} \, dx-5 \int \frac {1}{5+e^x} \, dx-\int \frac {e^x x}{5+e^x} \, dx+\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )-\text {Subst}\left (\int \frac {1}{5+x} \, dx,x,e^x\right )\\ &=x+\frac {5 x}{5+e^x}+\frac {x^2}{5+e^x}-\frac {2}{5} x \log \left (1+\frac {e^x}{5}\right )-\log \left (5+e^x\right )+\frac {2}{5} x \text {Li}_2\left (-\frac {e^x}{5}\right )+\frac {2}{5} \int \frac {e^x x}{5+e^x} \, dx+\frac {2}{5} \int x \log \left (1+\frac {e^x}{5}\right ) \, dx-\frac {2}{5} \int \text {Li}_2\left (-\frac {e^x}{5}\right ) \, dx-\frac {3}{5} \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{5}\right )}{x} \, dx,x,e^x\right )-5 \text {Subst}\left (\int \frac {1}{x (5+x)} \, dx,x,e^x\right )+\int \log \left (1+\frac {e^x}{5}\right ) \, dx\\ &=x+\frac {5 x}{5+e^x}+\frac {x^2}{5+e^x}-\log \left (5+e^x\right )+\frac {3}{5} \text {Li}_2\left (-\frac {e^x}{5}\right )-\frac {2}{5} \int \log \left (1+\frac {e^x}{5}\right ) \, dx+\frac {2}{5} \int \text {Li}_2\left (-\frac {e^x}{5}\right ) \, dx-\frac {2}{5} \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {x}{5}\right )}{x} \, dx,x,e^x\right )-\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )+\text {Subst}\left (\int \frac {1}{5+x} \, dx,x,e^x\right )+\text {Subst}\left (\int \frac {\log \left (1+\frac {x}{5}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {5 x}{5+e^x}+\frac {x^2}{5+e^x}-\frac {2}{5} \text {Li}_2\left (-\frac {e^x}{5}\right )-\frac {2}{5} \text {Li}_3\left (-\frac {e^x}{5}\right )-\frac {2}{5} \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{5}\right )}{x} \, dx,x,e^x\right )+\frac {2}{5} \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {x}{5}\right )}{x} \, dx,x,e^x\right )\\ &=\frac {5 x}{5+e^x}+\frac {x^2}{5+e^x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 12, normalized size = 1.00 \begin {gather*} \frac {x (5+x)}{5+e^x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.62, size = 12, normalized size = 1.00
method | result | size |
risch | \(\frac {\left (5+x \right ) x}{{\mathrm e}^{x}+5}\) | \(12\) |
norman | \(\frac {x^{2}+5 x}{{\mathrm e}^{x}+5}\) | \(15\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 27 vs.
\(2 (11) = 22\).
time = 0.28, size = 27, normalized size = 2.25 \begin {gather*} x + \frac {x^{2} - x e^{x} - 5}{e^{x} + 5} + \frac {5}{e^{x} + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 14, normalized size = 1.17 \begin {gather*} \frac {x^{2} + 5 \, x}{e^{x} + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 10, normalized size = 0.83 \begin {gather*} \frac {x^{2} + 5 x}{e^{x} + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 14, normalized size = 1.17 \begin {gather*} \frac {x^{2} + 5 \, x}{e^{x} + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.51, size = 11, normalized size = 0.92 \begin {gather*} \frac {x\,\left (x+5\right )}{{\mathrm {e}}^x+5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________