Integrand size = 23, antiderivative size = 33 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=-\frac {4 \arctan \left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{3 (1+\tanh (x))} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2099, 632, 210} \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=-\frac {4 \arctan \left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{3 (\tanh (x)+1)} \]
[In]
[Out]
Rule 210
Rule 632
Rule 2099
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1+x+x^2}{1+x+x^3+x^4} \, dx,x,\tanh (x)\right ) \\ & = \text {Subst}\left (\int \left (\frac {1}{3 (1+x)^2}+\frac {2}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\tanh (x)\right ) \\ & = -\frac {1}{3 (1+\tanh (x))}+\frac {2}{3} \text {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,\tanh (x)\right ) \\ & = -\frac {1}{3 (1+\tanh (x))}-\frac {4}{3} \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 \tanh (x)\right ) \\ & = -\frac {4 \arctan \left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{3 (1+\tanh (x))} \\ \end{align*}
Time = 5.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.12 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=\frac {1}{18} \left (8 \sqrt {3} \arctan \left (\frac {-1+2 \tanh (x)}{\sqrt {3}}\right )-3 \cosh (2 x)+3 \sinh (2 x)\right ) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.31 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.33
method | result | size |
risch | \(-\frac {{\mathrm e}^{-2 x}}{6}+\frac {2 i \sqrt {3}\, \ln \left ({\mathrm e}^{2 x}+i \sqrt {3}\right )}{9}-\frac {2 i \sqrt {3}\, \ln \left ({\mathrm e}^{2 x}-i \sqrt {3}\right )}{9}\) | \(44\) |
default | \(\frac {2 i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (-1-i \sqrt {3}\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{9}-\frac {2 i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (-1+i \sqrt {3}\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{9}-\frac {2}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {2}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )}\) | \(78\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (26) = 52\).
Time = 0.25 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.24 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=-\frac {8 \, {\left (\sqrt {3} \cosh \left (x\right )^{2} + 2 \, \sqrt {3} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {3} \sinh \left (x\right )^{2}\right )} \arctan \left (-\frac {\sqrt {3} \cosh \left (x\right ) + \sqrt {3} \sinh \left (x\right )}{3 \, {\left (\cosh \left (x\right ) - \sinh \left (x\right )\right )}}\right ) + 3}{18 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (34) = 68\).
Time = 0.52 (sec) , antiderivative size = 102, normalized size of antiderivative = 3.09 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=\frac {4 \sqrt {3} \sinh {\left (x \right )} \operatorname {atan}{\left (\frac {2 \sqrt {3} \sinh {\left (x \right )}}{3 \cosh {\left (x \right )}} - \frac {\sqrt {3}}{3} \right )}}{9 \sinh {\left (x \right )} + 9 \cosh {\left (x \right )}} + \frac {3 \sinh {\left (x \right )}}{9 \sinh {\left (x \right )} + 9 \cosh {\left (x \right )}} + \frac {4 \sqrt {3} \cosh {\left (x \right )} \operatorname {atan}{\left (\frac {2 \sqrt {3} \sinh {\left (x \right )}}{3 \cosh {\left (x \right )}} - \frac {\sqrt {3}}{3} \right )}}{9 \sinh {\left (x \right )} + 9 \cosh {\left (x \right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (26) = 52\).
Time = 0.29 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.12 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=\frac {4}{9} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} + 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) - \frac {4}{9} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} - 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) - \frac {1}{6} \, e^{\left (-2 \, x\right )} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.67 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=\frac {4}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} e^{\left (2 \, x\right )}\right ) - \frac {1}{6} \, e^{\left (-2 \, x\right )} \]
[In]
[Out]
Time = 0.47 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.67 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx=\frac {4\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,{\mathrm {e}}^{2\,x}}{3}\right )}{9}-\frac {{\mathrm {e}}^{-2\,x}}{6} \]
[In]
[Out]