Optimal. Leaf size=69 \[ \sqrt {2} \tan ^{-1}\left (\text {sech}(x) \sqrt {\cosh (x) \sinh (x)}\right )+\frac {1}{6} \tan ^{-1}\left (\frac {\sinh (x)}{\sqrt {\sinh (2 x)}}\right )-\frac {1}{3} \sqrt {2} \tanh ^{-1}\left (\text {sech}(x) \sqrt {\cosh (x) \sinh (x)}\right )+\frac {\cosh (x)}{\sqrt {\sinh (2 x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.68, antiderivative size = 102, normalized size of antiderivative = 1.48, number of steps
used = 8, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {4475, 6857,
213, 209} \begin {gather*} \frac {2 \sinh (x) \text {ArcTan}\left (\sqrt {\tanh (x)}\right )}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}+\frac {\sinh (x) \text {ArcTan}\left (\frac {\sqrt {\tanh (x)}}{\sqrt {2}}\right )}{3 \sqrt {2} \sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}-\frac {2 \sinh (x) \tanh ^{-1}\left (\sqrt {\tanh (x)}\right )}{3 \sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}+\frac {\cosh (x)}{\sqrt {\sinh (2 x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 213
Rule 4475
Rule 6857
Rubi steps
\begin {align*} \int \frac {\cosh (x) (-\cosh (2 x)+\tanh (x))}{\sqrt {\sinh (2 x)} \left (\sinh ^2(x)+\sinh (2 x)\right )} \, dx &=\frac {\sinh (x) \int \frac {-\cosh (2 x)+\tanh (x)}{\left (\sinh ^2(x)+\sinh (2 x)\right ) \sqrt {\tanh (x)}} \, dx}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}\\ &=\frac {\sinh (x) \text {Subst}\left (\int \frac {-1+x-x^2-x^3}{x^{3/2} (2+x) \left (1-x^2\right )} \, dx,x,\tanh (x)\right )}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}\\ &=\frac {(2 \sinh (x)) \text {Subst}\left (\int \frac {1-x^2+x^4+x^6}{x^2 \left (2+x^2\right ) \left (-1+x^4\right )} \, dx,x,\sqrt {\tanh (x)}\right )}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}\\ &=\frac {(2 \sinh (x)) \text {Subst}\left (\int \left (-\frac {1}{2 x^2}+\frac {1}{3 \left (-1+x^2\right )}+\frac {1}{1+x^2}+\frac {1}{6 \left (2+x^2\right )}\right ) \, dx,x,\sqrt {\tanh (x)}\right )}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}\\ &=\frac {\cosh (x)}{\sqrt {\sinh (2 x)}}+\frac {\sinh (x) \text {Subst}\left (\int \frac {1}{2+x^2} \, dx,x,\sqrt {\tanh (x)}\right )}{3 \sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}+\frac {(2 \sinh (x)) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {\tanh (x)}\right )}{3 \sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}+\frac {(2 \sinh (x)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\tanh (x)}\right )}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}\\ &=\frac {\cosh (x)}{\sqrt {\sinh (2 x)}}+\frac {2 \tan ^{-1}\left (\sqrt {\tanh (x)}\right ) \sinh (x)}{\sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\tanh (x)}}{\sqrt {2}}\right ) \sinh (x)}{3 \sqrt {2} \sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}-\frac {2 \tanh ^{-1}\left (\sqrt {\tanh (x)}\right ) \sinh (x)}{3 \sqrt {\sinh (2 x)} \sqrt {\tanh (x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(160\) vs. \(2(69)=138\).
time = 21.19, size = 160, normalized size = 2.32 \begin {gather*} \frac {\sqrt {\sinh (2 x)} \left (6 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {\tanh \left (\frac {x}{2}\right )}}{\sqrt {\frac {\cosh (x)}{1+\cosh (x)}}}\right )+\tan ^{-1}\left (\frac {\sqrt {\tanh \left (\frac {x}{2}\right )}}{\sqrt {1+\tanh ^2\left (\frac {x}{2}\right )}}\right )-2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {\tanh \left (\frac {x}{2}\right )}}{\sqrt {\frac {\cosh (x)}{1+\cosh (x)}}}\right )+\frac {3 \sqrt {\cosh (x) \text {sech}^2\left (\frac {x}{2}\right )}}{\sqrt {\tanh \left (\frac {x}{2}\right )}}\right )}{6 (1+\cosh (x)) \sqrt {\tanh \left (\frac {x}{2}\right )} \sqrt {1+\tanh ^2\left (\frac {x}{2}\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 0.32, size = 987, normalized size = 14.30
method | result | size |
default | \(\text {Expression too large to display}\) | \(987\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \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. 376 vs.
\(2 (53) = 106\).
time = 0.73, size = 376, normalized size = 5.45 \begin {gather*} -\frac {{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )} \arctan \left (\frac {{\left (\sqrt {2} \cosh \left (x\right )^{2} + 2 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {2} \sinh \left (x\right )^{2} + 3 \, \sqrt {2}\right )} \sqrt {\frac {\cosh \left (x\right ) \sinh \left (x\right )}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}}}{2 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} - 1\right )}}\right ) + 6 \, {\left (\sqrt {2} \cosh \left (x\right )^{2} + 2 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {2} \sinh \left (x\right )^{2} - \sqrt {2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {\cosh \left (x\right ) \sinh \left (x\right )}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}}}{\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} - 1}\right ) - {\left (\sqrt {2} \cosh \left (x\right )^{2} + 2 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {2} \sinh \left (x\right )^{2} - \sqrt {2}\right )} \log \left (2 \, \cosh \left (x\right )^{4} + 8 \, \cosh \left (x\right )^{3} \sinh \left (x\right ) + 12 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 8 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + 2 \, \sinh \left (x\right )^{4} - 4 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )} \sqrt {\frac {\cosh \left (x\right ) \sinh \left (x\right )}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}} - 1\right ) - 12 \, \sqrt {2} \sqrt {\frac {\cosh \left (x\right ) \sinh \left (x\right )}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}}}{12 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} - 1\right )}} \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*} - \int \frac {\cosh {\left (x \right )} \cosh {\left (2 x \right )}}{\sinh ^{2}{\left (x \right )} \sqrt {\sinh {\left (2 x \right )}} + \sinh ^{\frac {3}{2}}{\left (2 x \right )}}\, dx - \int \left (- \frac {\cosh {\left (x \right )} \tanh {\left (x \right )}}{\sinh ^{2}{\left (x \right )} \sqrt {\sinh {\left (2 x \right )}} + \sinh ^{\frac {3}{2}}{\left (2 x \right )}}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.18, size = 90, normalized size = 1.30 \begin {gather*} \sqrt {2} \arctan \left (\sqrt {e^{\left (4 \, x\right )} - 1} - e^{\left (2 \, x\right )}\right ) + \frac {1}{6} \, \sqrt {2} \log \left (-\sqrt {e^{\left (4 \, x\right )} - 1} + e^{\left (2 \, x\right )}\right ) + \frac {\sqrt {2}}{\sqrt {e^{\left (4 \, x\right )} - 1} - e^{\left (2 \, x\right )} + 1} + \frac {1}{6} \, \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (3 \, \sqrt {e^{\left (4 \, x\right )} - 1} - 3 \, e^{\left (2 \, x\right )} - 1\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} -\int \frac {\mathrm {cosh}\left (x\right )\,\left (\mathrm {cosh}\left (2\,x\right )-\mathrm {tanh}\left (x\right )\right )}{\sqrt {\mathrm {sinh}\left (2\,x\right )}\,\left ({\mathrm {sinh}\left (x\right )}^2+\mathrm {sinh}\left (2\,x\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________