Integrand size = 9, antiderivative size = 165 \[ \int \tanh ^2(a+2 \log (x)) \, dx=x+\frac {x}{1+e^{2 a} x^4}+\frac {e^{-a/2} \arctan \left (1-\sqrt {2} e^{a/2} x\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \arctan \left (1+\sqrt {2} e^{a/2} x\right )}{2 \sqrt {2}}+\frac {e^{-a/2} \log \left (1-\sqrt {2} e^{a/2} x+e^a x^2\right )}{4 \sqrt {2}}-\frac {e^{-a/2} \log \left (1+\sqrt {2} e^{a/2} x+e^a x^2\right )}{4 \sqrt {2}} \]
x+x/(1+exp(2*a)*x^4)-1/4*arctan(-1+exp(1/2*a)*x*2^(1/2))/exp(1/2*a)*2^(1/2 )-1/4*arctan(1+exp(1/2*a)*x*2^(1/2))/exp(1/2*a)*2^(1/2)+1/8*ln(1+exp(a)*x^ 2-exp(1/2*a)*x*2^(1/2))/exp(1/2*a)*2^(1/2)-1/8*ln(1+exp(a)*x^2+exp(1/2*a)* x*2^(1/2))/exp(1/2*a)*2^(1/2)
Time = 0.44 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.88 \[ \int \tanh ^2(a+2 \log (x)) \, dx=\frac {1}{4} \left (4 x+\frac {4 x}{1+e^{2 a} x^4}+\sqrt [4]{-1} e^{-a/2} \log \left (\sqrt [4]{-1} e^{-a/2}-x\right )+(-1)^{3/4} e^{-a/2} \log \left ((-1)^{3/4} e^{-a/2}-x\right )-\sqrt [4]{-1} e^{-a/2} \log \left (\sqrt [4]{-1} e^{-a/2}+x\right )-(-1)^{3/4} e^{-a/2} \log \left ((-1)^{3/4} e^{-a/2}+x\right )\right ) \]
(4*x + (4*x)/(1 + E^(2*a)*x^4) + ((-1)^(1/4)*Log[(-1)^(1/4)/E^(a/2) - x])/ E^(a/2) + ((-1)^(3/4)*Log[(-1)^(3/4)/E^(a/2) - x])/E^(a/2) - ((-1)^(1/4)*L og[(-1)^(1/4)/E^(a/2) + x])/E^(a/2) - ((-1)^(3/4)*Log[(-1)^(3/4)/E^(a/2) + x])/E^(a/2))/4
Time = 0.35 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6067, 915, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tanh ^2(a+2 \log (x)) \, dx\) |
\(\Big \downarrow \) 6067 |
\(\displaystyle \int \frac {\left (e^{2 a} x^4-1\right )^2}{\left (e^{2 a} x^4+1\right )^2}dx\) |
\(\Big \downarrow \) 915 |
\(\displaystyle \int \left (1-\frac {4 e^{2 a} x^4}{\left (e^{2 a} x^4+1\right )^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {e^{-a/2} \arctan \left (1-\sqrt {2} e^{a/2} x\right )}{2 \sqrt {2}}-\frac {e^{-a/2} \arctan \left (\sqrt {2} e^{a/2} x+1\right )}{2 \sqrt {2}}+\frac {x}{e^{2 a} x^4+1}+\frac {e^{-a/2} \log \left (e^a x^2-\sqrt {2} e^{a/2} x+1\right )}{4 \sqrt {2}}-\frac {e^{-a/2} \log \left (e^a x^2+\sqrt {2} e^{a/2} x+1\right )}{4 \sqrt {2}}+x\) |
x + x/(1 + E^(2*a)*x^4) + ArcTan[1 - Sqrt[2]*E^(a/2)*x]/(2*Sqrt[2]*E^(a/2) ) - ArcTan[1 + Sqrt[2]*E^(a/2)*x]/(2*Sqrt[2]*E^(a/2)) + Log[1 - Sqrt[2]*E^ (a/2)*x + E^a*x^2]/(4*Sqrt[2]*E^(a/2)) - Log[1 + Sqrt[2]*E^(a/2)*x + E^a*x ^2]/(4*Sqrt[2]*E^(a/2))
3.2.56.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a , b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[Tanh[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Int[(-1 + E^(2* a*d)*x^(2*b*d))^p/(1 + E^(2*a*d)*x^(2*b*d))^p, x] /; FreeQ[{a, b, d, p}, x]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.05 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.28
method | result | size |
risch | \(x +\frac {x}{1+{\mathrm e}^{2 a} x^{4}}-\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 )}{4}\) | \(47\) |
Result contains complex when optimal does not.
Time = 0.25 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.95 \[ \int \tanh ^2(a+2 \log (x)) \, dx=\frac {4 \, x^{5} e^{\left (2 \, a\right )} - {\left (x^{4} e^{\left (2 \, a\right )} + 1\right )} \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}} \log \left (x + \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}}\right ) + {\left (-i \, x^{4} e^{\left (2 \, a\right )} - i\right )} \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 ) + {\left (i \, x^{4} e^{\left (2 \, a\right )} + i\right )} \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 ) + {\left (x^{4} e^{\left (2 \, a\right )} + 1\right )} \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}} \log \left (x - \left (-e^{\left (-2 \, a\right )}\right )^{\frac {1}{4}}\right ) + 8 \, x}{4 \, {\left (x^{4} e^{\left (2 \, a\right )} + 1\right )}} \]
1/4*(4*x^5*e^(2*a) - (x^4*e^(2*a) + 1)*(-e^(-2*a))^(1/4)*log(x + (-e^(-2*a ))^(1/4)) + (-I*x^4*e^(2*a) - I)*(-e^(-2*a))^(1/4)*log(x + I*(-e^(-2*a))^( 1/4)) + (I*x^4*e^(2*a) + I)*(-e^(-2*a))^(1/4)*log(x - I*(-e^(-2*a))^(1/4)) + (x^4*e^(2*a) + 1)*(-e^(-2*a))^(1/4)*log(x - (-e^(-2*a))^(1/4)) + 8*x)/( x^4*e^(2*a) + 1)
\[ \int \tanh ^2(a+2 \log (x)) \, dx=\int \tanh ^{2}{\left (a + 2 \log {\left (x \right )} \right )}\, dx \]
Time = 0.26 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.84 \[ \int \tanh ^2(a+2 \log (x)) \, dx=-\frac {1}{4} \, \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} \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}{8} \, \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}{8} \, \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 + \frac {x}{x^{4} e^{\left (2 \, a\right )} + 1} \]
-1/4*sqrt(2)*arctan(1/2*sqrt(2)*(2*x*e^a + sqrt(2)*e^(1/2*a))*e^(-1/2*a))* e^(-1/2*a) - 1/4*sqrt(2)*arctan(1/2*sqrt(2)*(2*x*e^a - sqrt(2)*e^(1/2*a))* e^(-1/2*a))*e^(-1/2*a) - 1/8*sqrt(2)*e^(-1/2*a)*log(x^2*e^a + sqrt(2)*x*e^ (1/2*a) + 1) + 1/8*sqrt(2)*e^(-1/2*a)*log(x^2*e^a - sqrt(2)*x*e^(1/2*a) + 1) + x + x/(x^4*e^(2*a) + 1)
Time = 0.28 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.81 \[ \int \tanh ^2(a+2 \log (x)) \, dx=-\frac {1}{4} \, \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} \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}{8} \, \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}{8} \, \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 + \frac {x}{x^{4} e^{\left (2 \, a\right )} + 1} \]
-1/4*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*e^(-1/2*a) + 2*x)*e^(1/2*a))*e^(- 1/2*a) - 1/4*sqrt(2)*arctan(-1/2*sqrt(2)*(sqrt(2)*e^(-1/2*a) - 2*x)*e^(1/2 *a))*e^(-1/2*a) - 1/8*sqrt(2)*e^(-1/2*a)*log(sqrt(2)*x*e^(-1/2*a) + x^2 + e^(-a)) + 1/8*sqrt(2)*e^(-1/2*a)*log(-sqrt(2)*x*e^(-1/2*a) + x^2 + e^(-a)) + x + x/(x^4*e^(2*a) + 1)
Time = 1.72 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.37 \[ \int \tanh ^2(a+2 \log (x)) \, dx=x-\frac {\mathrm {atan}\left (x\,{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}\right )}{2\,{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}}+\frac {x}{{\mathrm {e}}^{2\,a}\,x^4+1}+\frac {\mathrm {atan}\left (x\,{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,{\left (-{\mathrm {e}}^{2\,a}\right )}^{1/4}} \]