Optimal. Leaf size=105 \[ -b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3+\frac {1}{2} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac {1}{3} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^3+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4+\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^4 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2190, 2189, 29}
\begin {gather*} -b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3+\frac {1}{2} \tanh ^{-1}(\tanh (a+b x))^2 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-\frac {1}{3} \tanh ^{-1}(\tanh (a+b x))^3 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4+\log (x) \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^4 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 2189
Rule 2190
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(\tanh (a+b x))^4}{x} \, dx &=\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4-\left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \int \frac {\tanh ^{-1}(\tanh (a+b x))^3}{x} \, dx\\ &=-\frac {1}{3} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^3+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4-\left (\left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )\right ) \int \frac {\tanh ^{-1}(\tanh (a+b x))^2}{x} \, dx\\ &=\frac {1}{2} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac {1}{3} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^3+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4+\left (\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )\right ) \int \frac {\tanh ^{-1}(\tanh (a+b x))}{x} \, dx\\ &=-b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3+\frac {1}{2} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac {1}{3} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^3+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4-\left (\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3 \left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )\right ) \int \frac {1}{x} \, dx\\ &=-b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3+\frac {1}{2} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2 \tanh ^{-1}(\tanh (a+b x))^2-\frac {1}{3} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^3+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4+\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^4 \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 175, normalized size = 1.67 \begin {gather*} \frac {1}{4} (a+b x)^4+\frac {1}{2} (a+b x)^2 \left (a^2-4 a \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )+6 \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )^2\right )+(a+b x) \left (a^3-4 a^2 \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )+6 a \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-4 \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )^3\right )-\frac {1}{3} (a+b x)^3 \left (3 a+4 b x-4 \tanh ^{-1}(\tanh (a+b x))\right )+\left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )^4 \log (b x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(357\) vs.
\(2(99)=198\).
time = 1.20, size = 358, normalized size = 3.41
method | result | size |
default | \(\ln \left (x \right ) \arctanh \left (\tanh \left (b x +a \right )\right )^{4}-4 b \left (\frac {b^{3} x^{4} \ln \left (x \right )}{4}-\frac {b^{3} x^{4}}{16}+a \,b^{2} x^{3} \ln \left (x \right )-\frac {a \,b^{2} x^{3}}{3}+b^{2} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right ) x^{3} \ln \left (x \right )-\frac {b^{2} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right ) x^{3}}{3}+\frac {3 a^{2} b \,x^{2} \ln \left (x \right )}{2}-\frac {3 a^{2} b \,x^{2}}{4}+3 a b \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right ) x^{2} \ln \left (x \right )-\frac {3 a b \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right ) x^{2}}{2}+\frac {3 b \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2} x^{2} \ln \left (x \right )}{2}-\frac {3 b \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2} x^{2}}{4}+\ln \left (x \right ) x \,a^{3}-x \,a^{3}+3 \ln \left (x \right ) x \,a^{2} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )-3 x \,a^{2} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )+3 \ln \left (x \right ) x a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}-3 x a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}+\ln \left (x \right ) x \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{3}-x \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{3}\right )\) | \(358\) |
risch | \(\text {Expression too large to display}\) | \(32826\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.67, size = 42, normalized size = 0.40 \begin {gather*} \frac {1}{4} \, b^{4} x^{4} + \frac {4}{3} \, a b^{3} x^{3} + 3 \, a^{2} b^{2} x^{2} + 4 \, a^{3} b x + a^{4} \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 42, normalized size = 0.40 \begin {gather*} \frac {1}{4} \, b^{4} x^{4} + \frac {4}{3} \, a b^{3} x^{3} + 3 \, a^{2} b^{2} x^{2} + 4 \, a^{3} b x + a^{4} \log \left (x\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 \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.38, size = 43, normalized size = 0.41 \begin {gather*} \frac {1}{4} \, b^{4} x^{4} + \frac {4}{3} \, a b^{3} x^{3} + 3 \, a^{2} b^{2} x^{2} + 4 \, a^{3} b x + a^{4} \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.14, size = 423, normalized size = 4.03 \begin {gather*} \ln \left (x\right )\,\left (\frac {{\left (2\,a-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^4}{16}+\frac {3\,a^2\,{\left (2\,a-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^2}{2}+a^4-\frac {a\,{\left (2\,a-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^3}{2}-2\,a^3\,\left (2\,a-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )\right )+\frac {b^4\,x^4}{4}-\frac {2\,b^3\,x^3\,\left (\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}{3}+\frac {3\,b^2\,x^2\,{\left (\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^2}{4}-\frac {b\,x\,{\left (\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}^3}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________