Optimal. Leaf size=108 \[ e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}+\frac {\text {ArcTan}\left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\text {ArcTan}\left (\frac {1+2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \log \left (1-e^x+e^{2 x}\right )-\frac {1}{18} \log \left (1+e^x+e^{2 x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 9, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.900, Rules used = {2320, 398,
294, 216, 648, 632, 210, 642, 212} \begin {gather*} \frac {\text {ArcTan}\left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\text {ArcTan}\left (\frac {2 e^x+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}+\frac {1}{18} \log \left (-e^x+e^{2 x}+1\right )-\frac {1}{18} \log \left (e^x+e^{2 x}+1\right )-\frac {2}{9} \tanh ^{-1}\left (e^x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 212
Rule 216
Rule 294
Rule 398
Rule 632
Rule 642
Rule 648
Rule 2320
Rubi steps
\begin {align*} \int e^x \coth ^2(3 x) \, dx &=\text {Subst}\left (\int \frac {\left (1+x^6\right )^2}{\left (1-x^6\right )^2} \, dx,x,e^x\right )\\ &=\text {Subst}\left (\int \left (1+\frac {4 x^6}{\left (1-x^6\right )^2}\right ) \, dx,x,e^x\right )\\ &=e^x+4 \text {Subst}\left (\int \frac {x^6}{\left (1-x^6\right )^2} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{3} \text {Subst}\left (\int \frac {1}{1-x^6} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{9} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,e^x\right )-\frac {2}{9} \text {Subst}\left (\int \frac {1-\frac {x}{2}}{1-x+x^2} \, dx,x,e^x\right )-\frac {2}{9} \text {Subst}\left (\int \frac {1+\frac {x}{2}}{1+x+x^2} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \text {Subst}\left (\int \frac {-1+2 x}{1-x+x^2} \, dx,x,e^x\right )-\frac {1}{18} \text {Subst}\left (\int \frac {1+2 x}{1+x+x^2} \, dx,x,e^x\right )-\frac {1}{6} \text {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,e^x\right )-\frac {1}{6} \text {Subst}\left (\int \frac {1}{1+x+x^2} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \log \left (1-e^x+e^{2 x}\right )-\frac {1}{18} \log \left (1+e^x+e^{2 x}\right )+\frac {1}{3} \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 e^x\right )+\frac {1}{3} \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}+\frac {\tan ^{-1}\left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\tan ^{-1}\left (\frac {1+2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \log \left (1-e^x+e^{2 x}\right )-\frac {1}{18} \log \left (1+e^x+e^{2 x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 1.37, size = 113, normalized size = 1.05 \begin {gather*} \frac {e^{-11 x} \left (-15379-28153 e^{6 x}-5633 e^{12 x}+3109 e^{18 x}+7 \left (2197+3708 e^{6 x}+538 e^{12 x}-684 e^{18 x}+e^{24 x}\right ) \, _2F_1\left (\frac {1}{6},1;\frac {7}{6};e^{6 x}\right )\right )}{3024}+\frac {36 e^{7 x} \left (1+e^{6 x}\right )^2 \, _4F_3\left (\frac {7}{6},2,2,2;1,1,\frac {25}{6};e^{6 x}\right )}{1729} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.82, size = 150, normalized size = 1.39
method | result | size |
risch | \({\mathrm e}^{x}-\frac {2 \,{\mathrm e}^{x}}{3 \left ({\mathrm e}^{6 x}-1\right )}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{9}-\frac {\ln \left ({\mathrm e}^{x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{18}+\frac {i \ln \left ({\mathrm e}^{x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}-\frac {\ln \left ({\mathrm e}^{x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{18}-\frac {i \ln \left ({\mathrm e}^{x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}+\frac {\ln \left ({\mathrm e}^{x}-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{18}+\frac {i \ln \left ({\mathrm e}^{x}-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}+\frac {\ln \left ({\mathrm e}^{x}-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{18}-\frac {i \ln \left ({\mathrm e}^{x}-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{9}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 87, normalized size = 0.81 \begin {gather*} -\frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} + 1\right )}\right ) - \frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} - 1\right )}\right ) - \frac {2 \, e^{x}}{3 \, {\left (e^{\left (6 \, x\right )} - 1\right )}} + e^{x} - \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} + e^{x} + 1\right ) + \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} - e^{x} + 1\right ) - \frac {1}{9} \, \log \left (e^{x} + 1\right ) + \frac {1}{9} \, \log \left (e^{x} - 1\right ) \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. 628 vs.
\(2 (78) = 156\).
time = 0.35, size = 628, normalized size = 5.81 \begin {gather*} \frac {18 \, \cosh \left (x\right )^{7} + 378 \, \cosh \left (x\right )^{5} \sinh \left (x\right )^{2} + 630 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{3} + 630 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{4} + 378 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{5} + 126 \, \cosh \left (x\right ) \sinh \left (x\right )^{6} + 18 \, \sinh \left (x\right )^{7} - 2 \, {\left (\sqrt {3} \cosh \left (x\right )^{6} + 6 \, \sqrt {3} \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \sqrt {3} \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \sqrt {3} \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \sqrt {3} \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \sqrt {3} \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sqrt {3} \sinh \left (x\right )^{6} - \sqrt {3}\right )} \arctan \left (\frac {2}{3} \, \sqrt {3} \cosh \left (x\right ) + \frac {2}{3} \, \sqrt {3} \sinh \left (x\right ) + \frac {1}{3} \, \sqrt {3}\right ) - 2 \, {\left (\sqrt {3} \cosh \left (x\right )^{6} + 6 \, \sqrt {3} \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \sqrt {3} \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \sqrt {3} \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \sqrt {3} \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \sqrt {3} \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sqrt {3} \sinh \left (x\right )^{6} - \sqrt {3}\right )} \arctan \left (\frac {2}{3} \, \sqrt {3} \cosh \left (x\right ) + \frac {2}{3} \, \sqrt {3} \sinh \left (x\right ) - \frac {1}{3} \, \sqrt {3}\right ) - {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} - 1\right )} \log \left (\frac {2 \, \cosh \left (x\right ) + 1}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} - 1\right )} \log \left (\frac {2 \, \cosh \left (x\right ) - 1}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - 2 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} - 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + 2 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} - 1\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) + 6 \, {\left (21 \, \cosh \left (x\right )^{6} - 5\right )} \sinh \left (x\right ) - 30 \, \cosh \left (x\right )}{18 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} \sinh \left (x\right ) + 15 \, \cosh \left (x\right )^{4} \sinh \left (x\right )^{2} + 20 \, \cosh \left (x\right )^{3} \sinh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{4} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} - 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 e^{x} \coth ^{2}{\left (3 x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 88, normalized size = 0.81 \begin {gather*} -\frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} + 1\right )}\right ) - \frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} - 1\right )}\right ) - \frac {2 \, e^{x}}{3 \, {\left (e^{\left (6 \, x\right )} - 1\right )}} + e^{x} - \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} + e^{x} + 1\right ) + \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} - e^{x} + 1\right ) - \frac {1}{9} \, \log \left (e^{x} + 1\right ) + \frac {1}{9} \, \log \left ({\left | e^{x} - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.38, size = 93, normalized size = 0.86 \begin {gather*} \frac {\ln \left (\frac {2}{3}-\frac {2\,{\mathrm {e}}^x}{3}\right )}{9}-\frac {\ln \left (-\frac {2\,{\mathrm {e}}^x}{3}-\frac {2}{3}\right )}{9}+\frac {\ln \left ({\left (\frac {2\,{\mathrm {e}}^x}{3}-\frac {1}{3}\right )}^2+\frac {1}{3}\right )}{18}-\frac {\ln \left ({\left (\frac {2\,{\mathrm {e}}^x}{3}+\frac {1}{3}\right )}^2+\frac {1}{3}\right )}{18}+{\mathrm {e}}^x-\frac {2\,{\mathrm {e}}^x}{3\,\left ({\mathrm {e}}^{6\,x}-1\right )}-\frac {\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,\left (\frac {2\,{\mathrm {e}}^x}{3}-\frac {1}{3}\right )\right )}{9}-\frac {\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,\left (\frac {2\,{\mathrm {e}}^x}{3}+\frac {1}{3}\right )\right )}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________