Optimal. Leaf size=20 \[ \frac {\coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2188, 30}
\begin {gather*} \frac {\coth ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2188
Rubi steps
\begin {align*} \int \coth ^{-1}(\tanh (a+b x))^n \, dx &=\frac {\text {Subst}\left (\int x^n \, dx,x,\coth ^{-1}(\tanh (a+b x))\right )}{b}\\ &=\frac {\coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 20, normalized size = 1.00 \begin {gather*} \frac {\coth ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 9.02, size = 21, normalized size = 1.05
method | result | size |
derivativedivides | \(\frac {\mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )^{1+n}}{b \left (1+n \right )}\) | \(21\) |
default | \(\frac {\mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )^{1+n}}{b \left (1+n \right )}\) | \(21\) |
risch | \(\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}}{2 b \left (1+n \right )}\) | \(237\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.53, size = 65, normalized size = 3.25 \begin {gather*} \frac {{\left (-i \, \pi + 2 \, b x + 2 \, a\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 + 1} n + 2^{n + 1}\right )} b} \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. 164 vs.
\(2 (20) = 40\).
time = 0.34, size = 164, normalized size = 8.20 \begin {gather*} \frac {2 \, {\left (b x + a\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 ) - \pi {\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 )}{2 \, {\left (b n + b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 51 vs.
\(2 (15) = 30\).
time = 0.19, size = 51, normalized size = 2.55 \begin {gather*} \begin {cases} \frac {x}{\operatorname {acoth}{\left (\tanh {\left (a \right )} \right )}} & \text {for}\: b = 0 \wedge n = -1 \\x \operatorname {acoth}^{n}{\left (\tanh {\left (a \right )} \right )} & \text {for}\: b = 0 \\\frac {\log {\left (\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \right )}}{b} & \text {for}\: n = -1 \\\frac {\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \operatorname {acoth}^{n}{\left (\tanh {\left (a + b x \right )} \right )}}{b n + b} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 27, normalized size = 1.35 \begin {gather*} \frac {\left (\frac {1}{2} \, \log \left (-e^{\left (2 \, b x + 2 \, a\right )}\right )\right )^{n + 1}}{b {\left (n + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.27, size = 121, normalized size = 6.05 \begin {gather*} {\left (\frac {1}{2}\right )}^n\,\left (\frac {x}{n+1}-\frac {\frac {\ln \left (-\frac {2}{{\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}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )}{2}+b\,x}{b\,\left (n+1\right )}\right )\,{\left (\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )-\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )\right )}^n \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________