Integrand size = 7, antiderivative size = 145 \[ \int \tanh (a+2 \log (x)) \, dx=x+\frac {e^{-a/2} \arctan \left (1-\sqrt {2} e^{a/2} x\right )}{\sqrt {2}}-\frac {e^{-a/2} \arctan \left (1+\sqrt {2} e^{a/2} x\right )}{\sqrt {2}}+\frac {e^{-a/2} \log \left (1-\sqrt {2} e^{a/2} x+e^a x^2\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \log \left (1+\sqrt {2} e^{a/2} x+e^a x^2\right )}{2 \sqrt {2}} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.143, Rules used = {5652, 396, 217, 1179, 642, 1176, 631, 210} \[ \int \tanh (a+2 \log (x)) \, dx=\frac {e^{-a/2} \arctan \left (1-\sqrt {2} e^{a/2} x\right )}{\sqrt {2}}-\frac {e^{-a/2} \arctan \left (\sqrt {2} e^{a/2} x+1\right )}{\sqrt {2}}+\frac {e^{-a/2} \log \left (e^a x^2-\sqrt {2} e^{a/2} x+1\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \log \left (e^a x^2+\sqrt {2} e^{a/2} x+1\right )}{2 \sqrt {2}}+x \]
[In]
[Out]
Rule 210
Rule 217
Rule 396
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 5652
Rubi steps \begin{align*} \text {integral}& = \int \frac {-1+e^{2 a} x^4}{1+e^{2 a} x^4} \, dx \\ & = x-2 \int \frac {1}{1+e^{2 a} x^4} \, dx \\ & = x-\int \frac {1-e^a x^2}{1+e^{2 a} x^4} \, dx-\int \frac {1+e^a x^2}{1+e^{2 a} x^4} \, dx \\ & = x-\frac {1}{2} e^{-a} \int \frac {1}{e^{-a}-\sqrt {2} e^{-a/2} x+x^2} \, dx-\frac {1}{2} e^{-a} \int \frac {1}{e^{-a}+\sqrt {2} e^{-a/2} x+x^2} \, dx+\frac {e^{-a/2} \int \frac {\sqrt {2} e^{-a/2}+2 x}{-e^{-a}-\sqrt {2} e^{-a/2} x-x^2} \, dx}{2 \sqrt {2}}+\frac {e^{-a/2} \int \frac {\sqrt {2} e^{-a/2}-2 x}{-e^{-a}+\sqrt {2} e^{-a/2} x-x^2} \, dx}{2 \sqrt {2}} \\ & = x+\frac {e^{-a/2} \log \left (1-\sqrt {2} e^{a/2} x+e^a x^2\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \log \left (1+\sqrt {2} e^{a/2} x+e^a x^2\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} e^{a/2} x\right )}{\sqrt {2}}+\frac {e^{-a/2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} e^{a/2} x\right )}{\sqrt {2}} \\ & = x+\frac {e^{-a/2} \arctan \left (1-\sqrt {2} e^{a/2} x\right )}{\sqrt {2}}-\frac {e^{-a/2} \arctan \left (1+\sqrt {2} e^{a/2} x\right )}{\sqrt {2}}+\frac {e^{-a/2} \log \left (1-\sqrt {2} e^{a/2} x+e^a x^2\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \log \left (1+\sqrt {2} e^{a/2} x+e^a x^2\right )}{2 \sqrt {2}} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.15 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.40 \[ \int \tanh (a+2 \log (x)) \, dx=x+\frac {1}{2} \text {RootSum}\left [\cosh (a)-\sinh (a)+\cosh (a) \text {$\#$1}^4+\sinh (a) \text {$\#$1}^4\&,\frac {\log (x)-\log (x-\text {$\#$1})}{\text {$\#$1}^3}\&\right ] (\cosh (2 a)-\sinh (2 a)) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.04 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.23
method | result | size |
risch | \(x -\frac {{\mathrm e}^{-2 a} \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left ({\mathrm e}^{2 a} \textit {\_Z}^{4}+1\right )}{\sum }\frac {\ln \left (x -\textit {\_R} \right )}{\textit {\_R}^{3}}\right )}{2}\) | \(33\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.26 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.63 \[ \int \tanh (a+2 \log (x)) \, dx=-\frac {1}{2} \, \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}} \log \left (x + \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}}\right ) - \frac {1}{2} i \, \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}} \log \left (x + i \, \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}}\right ) + \frac {1}{2} i \, \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}} \log \left (x - i \, \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}}\right ) + \frac {1}{2} \, \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}} \log \left (x - \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}}\right ) + x \]
[In]
[Out]
\[ \int \tanh (a+2 \log (x)) \, dx=\int \tanh {\left (a + 2 \log {\left (x \right )} \right )}\, dx \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.86 \[ \int \tanh (a+2 \log (x)) \, dx=-\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x e^{a} + \sqrt {2} e^{\left (\frac {1}{2} \, a\right )}\right )} e^{\left (-\frac {1}{2} \, a\right )}\right ) e^{\left (-\frac {1}{2} \, a\right )} - \frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x e^{a} - \sqrt {2} e^{\left (\frac {1}{2} \, a\right )}\right )} e^{\left (-\frac {1}{2} \, a\right )}\right ) e^{\left (-\frac {1}{2} \, a\right )} - \frac {1}{4} \, \sqrt {2} e^{\left (-\frac {1}{2} \, a\right )} \log \left (x^{2} e^{a} + \sqrt {2} x e^{\left (\frac {1}{2} \, a\right )} + 1\right ) + \frac {1}{4} \, \sqrt {2} e^{\left (-\frac {1}{2} \, a\right )} \log \left (x^{2} e^{a} - \sqrt {2} x e^{\left (\frac {1}{2} \, a\right )} + 1\right ) + x \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.82 \[ \int \tanh (a+2 \log (x)) \, dx=-\frac {1}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} e^{\left (-\frac {1}{2} \, a\right )} + 2 \, x\right )} e^{\left (\frac {1}{2} \, a\right )}\right ) e^{\left (-\frac {1}{2} \, a\right )} - \frac {1}{2} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} e^{\left (-\frac {1}{2} \, a\right )} - 2 \, x\right )} e^{\left (\frac {1}{2} \, a\right )}\right ) e^{\left (-\frac {1}{2} \, a\right )} - \frac {1}{4} \, \sqrt {2} e^{\left (-\frac {1}{2} \, a\right )} \log \left (\sqrt {2} x e^{\left (-\frac {1}{2} \, a\right )} + x^{2} + e^{\left (-a\right )}\right ) + \frac {1}{4} \, \sqrt {2} e^{\left (-\frac {1}{2} \, a\right )} \log \left (-\sqrt {2} x e^{\left (-\frac {1}{2} \, a\right )} + x^{2} + e^{\left (-a\right )}\right ) + x \]
[In]
[Out]
Time = 1.71 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.30 \[ \int \tanh (a+2 \log (x)) \, dx=x-\frac {\mathrm {atan}\left (x\,{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}\right )}{{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}}-\frac {\mathrm {atanh}\left (x\,{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}\right )}{{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}} \]
[In]
[Out]