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.0442714, antiderivative size = 40, normalized size of antiderivative = 1., 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 2607
Rule 14
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.904107, 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]
________________________________________________________________________________________
Maple [C] time = 0.204, size = 535, normalized size = 13.4 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.64752, size = 680, normalized size = 17. \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.9202, size = 477, normalized size = 11.92 \begin{align*} \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 )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \tanh ^{n}{\left (a + b x \right )} \operatorname{sech}^{4}{\left (a + b x \right )}\, dx \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 \tanh \left (b x + a\right )^{n} \operatorname{sech}\left (b x + a\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]