Optimal. Leaf size=48 \[ \frac {x \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {\coth ^{-1}(\tanh (a+b x))^{n+2}}{b^2 (n+1) (n+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 48, 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 = {2168, 2157, 30} \[ \frac {x \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac {\coth ^{-1}(\tanh (a+b x))^{n+2}}{b^2 (n+1) (n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2157
Rule 2168
Rubi steps
\begin {align*} \int x \coth ^{-1}(\tanh (a+b x))^n \, dx &=\frac {x \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac {\int \coth ^{-1}(\tanh (a+b x))^{1+n} \, dx}{b (1+n)}\\ &=\frac {x \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac {\operatorname {Subst}\left (\int x^{1+n} \, dx,x,\coth ^{-1}(\tanh (a+b x))\right )}{b^2 (1+n)}\\ &=\frac {x \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac {\coth ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 41, normalized size = 0.85 \[ \frac {\left (b (n+2) x-\coth ^{-1}(\tanh (a+b x))\right ) \coth ^{-1}(\tanh (a+b x))^{n+1}}{b^2 (n+1) (n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.57, size = 210, normalized size = 4.38 \[ \frac {{\left (4 \, a b n x + 4 \, {\left (b^{2} n + b^{2}\right )} x^{2} + \pi ^{2} - 4 \, a^{2}\right )} {\left (b^{2} x^{2} + 2 \, a b x + \frac {1}{4} \, \pi ^{2} + a^{2}\right )}^{\frac {1}{2} \, n} \cos \left (2 \, n \arctan \left (-\frac {2 \, b x}{\pi } - \frac {2 \, a}{\pi } + \frac {\sqrt {4 \, b^{2} x^{2} + 8 \, a b x + \pi ^{2} + 4 \, a^{2}}}{\pi }\right )\right ) - 2 \, {\left (\pi b n x - 2 \, \pi a\right )} {\left (b^{2} x^{2} + 2 \, a b x + \frac {1}{4} \, \pi ^{2} + a^{2}\right )}^{\frac {1}{2} \, n} \sin \left (2 \, n \arctan \left (-\frac {2 \, b x}{\pi } - \frac {2 \, a}{\pi } + \frac {\sqrt {4 \, b^{2} x^{2} + 8 \, a b x + \pi ^{2} + 4 \, a^{2}}}{\pi }\right )\right )}{4 \, {\left (b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {arcoth}\left (\tanh \left (b x + a\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 13.67, size = 480, normalized size = 10.00 \[ \frac {\left (\frac {1}{2}\right )^{n} \left (2 \ln \left ({\mathrm e}^{b x +a}\right )-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right ) \left (-\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )\right ) \left (-\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )\right )}{2}-i \pi -i \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2} \left (\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )-1\right )\right )^{1+n} x}{2 b \left (1+n \right )}-\frac {\left (\frac {1}{2}\right )^{n} \left (2 \ln \left ({\mathrm e}^{b x +a}\right )-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right ) \left (-\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )\right ) \left (-\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )\right )}{2}-i \pi -i \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2} \left (\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )-1\right )\right )^{2+n}}{4 b^{2} \left (1+n \right ) \left (2+n \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.54, size = 101, normalized size = 2.10 \[ \frac {{\left (4 \, b^{2} {\left (n + 1\right )} x^{2} + \pi ^{2} + 4 i \, \pi a - 4 \, a^{2} + {\left (-2 i \, \pi b n + 4 \, a b n\right )} x\right )} {\left (\cosh \left (-n \log \left (-i \, \pi + 2 \, b x + 2 \, a\right )\right ) - \sinh \left (-n \log \left (-i \, \pi + 2 \, b x + 2 \, a\right )\right )\right )}}{{\left (2^{n + 2} n^{2} + 3 \cdot 2^{n + 2} n + 2^{n + 3}\right )} b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.31, size = 205, normalized size = 4.27 \[ -{\left (\frac {\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}-\frac {\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )}{2}\right )}^n\,\left (\frac {{\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\,b^2\,\left (n^2+3\,n+2\right )}-\frac {x^2\,\left (n+1\right )}{n^2+3\,n+2}+\frac {n\,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 )}{2\,b\,\left (n^2+3\,n+2\right )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \begin {cases} \frac {x^{2} \operatorname {acoth}^{n}{\left (\tanh {\relax (a )} \right )}}{2} & \text {for}\: b = 0 \\- \frac {x}{b \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}} + \frac {\log {\left (\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \right )}}{b^{2}} & \text {for}\: n = -2 \\\int \frac {x}{\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}}\, dx & \text {for}\: n = -1 \\\frac {b n x \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \operatorname {acoth}^{n}{\left (\tanh {\left (a + b x \right )} \right )}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {2 b x \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \operatorname {acoth}^{n}{\left (\tanh {\left (a + b x \right )} \right )}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} - \frac {\operatorname {acoth}^{2}{\left (\tanh {\left (a + b x \right )} \right )} \operatorname {acoth}^{n}{\left (\tanh {\left (a + b x \right )} \right )}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________