Optimal. Leaf size=37 \[ -\frac {b x^{2+m}}{2+3 m+m^2}+\frac {x^{1+m} \coth ^{-1}(\tanh (a+b x))}{1+m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2199, 30}
\begin {gather*} \frac {x^{m+1} \coth ^{-1}(\tanh (a+b x))}{m+1}-\frac {b x^{m+2}}{m^2+3 m+2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2199
Rubi steps
\begin {align*} \int x^m \coth ^{-1}(\tanh (a+b x)) \, dx &=\frac {x^{1+m} \coth ^{-1}(\tanh (a+b x))}{1+m}-\frac {b \int x^{1+m} \, dx}{1+m}\\ &=-\frac {b x^{2+m}}{2+3 m+m^2}+\frac {x^{1+m} \coth ^{-1}(\tanh (a+b x))}{1+m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 34, normalized size = 0.92 \begin {gather*} x^m \left (\frac {b x^2}{2+m}+\frac {x \left (-b x+\coth ^{-1}(\tanh (a+b x))\right )}{1+m}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.05, size = 676, normalized size = 18.27
method | result | size |
risch | \(\frac {x \,x^{m} \ln \left ({\mathrm e}^{b x +a}\right )}{1+m}-\frac {x \left (-2 i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+2 i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}+2 i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}+4 b x -i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2} m +2 i \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3} m +2 i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+4 i \pi +i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3} m +i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3} m +i \pi \mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) m -4 i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}+4 i \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-2 i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2} m +i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right ) m -2 i \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2} m -4 i \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2} m +2 i \pi \mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )-2 i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+2 i \pi m \right ) x^{m}}{4 \left (1+m \right ) \left (2+m \right )}\) | \(676\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 38, normalized size = 1.03 \begin {gather*} -\frac {b x^{2} x^{m}}{{\left (m + 2\right )} {\left (m + 1\right )}} + \frac {x^{m + 1} \operatorname {arcoth}\left (\tanh \left (b x + a\right )\right )}{m + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 33, normalized size = 0.89 \begin {gather*} \frac {{\left ({\left (b m + b\right )} x^{2} + {\left (a m + 2 \, a\right )} x\right )} x^{m}}{m^{2} + 3 \, m + 2} \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 \log {\left (x \right )} - \frac {\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}}{x} & \text {for}\: m = -2 \\\int \frac {\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx & \text {for}\: m = -1 \\- \frac {b x^{2} x^{m}}{m^{2} + 3 m + 2} + \frac {m x x^{m} \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{2} + 3 m + 2} + \frac {2 x x^{m} \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{2} + 3 m + 2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 90 vs.
\(2 (37) = 74\).
time = 0.41, size = 90, normalized size = 2.43 \begin {gather*} \frac {x^{m + 1} \log \left (-\frac {\frac {e^{\left (2 \, b x + 2 \, a\right )} + 1}{e^{\left (2 \, b x + 2 \, a\right )} - 1} + 1}{\frac {e^{\left (2 \, b x + 2 \, a\right )} + 1}{e^{\left (2 \, b x + 2 \, a\right )} - 1} - 1}\right )}{2 \, {\left (m + 1\right )}} - \frac {b x^{m + 2}}{{\left (m + 2\right )} {\left (m + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.00, size = 96, normalized size = 2.59 \begin {gather*} \frac {2\,b\,x^m\,x^2\,\left (m+1\right )}{2\,m^2+6\,m+4}-\frac {x\,x^m\,\left (m+2\right )\,\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\,m^2+6\,m+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________