Optimal. Leaf size=34 \[ \frac {x \tanh ^{-1}(\tanh (a+b x))^3}{3 b}-\frac {\tanh ^{-1}(\tanh (a+b x))^4}{12 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2199, 2188, 30}
\begin {gather*} \frac {x \tanh ^{-1}(\tanh (a+b x))^3}{3 b}-\frac {\tanh ^{-1}(\tanh (a+b x))^4}{12 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2188
Rule 2199
Rubi steps
\begin {align*} \int x \tanh ^{-1}(\tanh (a+b x))^2 \, dx &=\frac {x \tanh ^{-1}(\tanh (a+b x))^3}{3 b}-\frac {\int \tanh ^{-1}(\tanh (a+b x))^3 \, dx}{3 b}\\ &=\frac {x \tanh ^{-1}(\tanh (a+b x))^3}{3 b}-\frac {\text {Subst}\left (\int x^3 \, dx,x,\tanh ^{-1}(\tanh (a+b x))\right )}{3 b^2}\\ &=\frac {x \tanh ^{-1}(\tanh (a+b x))^3}{3 b}-\frac {\tanh ^{-1}(\tanh (a+b x))^4}{12 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(74\) vs. \(2(34)=68\).
time = 0.04, size = 74, normalized size = 2.18 \begin {gather*} \frac {(a+b x) \left (-\left ((3 a-b x) (a+b x)^2\right )+4 \left (2 a^2+a b x-b^2 x^2\right ) \tanh ^{-1}(\tanh (a+b x))-6 (a-b x) \tanh ^{-1}(\tanh (a+b x))^2\right )}{12 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 30.59, size = 38, normalized size = 1.12
method | result | size |
default | \(\frac {x^{2} \arctanh \left (\tanh \left (b x +a \right )\right )^{2}}{2}-b \left (-\frac {b \,x^{4}}{12}+\frac {x^{3} \arctanh \left (\tanh \left (b x +a \right )\right )}{3}\right )\) | \(38\) |
risch | \(\text {Expression too large to display}\) | \(2083\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.33, size = 36, normalized size = 1.06 \begin {gather*} \frac {1}{12} \, b^{2} x^{4} - \frac {1}{3} \, b x^{3} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right ) + \frac {1}{2} \, x^{2} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 24, normalized size = 0.71 \begin {gather*} \frac {1}{4} \, b^{2} x^{4} + \frac {2}{3} \, a b x^{3} + \frac {1}{2} \, a^{2} x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 41, normalized size = 1.21 \begin {gather*} \begin {cases} \frac {x \operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{3 b} - \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{12 b^{2}} & \text {for}\: b \neq 0 \\\frac {x^{2} \operatorname {atanh}^{2}{\left (\tanh {\left (a \right )} \right )}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 24, normalized size = 0.71 \begin {gather*} \frac {1}{4} \, b^{2} x^{4} + \frac {2}{3} \, a b x^{3} + \frac {1}{2} \, a^{2} x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.94, size = 36, normalized size = 1.06 \begin {gather*} \frac {b^2\,x^4}{12}-\frac {b\,x^3\,\mathrm {atanh}\left (\mathrm {tanh}\left (a+b\,x\right )\right )}{3}+\frac {x^2\,{\mathrm {atanh}\left (\mathrm {tanh}\left (a+b\,x\right )\right )}^2}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________