Optimal. Leaf size=87 \[ 3 b^2 \tanh ^{-1}(\tanh (a+b x))^2-6 b^3 x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+6 b^2 \log (x) \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.062113, antiderivative size = 87, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {2168, 2159, 2158, 29} \[ 3 b^2 \tanh ^{-1}(\tanh (a+b x))^2-6 b^3 x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+6 b^2 \log (x) \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2168
Rule 2159
Rule 2158
Rule 29
Rubi steps
\begin{align*} \int \frac{\tanh ^{-1}(\tanh (a+b x))^4}{x^3} \, dx &=-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}+(2 b) \int \frac{\tanh ^{-1}(\tanh (a+b x))^3}{x^2} \, dx\\ &=-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x}-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}+\left (6 b^2\right ) \int \frac{\tanh ^{-1}(\tanh (a+b x))^2}{x} \, dx\\ &=3 b^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x}-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}-\left (6 b^2 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )\right ) \int \frac{\tanh ^{-1}(\tanh (a+b x))}{x} \, dx\\ &=-6 b^3 x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+3 b^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x}-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}+\left (6 b^2 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2\right ) \int \frac{1}{x} \, dx\\ &=-6 b^3 x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+3 b^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x}-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}+6 b^2 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \log (x)\\ \end{align*}
Mathematica [A] time = 0.0345662, size = 81, normalized size = 0.93 \[ -6 b^3 x (2 \log (x)+1) \tanh ^{-1}(\tanh (a+b x))+3 b^2 (2 \log (x)+3) \tanh ^{-1}(\tanh (a+b x))^2-\frac{\tanh ^{-1}(\tanh (a+b x))^4}{2 x^2}-\frac{2 b \tanh ^{-1}(\tanh (a+b x))^3}{x}+6 b^4 x^2 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.043, size = 93, normalized size = 1.1 \begin{align*} -{\frac{ \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) ^{4}}{2\,{x}^{2}}}-2\,{\frac{b \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) ^{3}}{x}}+6\,{b}^{2}\ln \left ( x \right ) \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) ^{2}+6\,{b}^{4}{x}^{2}\ln \left ( x \right ) -9\,{x}^{2}{b}^{4}-12\,{b}^{3}{\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \ln \left ( x \right ) x+12\,{b}^{3}{\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.77082, size = 112, normalized size = 1.29 \begin{align*} -\frac{2 \, b \operatorname{artanh}\left (\tanh \left (b x + a\right )\right )^{3}}{x} + 3 \,{\left (2 \, b \operatorname{artanh}\left (\tanh \left (b x + a\right )\right )^{2} \log \left (x\right ) +{\left (b^{2} x^{2} + 4 \, a b x + 2 \, a^{2} \log \left (x\right ) - 2 \, \operatorname{artanh}\left (\tanh \left (b x + a\right )\right )^{2} \log \left (x\right )\right )} b\right )} b - \frac{\operatorname{artanh}\left (\tanh \left (b x + a\right )\right )^{4}}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.57488, size = 101, normalized size = 1.16 \begin{align*} \frac{b^{4} x^{4} + 8 \, a b^{3} x^{3} + 12 \, a^{2} b^{2} x^{2} \log \left (x\right ) - 8 \, a^{3} b x - a^{4}}{2 \, x^{2}} \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 \frac{\operatorname{atanh}^{4}{\left (\tanh{\left (a + b x \right )} \right )}}{x^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16512, size = 58, normalized size = 0.67 \begin{align*} \frac{1}{2} \, b^{4} x^{2} + 4 \, a b^{3} x + 6 \, a^{2} b^{2} \log \left ({\left | x \right |}\right ) - \frac{8 \, a^{3} b x + a^{4}}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]