Optimal. Leaf size=121 \[ -\frac{3 x^2 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b^2 (n+1) (n+2)}+\frac{6 x \coth ^{-1}(\tanh (a+b x))^{n+3}}{b^3 (n+1) (n+2) (n+3)}-\frac{6 \coth ^{-1}(\tanh (a+b x))^{n+4}}{b^4 (n+1) (n+2) (n+3) (n+4)}+\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0796348, antiderivative size = 121, normalized size of antiderivative = 1., 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 = {2168, 2157, 30} \[ -\frac{3 x^2 \coth ^{-1}(\tanh (a+b x))^{n+2}}{b^2 (n+1) (n+2)}+\frac{6 x \coth ^{-1}(\tanh (a+b x))^{n+3}}{b^3 (n+1) (n+2) (n+3)}-\frac{6 \coth ^{-1}(\tanh (a+b x))^{n+4}}{b^4 (n+1) (n+2) (n+3) (n+4)}+\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2168
Rule 2157
Rule 30
Rubi steps
\begin{align*} \int x^3 \coth ^{-1}(\tanh (a+b x))^n \, dx &=\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{3 \int x^2 \coth ^{-1}(\tanh (a+b x))^{1+n} \, dx}{b (1+n)}\\ &=\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{3 x^2 \coth ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}+\frac{6 \int x \coth ^{-1}(\tanh (a+b x))^{2+n} \, dx}{b^2 (1+n) (2+n)}\\ &=\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{3 x^2 \coth ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}+\frac{6 x \coth ^{-1}(\tanh (a+b x))^{3+n}}{b^3 (1+n) (2+n) (3+n)}-\frac{6 \int \coth ^{-1}(\tanh (a+b x))^{3+n} \, dx}{b^3 (1+n) (2+n) (3+n)}\\ &=\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{3 x^2 \coth ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}+\frac{6 x \coth ^{-1}(\tanh (a+b x))^{3+n}}{b^3 (1+n) (2+n) (3+n)}-\frac{6 \operatorname{Subst}\left (\int x^{3+n} \, dx,x,\coth ^{-1}(\tanh (a+b x))\right )}{b^4 (1+n) (2+n) (3+n)}\\ &=\frac{x^3 \coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{3 x^2 \coth ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}+\frac{6 x \coth ^{-1}(\tanh (a+b x))^{3+n}}{b^3 (1+n) (2+n) (3+n)}-\frac{6 \coth ^{-1}(\tanh (a+b x))^{4+n}}{b^4 (1+n) (2+n) (3+n) (4+n)}\\ \end{align*}
Mathematica [A] time = 0.0773392, size = 106, normalized size = 0.88 \[ \frac{\coth ^{-1}(\tanh (a+b x))^{n+1} \left (-3 b^2 \left (n^2+7 n+12\right ) x^2 \coth ^{-1}(\tanh (a+b x))+6 b (n+4) x \coth ^{-1}(\tanh (a+b x))^2-6 \coth ^{-1}(\tanh (a+b x))^3+b^3 \left (n^3+9 n^2+26 n+24\right ) x^3\right )}{b^4 (n+1) (n+2) (n+3) (n+4)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 36.951, size = 953037, normalized size = 7876.3 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.79852, size = 344, normalized size = 2.84 \begin{align*} \frac{{\left (8 \,{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{4} x^{4} - 3 \, \pi ^{4} - 24 i \, \pi ^{3} a + 72 \, \pi ^{2} a^{2} + 96 i \, \pi a^{3} - 48 \, a^{4} +{\left (-4 i \, \pi{\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} b^{3} + 8 \,{\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} a b^{3}\right )} x^{3} +{\left (6 \, \pi ^{2}{\left (n^{2} + n\right )} b^{2} + 24 i \, \pi{\left (n^{2} + n\right )} a b^{2} - 24 \,{\left (n^{2} + n\right )} a^{2} b^{2}\right )} x^{2} +{\left (6 i \, \pi ^{3} b n - 36 \, \pi ^{2} a b n - 72 i \, \pi a^{2} b n + 48 \, a^{3} 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 + 3} n^{4} + 5 \cdot 2^{n + 4} n^{3} + 35 \cdot 2^{n + 3} n^{2} + 25 \cdot 2^{n + 4} n + 3 \cdot 2^{n + 6}\right )} b^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.76948, size = 917, normalized size = 7.58 \begin{align*} \frac{{\left (8 \,{\left (b^{4} n^{3} + 6 \, b^{4} n^{2} + 11 \, b^{4} n + 6 \, b^{4}\right )} x^{4} - 3 \, \pi ^{4} + 72 \, \pi ^{2} a^{2} - 48 \, a^{4} + 8 \,{\left (a b^{3} n^{3} + 3 \, a b^{3} n^{2} + 2 \, a b^{3} n\right )} x^{3} - 6 \,{\left (4 \, a^{2} b^{2} n^{2} + 4 \, a^{2} b^{2} n - \pi ^{2}{\left (b^{2} n^{2} + b^{2} n\right )}\right )} x^{2} - 12 \,{\left (3 \, \pi ^{2} a b n - 4 \, a^{3} b n\right )} x\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 (2 \, \pi{\left (b^{3} n^{3} + 3 \, b^{3} n^{2} + 2 \, b^{3} n\right )} x^{3} + 12 \, \pi ^{3} a - 48 \, \pi a^{3} - 12 \, \pi{\left (a b^{2} n^{2} + a b^{2} n\right )} x^{2} - 3 \,{\left (\pi ^{3} b n - 12 \, \pi a^{2} b n\right )} x\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 )}{8 \,{\left (b^{4} n^{4} + 10 \, b^{4} n^{3} + 35 \, b^{4} n^{2} + 50 \, b^{4} n + 24 \, b^{4}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{3} \operatorname{arcoth}\left (\tanh \left (b x + a\right )\right )^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]