Optimal. Leaf size=97 \[ e^x+\frac{\log \left (-\sqrt{3} e^x+e^{2 x}+1\right )}{2 \sqrt{3}}-\frac{\log \left (\sqrt{3} e^x+e^{2 x}+1\right )}{2 \sqrt{3}}-\frac{2}{3} \tan ^{-1}\left (e^x\right )+\frac{1}{3} \tan ^{-1}\left (\sqrt{3}-2 e^x\right )-\frac{1}{3} \tan ^{-1}\left (2 e^x+\sqrt{3}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.186301, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 8, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1., Rules used = {2282, 388, 209, 634, 618, 204, 628, 203} \[ e^x+\frac{\log \left (-\sqrt{3} e^x+e^{2 x}+1\right )}{2 \sqrt{3}}-\frac{\log \left (\sqrt{3} e^x+e^{2 x}+1\right )}{2 \sqrt{3}}-\frac{2}{3} \tan ^{-1}\left (e^x\right )+\frac{1}{3} \tan ^{-1}\left (\sqrt{3}-2 e^x\right )-\frac{1}{3} \tan ^{-1}\left (2 e^x+\sqrt{3}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 388
Rule 209
Rule 634
Rule 618
Rule 204
Rule 628
Rule 203
Rubi steps
\begin{align*} \int e^x \tanh (3 x) \, dx &=\operatorname{Subst}\left (\int \frac{-1+x^6}{1+x^6} \, dx,x,e^x\right )\\ &=e^x-2 \operatorname{Subst}\left (\int \frac{1}{1+x^6} \, dx,x,e^x\right )\\ &=e^x-\frac{2}{3} \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,e^x\right )-\frac{2}{3} \operatorname{Subst}\left (\int \frac{1-\frac{\sqrt{3} x}{2}}{1-\sqrt{3} x+x^2} \, dx,x,e^x\right )-\frac{2}{3} \operatorname{Subst}\left (\int \frac{1+\frac{\sqrt{3} x}{2}}{1+\sqrt{3} x+x^2} \, dx,x,e^x\right )\\ &=e^x-\frac{2}{3} \tan ^{-1}\left (e^x\right )-\frac{1}{6} \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{3} x+x^2} \, dx,x,e^x\right )-\frac{1}{6} \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{3} x+x^2} \, dx,x,e^x\right )+\frac{\operatorname{Subst}\left (\int \frac{-\sqrt{3}+2 x}{1-\sqrt{3} x+x^2} \, dx,x,e^x\right )}{2 \sqrt{3}}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{3}+2 x}{1+\sqrt{3} x+x^2} \, dx,x,e^x\right )}{2 \sqrt{3}}\\ &=e^x-\frac{2}{3} \tan ^{-1}\left (e^x\right )+\frac{\log \left (1-\sqrt{3} e^x+e^{2 x}\right )}{2 \sqrt{3}}-\frac{\log \left (1+\sqrt{3} e^x+e^{2 x}\right )}{2 \sqrt{3}}+\frac{1}{3} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,-\sqrt{3}+2 e^x\right )+\frac{1}{3} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,\sqrt{3}+2 e^x\right )\\ &=e^x-\frac{2}{3} \tan ^{-1}\left (e^x\right )+\frac{1}{3} \tan ^{-1}\left (\sqrt{3}-2 e^x\right )-\frac{1}{3} \tan ^{-1}\left (\sqrt{3}+2 e^x\right )+\frac{\log \left (1-\sqrt{3} e^x+e^{2 x}\right )}{2 \sqrt{3}}-\frac{\log \left (1+\sqrt{3} e^x+e^{2 x}\right )}{2 \sqrt{3}}\\ \end{align*}
Mathematica [C] time = 0.0117698, size = 24, normalized size = 0.25 \[ e^x-2 e^x \, _2F_1\left (\frac{1}{6},1;\frac{7}{6};-e^{6 x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.071, size = 47, normalized size = 0.5 \begin{align*}{{\rm e}^{x}}+{\frac{i}{3}}\ln \left ({{\rm e}^{x}}-i \right ) -{\frac{i}{3}}\ln \left ({{\rm e}^{x}}+i \right ) +\sum _{{\it \_R}={\it RootOf} \left ( 81\,{{\it \_Z}}^{4}-9\,{{\it \_Z}}^{2}+1 \right ) }{\it \_R}\,\ln \left ({{\rm e}^{x}}-3\,{\it \_R} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.58983, size = 93, normalized size = 0.96 \begin{align*} -\frac{1}{6} \, \sqrt{3} \log \left (\sqrt{3} e^{x} + e^{\left (2 \, x\right )} + 1\right ) + \frac{1}{6} \, \sqrt{3} \log \left (-\sqrt{3} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac{1}{3} \, \arctan \left (\sqrt{3} + 2 \, e^{x}\right ) - \frac{1}{3} \, \arctan \left (-\sqrt{3} + 2 \, e^{x}\right ) - \frac{2}{3} \, \arctan \left (e^{x}\right ) + e^{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.29901, size = 350, normalized size = 3.61 \begin{align*} -\frac{1}{6} \, \sqrt{3} \log \left (4 \, \sqrt{3} e^{x} + 4 \, e^{\left (2 \, x\right )} + 4\right ) + \frac{1}{6} \, \sqrt{3} \log \left (-4 \, \sqrt{3} e^{x} + 4 \, e^{\left (2 \, x\right )} + 4\right ) + \frac{2}{3} \, \arctan \left (\sqrt{3} + \sqrt{-4 \, \sqrt{3} e^{x} + 4 \, e^{\left (2 \, x\right )} + 4} - 2 \, e^{x}\right ) + \frac{2}{3} \, \arctan \left (-\sqrt{3} + 2 \, \sqrt{\sqrt{3} e^{x} + e^{\left (2 \, x\right )} + 1} - 2 \, e^{x}\right ) - \frac{2}{3} \, \arctan \left (e^{x}\right ) + e^{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{x} \tanh{\left (3 x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{x} \tanh \left (3 \, x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]