Optimal. Leaf size=25 \[ -\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1+e^{-x}}}{\sqrt {2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2320, 1460,
1483, 641, 65, 212} \begin {gather*} -\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {e^{-x}+1}}{\sqrt {2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 641
Rule 1460
Rule 1483
Rule 2320
Rubi steps
\begin {align*} \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx &=\text {Subst}\left (\int \frac {\sqrt {1+\frac {1}{x}}}{-1+x^2} \, dx,x,e^x\right )\\ &=\text {Subst}\left (\int \frac {\sqrt {1+\frac {1}{x}}}{\left (1-\frac {1}{x^2}\right ) x^2} \, dx,x,e^x\right )\\ &=-\text {Subst}\left (\int \frac {\sqrt {1+x}}{1-x^2} \, dx,x,e^{-x}\right )\\ &=-\text {Subst}\left (\int \frac {1}{(1-x) \sqrt {1+x}} \, dx,x,e^{-x}\right )\\ &=-\left (2 \text {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\sqrt {1+e^{-x}}\right )\right )\\ &=-\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {1+e^{-x}}}{\sqrt {2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(65\) vs. \(2(25)=50\).
time = 0.11, size = 65, normalized size = 2.60 \begin {gather*} -\frac {\sqrt {2} e^{x/2} \sqrt {1+e^{-x}} \tanh ^{-1}\left (\frac {1-e^x+e^{x/2} \sqrt {1+e^x}}{\sqrt {2}}\right )}{\sqrt {1+e^x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 4.68, size = 61, normalized size = 2.44 \begin {gather*} \text {Piecewise}\left [\left \{\left \{-\sqrt {2} \text {ArcCoth}\left [\frac {\sqrt {2} \sqrt {1+E^{-x}}}{2}\right ],E^{-x}>1\right \},\left \{-\sqrt {2} \text {ArcTanh}\left [\frac {\sqrt {2} \sqrt {1+E^{-x}}}{2}\right ],E^{-x}<1\right \},\left \{0,\text {True}\right \}\right \}\right ] \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(48\) vs.
\(2(19)=38\).
time = 0.04, size = 49, normalized size = 1.96
method | result | size |
default | \(-\frac {\sqrt {\left (1+{\mathrm e}^{x}\right ) {\mathrm e}^{-x}}\, {\mathrm e}^{x} \sqrt {2}\, \arctanh \left (\frac {\left (1+3 \,{\mathrm e}^{x}\right ) \sqrt {2}}{4 \sqrt {{\mathrm e}^{x}+{\mathrm e}^{2 x}}}\right )}{2 \sqrt {\left (1+{\mathrm e}^{x}\right ) {\mathrm e}^{x}}}\) | \(49\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 36, normalized size = 1.44 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - \sqrt {e^{\left (-x\right )} + 1}}{\sqrt {2} + \sqrt {e^{\left (-x\right )} + 1}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 34, normalized size = 1.36 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (\frac {2 \, \sqrt {2} \sqrt {e^{x} + 1} e^{\left (\frac {1}{2} \, x\right )} - 3 \, e^{x} - 1}{e^{x} - 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 2.02, size = 61, normalized size = 2.44 \begin {gather*} 2 \left (\begin {cases} - \frac {\sqrt {2} \operatorname {acoth}{\left (\frac {\sqrt {2} \sqrt {1 + e^{- x}}}{2} \right )}}{2} & \text {for}\: e^{- x} > 1 \\- \frac {\sqrt {2} \operatorname {atanh}{\left (\frac {\sqrt {2} \sqrt {1 + e^{- x}}}{2} \right )}}{2} & \text {for}\: e^{- x} < 1 \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs.
\(2 (19) = 38\).
time = 0.02, size = 91, normalized size = 3.64 \begin {gather*} -\frac {\ln \left (\frac {\sqrt {2}-1}{\sqrt {2}+1}\right )}{\sqrt {2}}+\frac {\ln \left (\frac {\left |2 \left (-\mathrm {e}^{x}+\sqrt {\left (\mathrm {e}^{x}\right )^{2}+\mathrm {e}^{x}}\right )-2 \sqrt {2}+2\right |}{\left |2 \left (-\mathrm {e}^{x}+\sqrt {\left (\mathrm {e}^{x}\right )^{2}+\mathrm {e}^{x}}\right )+2 \sqrt {2}+2\right |}\right )}{\sqrt {2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} -\int \frac {\sqrt {{\mathrm {e}}^{-x}+1}}{{\mathrm {e}}^{-x}-{\mathrm {e}}^x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________