Optimal. Leaf size=154 \[ \frac{12 b^2 x^{m+3} \tanh ^{-1}(\tanh (a+b x))^2}{m^3+6 m^2+11 m+6}-\frac{24 b^3 x^{m+4} \tanh ^{-1}(\tanh (a+b x))}{(m+1) \left (m^3+9 m^2+26 m+24\right )}-\frac{4 b x^{m+2} \tanh ^{-1}(\tanh (a+b x))^3}{m^2+3 m+2}+\frac{x^{m+1} \tanh ^{-1}(\tanh (a+b x))^4}{m+1}+\frac{24 b^4 x^{m+5}}{(m+1) (m+2) (m+3) \left (m^2+9 m+20\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0989838, antiderivative size = 154, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2168, 30} \[ \frac{12 b^2 x^{m+3} \tanh ^{-1}(\tanh (a+b x))^2}{m^3+6 m^2+11 m+6}-\frac{24 b^3 x^{m+4} \tanh ^{-1}(\tanh (a+b x))}{(m+1) \left (m^3+9 m^2+26 m+24\right )}-\frac{4 b x^{m+2} \tanh ^{-1}(\tanh (a+b x))^3}{m^2+3 m+2}+\frac{x^{m+1} \tanh ^{-1}(\tanh (a+b x))^4}{m+1}+\frac{24 b^4 x^{m+5}}{(m+1) (m+2) (m+3) \left (m^2+9 m+20\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2168
Rule 30
Rubi steps
\begin{align*} \int x^m \tanh ^{-1}(\tanh (a+b x))^4 \, dx &=\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}-\frac{(4 b) \int x^{1+m} \tanh ^{-1}(\tanh (a+b x))^3 \, dx}{1+m}\\ &=-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}+\frac{\left (12 b^2\right ) \int x^{2+m} \tanh ^{-1}(\tanh (a+b x))^2 \, dx}{2+3 m+m^2}\\ &=\frac{12 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))^2}{6+11 m+6 m^2+m^3}-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}-\frac{\left (24 b^3\right ) \int x^{3+m} \tanh ^{-1}(\tanh (a+b x)) \, dx}{6+11 m+6 m^2+m^3}\\ &=-\frac{24 b^3 x^{4+m} \tanh ^{-1}(\tanh (a+b x))}{(4+m) \left (6+11 m+6 m^2+m^3\right )}+\frac{12 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))^2}{6+11 m+6 m^2+m^3}-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}+\frac{\left (24 b^4\right ) \int x^{4+m} \, dx}{(4+m) \left (6+11 m+6 m^2+m^3\right )}\\ &=\frac{24 b^4 x^{5+m}}{(4+m) (5+m) \left (6+11 m+6 m^2+m^3\right )}-\frac{24 b^3 x^{4+m} \tanh ^{-1}(\tanh (a+b x))}{(4+m) \left (6+11 m+6 m^2+m^3\right )}+\frac{12 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))^2}{6+11 m+6 m^2+m^3}-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}\\ \end{align*}
Mathematica [A] time = 0.142082, size = 137, normalized size = 0.89 \[ \frac{x^{m+1} \left (12 b^2 \left (m^2+9 m+20\right ) x^2 \tanh ^{-1}(\tanh (a+b x))^2-24 b^3 (m+5) x^3 \tanh ^{-1}(\tanh (a+b x))-4 b \left (m^3+12 m^2+47 m+60\right ) x \tanh ^{-1}(\tanh (a+b x))^3+\left (m^4+14 m^3+71 m^2+154 m+120\right ) \tanh ^{-1}(\tanh (a+b x))^4+24 b^4 x^4\right )}{(m+1) (m+2) (m+3) (m+4) (m+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 278, normalized size = 1.8 \begin{align*}{\frac{{b}^{4}{x}^{5}{{\rm e}^{m\ln \left ( x \right ) }}}{5+m}}+{\frac{ \left ({a}^{4}+4\,{a}^{3} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) +6\,{a}^{2} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2}+4\,a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{3}+ \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{4} \right ) x{{\rm e}^{m\ln \left ( x \right ) }}}{1+m}}+4\,{\frac{b \left ({a}^{3}+3\,{a}^{2} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) +3\,a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2}+ \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{3} \right ){x}^{2}{{\rm e}^{m\ln \left ( x \right ) }}}{2+m}}+6\,{\frac{{b}^{2} \left ({a}^{2}+2\,a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) + \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2} \right ){x}^{3}{{\rm e}^{m\ln \left ( x \right ) }}}{3+m}}+4\,{\frac{{b}^{3} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx \right ){x}^{4}{{\rm e}^{m\ln \left ( x \right ) }}}{4+m}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.593, size = 1076, normalized size = 6.99 \begin{align*} \frac{{\left ({\left (b^{4} m^{4} + 10 \, b^{4} m^{3} + 35 \, b^{4} m^{2} + 50 \, b^{4} m + 24 \, b^{4}\right )} x^{5} + 4 \,{\left (a b^{3} m^{4} + 11 \, a b^{3} m^{3} + 41 \, a b^{3} m^{2} + 61 \, a b^{3} m + 30 \, a b^{3}\right )} x^{4} + 6 \,{\left (a^{2} b^{2} m^{4} + 12 \, a^{2} b^{2} m^{3} + 49 \, a^{2} b^{2} m^{2} + 78 \, a^{2} b^{2} m + 40 \, a^{2} b^{2}\right )} x^{3} + 4 \,{\left (a^{3} b m^{4} + 13 \, a^{3} b m^{3} + 59 \, a^{3} b m^{2} + 107 \, a^{3} b m + 60 \, a^{3} b\right )} x^{2} +{\left (a^{4} m^{4} + 14 \, a^{4} m^{3} + 71 \, a^{4} m^{2} + 154 \, a^{4} m + 120 \, a^{4}\right )} x\right )} \cosh \left (m \log \left (x\right )\right ) +{\left ({\left (b^{4} m^{4} + 10 \, b^{4} m^{3} + 35 \, b^{4} m^{2} + 50 \, b^{4} m + 24 \, b^{4}\right )} x^{5} + 4 \,{\left (a b^{3} m^{4} + 11 \, a b^{3} m^{3} + 41 \, a b^{3} m^{2} + 61 \, a b^{3} m + 30 \, a b^{3}\right )} x^{4} + 6 \,{\left (a^{2} b^{2} m^{4} + 12 \, a^{2} b^{2} m^{3} + 49 \, a^{2} b^{2} m^{2} + 78 \, a^{2} b^{2} m + 40 \, a^{2} b^{2}\right )} x^{3} + 4 \,{\left (a^{3} b m^{4} + 13 \, a^{3} b m^{3} + 59 \, a^{3} b m^{2} + 107 \, a^{3} b m + 60 \, a^{3} b\right )} x^{2} +{\left (a^{4} m^{4} + 14 \, a^{4} m^{3} + 71 \, a^{4} m^{2} + 154 \, a^{4} m + 120 \, a^{4}\right )} x\right )} \sinh \left (m \log \left (x\right )\right )}{m^{5} + 15 \, m^{4} + 85 \, m^{3} + 225 \, m^{2} + 274 \, m + 120} \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^{m} \operatorname{artanh}\left (\tanh \left (b x + a\right )\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]