Optimal. Leaf size=40 \[ \frac {\tanh ^{n+1}(a+b x)}{b (n+1)}-\frac {\tanh ^{n+3}(a+b x)}{b (n+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2607, 14} \[ \frac {\tanh ^{n+1}(a+b x)}{b (n+1)}-\frac {\tanh ^{n+3}(a+b x)}{b (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2607
Rubi steps
\begin {align*} \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx &=-\frac {i \operatorname {Subst}\left (\int (-i x)^n \left (1+x^2\right ) \, dx,x,i \tanh (a+b x)\right )}{b}\\ &=-\frac {i \operatorname {Subst}\left (\int \left ((-i x)^n-(-i x)^{2+n}\right ) \, dx,x,i \tanh (a+b x)\right )}{b}\\ &=\frac {\tanh ^{1+n}(a+b x)}{b (1+n)}-\frac {\tanh ^{3+n}(a+b x)}{b (3+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.93, size = 73, normalized size = 1.82 \[ \frac {\tanh ^{n-1}(a+b x) \left (\tanh ^2(a+b x) \text {sech}^2(a+b x) (\cosh (2 (a+b x))+n+2)-2 \tanh ^2(a+b x)^{\frac {1-n}{2}}\right )}{b (n+1) (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 180, normalized size = 4.50 \[ \frac {2 \, {\left ({\left (\sinh \left (b x + a\right )^{3} + {\left (3 \, \cosh \left (b x + a\right )^{2} + 2 \, n + 3\right )} \sinh \left (b x + a\right )\right )} \cosh \left (n \log \left (\frac {\sinh \left (b x + a\right )}{\cosh \left (b x + a\right )}\right )\right ) + {\left (\sinh \left (b x + a\right )^{3} + {\left (3 \, \cosh \left (b x + a\right )^{2} + 2 \, n + 3\right )} \sinh \left (b x + a\right )\right )} \sinh \left (n \log \left (\frac {\sinh \left (b x + a\right )}{\cosh \left (b x + a\right )}\right )\right )\right )}}{{\left (b n^{2} + 4 \, b n + 3 \, b\right )} \cosh \left (b x + a\right )^{3} + 3 \, {\left (b n^{2} + 4 \, b n + 3 \, b\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{2} + 3 \, {\left (b n^{2} + 4 \, b n + 3 \, b\right )} \cosh \left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \tanh \left (b x + a\right )^{n} \operatorname {sech}\left (b x + a\right )^{4}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.69, size = 535, normalized size = 13.38 \[ \frac {2 \left ({\mathrm e}^{6 b x +6 a}+2 n \,{\mathrm e}^{4 b x +4 a}+3 \,{\mathrm e}^{4 b x +4 a}-2 \,{\mathrm e}^{2 b x +2 a} n -3 \,{\mathrm e}^{2 b x +2 a}-1\right ) {\mathrm e}^{\frac {n \left (-i \pi \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )^{3}+i \pi \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )^{2} \mathrm {csgn}\left (i \left ({\mathrm e}^{b x +a}-1\right )\right )+i \pi \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )^{2} \mathrm {csgn}\left (\frac {i}{1+{\mathrm e}^{2 b x +2 a}}\right )-i \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{b x +a}-1\right )\right ) \mathrm {csgn}\left (\frac {i}{1+{\mathrm e}^{2 b x +2 a}}\right )+i \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right ) \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{b x +a}\right ) \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )^{2}-i \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right ) \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{b x +a}\right ) \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right ) \mathrm {csgn}\left (i \left (1+{\mathrm e}^{b x +a}\right )\right )-i \pi \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{b x +a}\right ) \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )^{3}+i \pi \mathrm {csgn}\left (\frac {i \left (1+{\mathrm e}^{b x +a}\right ) \left ({\mathrm e}^{b x +a}-1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )^{2} \mathrm {csgn}\left (i \left (1+{\mathrm e}^{b x +a}\right )\right )+2 \ln \left ({\mathrm e}^{b x +a}-1\right )-2 \ln \left (1+{\mathrm e}^{2 b x +2 a}\right )+2 \ln \left (1+{\mathrm e}^{b x +a}\right )\right )}{2}}}{b \left (n +1\right ) \left (n +3\right ) \left (1+{\mathrm e}^{2 b x +2 a}\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.44, size = 504, normalized size = 12.60 \[ \frac {2 \, {\left (2 \, n + 3\right )} e^{\left (-2 \, b x + n \log \left (e^{\left (-b x - a\right )} + 1\right ) + n \log \left (-e^{\left (-b x - a\right )} + 1\right ) - n \log \left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right ) - 2 \, a\right )}}{{\left (n^{2} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, b x - 2 \, a\right )} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, b x - 4 \, a\right )} + {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, b x - 6 \, a\right )} + 4 \, n + 3\right )} b} - \frac {2 \, {\left (2 \, n + 3\right )} e^{\left (-4 \, b x + n \log \left (e^{\left (-b x - a\right )} + 1\right ) + n \log \left (-e^{\left (-b x - a\right )} + 1\right ) - n \log \left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right ) - 4 \, a\right )}}{{\left (n^{2} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, b x - 2 \, a\right )} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, b x - 4 \, a\right )} + {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, b x - 6 \, a\right )} + 4 \, n + 3\right )} b} - \frac {2 \, e^{\left (-6 \, b x + n \log \left (e^{\left (-b x - a\right )} + 1\right ) + n \log \left (-e^{\left (-b x - a\right )} + 1\right ) - n \log \left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right ) - 6 \, a\right )}}{{\left (n^{2} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, b x - 2 \, a\right )} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, b x - 4 \, a\right )} + {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, b x - 6 \, a\right )} + 4 \, n + 3\right )} b} + \frac {2 \, e^{\left (n \log \left (e^{\left (-b x - a\right )} + 1\right ) + n \log \left (-e^{\left (-b x - a\right )} + 1\right ) - n \log \left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right )\right )}}{{\left (n^{2} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-2 \, b x - 2 \, a\right )} + 3 \, {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-4 \, b x - 4 \, a\right )} + {\left (n^{2} + 4 \, n + 3\right )} e^{\left (-6 \, b x - 6 \, a\right )} + 4 \, n + 3\right )} b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.61, size = 115, normalized size = 2.88 \[ \frac {{\mathrm {e}}^{-3\,a-3\,b\,x}\,\left (\frac {4\,{\mathrm {e}}^{3\,a+3\,b\,x}\,\mathrm {sinh}\left (3\,a+3\,b\,x\right )}{b\,\left (n^2+4\,n+3\right )}+\frac {2\,{\mathrm {e}}^{3\,a+3\,b\,x}\,\mathrm {sinh}\left (a+b\,x\right )\,\left (4\,n+6\right )}{b\,\left (n^2+4\,n+3\right )}\right )\,{\left (\frac {{\mathrm {e}}^{2\,a+2\,b\,x}-1}{{\mathrm {e}}^{2\,a+2\,b\,x}+1}\right )}^n}{8\,{\mathrm {cosh}\left (a+b\,x\right )}^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \tanh ^{n}{\left (a + b x \right )} \operatorname {sech}^{4}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________