Optimal. Leaf size=154 \[ \frac {24 b^4 x^{5+m}}{(1+m) (2+m) (3+m) \left (20+9 m+m^2\right )}-\frac {24 b^3 x^{4+m} \tanh ^{-1}(\tanh (a+b x))}{(1+m) \left (24+26 m+9 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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 154, normalized size of antiderivative = 1.00, 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 = {2199, 30}
\begin {gather*} -\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 {12 b^2 x^{m+3} \tanh ^{-1}(\tanh (a+b x))^2}{m^3+6 m^2+11 m+6}-\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 )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2199
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.11, size = 137, normalized size = 0.89 \begin {gather*} \frac {x^{1+m} \left (24 b^4 x^4-24 b^3 (5+m) x^3 \tanh ^{-1}(\tanh (a+b x))+12 b^2 \left (20+9 m+m^2\right ) x^2 \tanh ^{-1}(\tanh (a+b x))^2-4 b \left (60+47 m+12 m^2+m^3\right ) x \tanh ^{-1}(\tanh (a+b x))^3+\left (120+154 m+71 m^2+14 m^3+m^4\right ) \tanh ^{-1}(\tanh (a+b x))^4\right )}{(1+m) (2+m) (3+m) (4+m) (5+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 33.39, size = 278, normalized size = 1.81
method | result | size |
default | \(\frac {b^{4} x^{5} {\mathrm e}^{m \ln \left (x \right )}}{5+m}+\frac {\left (a^{4}+4 a^{3} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )+6 a^{2} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}+4 a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{3}+\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{4}\right ) x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}+\frac {4 b \left (a^{3}+3 a^{2} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )+3 a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}+\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{3}\right ) x^{2} {\mathrm e}^{m \ln \left (x \right )}}{2+m}+\frac {6 b^{2} \left (a^{2}+2 a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )+\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}\right ) x^{3} {\mathrm e}^{m \ln \left (x \right )}}{3+m}+\frac {4 b^{3} \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x \right ) x^{4} {\mathrm e}^{m \ln \left (x \right )}}{4+m}\) | \(278\) |
risch | \(\text {Expression too large to display}\) | \(94967\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.39, size = 145, normalized size = 0.94 \begin {gather*} -\frac {4 \, b x^{2} x^{m} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{3}}{{\left (m + 2\right )} {\left (m + 1\right )}} + \frac {x^{m + 1} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{4}}{m + 1} + \frac {12 \, {\left (\frac {b x^{3} x^{m} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{2}}{{\left (m + 3\right )} {\left (m + 2\right )}} + \frac {2 \, {\left (\frac {b^{2} x^{5} x^{m}}{{\left (m + 5\right )} {\left (m + 4\right )} {\left (m + 3\right )}} - \frac {b x^{4} x^{m} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )}{{\left (m + 4\right )} {\left (m + 3\right )}}\right )} b}{m + 2}\right )} b}{m + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 483 vs.
\(2 (154) = 308\).
time = 0.35, size = 483, normalized size = 3.14 \begin {gather*} \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 {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*} \begin {cases} b^{4} \log {\left (x \right )} - \frac {b^{3} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{x} - \frac {b^{2} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{2 x^{2}} - \frac {b \operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{3 x^{3}} - \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{4 x^{4}} & \text {for}\: m = -5 \\\int \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{x^{4}}\, dx & \text {for}\: m = -4 \\\int \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{x^{3}}\, dx & \text {for}\: m = -3 \\\int \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{x^{2}}\, dx & \text {for}\: m = -2 \\\int \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx & \text {for}\: m = -1 \\\frac {24 b^{4} x^{5} x^{m}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} - \frac {24 b^{3} m x^{4} x^{m} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} - \frac {120 b^{3} x^{4} x^{m} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {12 b^{2} m^{2} x^{3} x^{m} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {108 b^{2} m x^{3} x^{m} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {240 b^{2} x^{3} x^{m} \operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} - \frac {4 b m^{3} x^{2} x^{m} \operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} - \frac {48 b m^{2} x^{2} x^{m} \operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} - \frac {188 b m x^{2} x^{m} \operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} - \frac {240 b x^{2} x^{m} \operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {m^{4} x x^{m} \operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {14 m^{3} x x^{m} \operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {71 m^{2} x x^{m} \operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {154 m x x^{m} \operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} + \frac {120 x x^{m} \operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{5} + 15 m^{4} + 85 m^{3} + 225 m^{2} + 274 m + 120} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.34, size = 479, normalized size = 3.11 \begin {gather*} \frac {x\,x^m\,{\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 )}^4\,\left (m^4+14\,m^3+71\,m^2+154\,m+120\right )}{16\,m^5+240\,m^4+1360\,m^3+3600\,m^2+4384\,m+1920}+\frac {16\,b^4\,x^m\,x^5\,\left (m^4+10\,m^3+35\,m^2+50\,m+24\right )}{16\,m^5+240\,m^4+1360\,m^3+3600\,m^2+4384\,m+1920}+\frac {24\,b^2\,x^m\,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 )}^2\,\left (m^4+12\,m^3+49\,m^2+78\,m+40\right )}{16\,m^5+240\,m^4+1360\,m^3+3600\,m^2+4384\,m+1920}-\frac {32\,b^3\,x^m\,x^4\,\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 )\,\left (m^4+11\,m^3+41\,m^2+61\,m+30\right )}{16\,m^5+240\,m^4+1360\,m^3+3600\,m^2+4384\,m+1920}-\frac {8\,b\,x^m\,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 )}^3\,\left (m^4+13\,m^3+59\,m^2+107\,m+60\right )}{16\,m^5+240\,m^4+1360\,m^3+3600\,m^2+4384\,m+1920} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________