Optimal. Leaf size=45 \[ \frac {3 \text {ArcTan}(\sinh (x))}{2 a}-\frac {2 \tanh (x)}{a}+\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3903, 3872,
3852, 8, 3853, 3855} \begin {gather*} \frac {3 \text {ArcTan}(\sinh (x))}{2 a}-\frac {2 \tanh (x)}{a}-\frac {\tanh (x) \text {sech}^2(x)}{a \text {sech}(x)+a}+\frac {3 \tanh (x) \text {sech}(x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3853
Rule 3855
Rule 3872
Rule 3903
Rubi steps
\begin {align*} \int \frac {\text {sech}^4(x)}{a+a \text {sech}(x)} \, dx &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}-\frac {\int \text {sech}^2(x) (2 a-3 a \text {sech}(x)) \, dx}{a^2}\\ &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}-\frac {2 \int \text {sech}^2(x) \, dx}{a}+\frac {3 \int \text {sech}^3(x) \, dx}{a}\\ &=\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}-\frac {(2 i) \text {Subst}(\int 1 \, dx,x,-i \tanh (x))}{a}+\frac {3 \int \text {sech}(x) \, dx}{2 a}\\ &=\frac {3 \tan ^{-1}(\sinh (x))}{2 a}-\frac {2 \tanh (x)}{a}+\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \text {sech}(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 51, normalized size = 1.13 \begin {gather*} \frac {\cosh \left (\frac {x}{2}\right ) \text {sech}(x) \left (-2 \sinh \left (\frac {x}{2}\right )+\cosh \left (\frac {x}{2}\right ) \left (6 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )+(-2+\text {sech}(x)) \tanh (x)\right )\right )}{a (1+\text {sech}(x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.67, size = 46, normalized size = 1.02
method | result | size |
default | \(\frac {-\tanh \left (\frac {x}{2}\right )+\frac {-3 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )-\tanh \left (\frac {x}{2}\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}+3 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) | \(46\) |
risch | \(\frac {3 \,{\mathrm e}^{4 x}+3 \,{\mathrm e}^{3 x}+5 \,{\mathrm e}^{2 x}+{\mathrm e}^{x}+4}{\left (1+{\mathrm e}^{2 x}\right )^{2} a \left ({\mathrm e}^{x}+1\right )}+\frac {3 i \ln \left ({\mathrm e}^{x}+i\right )}{2 a}-\frac {3 i \ln \left ({\mathrm e}^{x}-i\right )}{2 a}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 73, normalized size = 1.62 \begin {gather*} -\frac {e^{\left (-x\right )} + 5 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + 4}{a e^{\left (-x\right )} + 2 \, a e^{\left (-2 \, x\right )} + 2 \, a e^{\left (-3 \, x\right )} + a e^{\left (-4 \, x\right )} + a e^{\left (-5 \, x\right )} + a} - \frac {3 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 325 vs.
\(2 (41) = 82\).
time = 0.38, size = 325, normalized size = 7.22 \begin {gather*} \frac {3 \, \cosh \left (x\right )^{4} + 3 \, {\left (4 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{3} + 3 \, \sinh \left (x\right )^{4} + 3 \, \cosh \left (x\right )^{3} + {\left (18 \, \cosh \left (x\right )^{2} + 9 \, \cosh \left (x\right ) + 5\right )} \sinh \left (x\right )^{2} + 3 \, {\left (\cosh \left (x\right )^{5} + {\left (5 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{4} + \sinh \left (x\right )^{5} + \cosh \left (x\right )^{4} + 2 \, {\left (5 \, \cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{3} + 2 \, \cosh \left (x\right )^{3} + 2 \, {\left (5 \, \cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right )^{2} + 3 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{2} + 2 \, \cosh \left (x\right )^{2} + {\left (5 \, \cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right )^{3} + 6 \, \cosh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 1\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 5 \, \cosh \left (x\right )^{2} + {\left (12 \, \cosh \left (x\right )^{3} + 9 \, \cosh \left (x\right )^{2} + 10 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 4}{a \cosh \left (x\right )^{5} + a \sinh \left (x\right )^{5} + a \cosh \left (x\right )^{4} + {\left (5 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{4} + 2 \, a \cosh \left (x\right )^{3} + 2 \, {\left (5 \, a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{3} + 2 \, a \cosh \left (x\right )^{2} + 2 \, {\left (5 \, a \cosh \left (x\right )^{3} + 3 \, a \cosh \left (x\right )^{2} + 3 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{2} + a \cosh \left (x\right ) + {\left (5 \, a \cosh \left (x\right )^{4} + 4 \, a \cosh \left (x\right )^{3} + 6 \, a \cosh \left (x\right )^{2} + 4 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\operatorname {sech}^{4}{\left (x \right )}}{\operatorname {sech}{\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.38, size = 48, normalized size = 1.07 \begin {gather*} \frac {3 \, \arctan \left (e^{x}\right )}{a} + \frac {e^{\left (3 \, x\right )} + 2 \, e^{\left (2 \, x\right )} - e^{x} + 2}{a {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} + \frac {2}{a {\left (e^{x} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.35, size = 73, normalized size = 1.62 \begin {gather*} \frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}+\frac {\frac {2}{a}+\frac {{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}+\frac {3\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}}-\frac {2\,{\mathrm {e}}^x}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________