Integrand size = 17, antiderivative size = 40 \[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\frac {\tanh ^{1+n}(a+b x)}{b (1+n)}-\frac {\tanh ^{3+n}(a+b x)}{b (3+n)} \]
Time = 0.64 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.82 \[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\frac {\tanh ^{-1+n}(a+b x) \left ((2+n+\cosh (2 (a+b x))) \text {sech}^2(a+b x) \tanh ^2(a+b x)-2 \tanh ^2(a+b x)^{\frac {1-n}{2}}\right )}{b (1+n) (3+n)} \]
(Tanh[a + b*x]^(-1 + n)*((2 + n + Cosh[2*(a + b*x)])*Sech[a + b*x]^2*Tanh[ a + b*x]^2 - 2*(Tanh[a + b*x]^2)^((1 - n)/2)))/(b*(1 + n)*(3 + n))
Result contains complex when optimal does not.
Time = 0.24 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.15, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3042, 3087, 244, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (i a+i b x)^4 (-i \tan (i a+i b x))^ndx\) |
\(\Big \downarrow \) 3087 |
\(\displaystyle -\frac {i \int \tanh ^n(a+b x) \left (1-\tanh ^2(a+b x)\right )d(i \tanh (a+b x))}{b}\) |
\(\Big \downarrow \) 244 |
\(\displaystyle -\frac {i \int \left (\tanh ^n(a+b x)-\tanh ^{n+2}(a+b x)\right )d(i \tanh (a+b x))}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i \left (\frac {i \tanh ^{n+1}(a+b x)}{n+1}-\frac {i \tanh ^{n+3}(a+b x)}{n+3}\right )}{b}\) |
3.1.92.3.1 Defintions of rubi rules used
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && IGtQ[p , 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S ymbol] :> Simp[1/f Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] && !(IntegerQ[(n - 1) /2] && LtQ[0, n, m - 1])
Time = 117.68 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.38
method | result | size |
derivativedivides | \(\frac {\tanh \left (b x +a \right ) {\mathrm e}^{n \ln \left (\tanh \left (b x +a \right )\right )}}{b \left (n +1\right )}-\frac {\tanh \left (b x +a \right )^{3} {\mathrm e}^{n \ln \left (\tanh \left (b x +a \right )\right )}}{b \left (3+n \right )}\) | \(55\) |
default | \(\frac {\tanh \left (b x +a \right ) {\mathrm e}^{n \ln \left (\tanh \left (b x +a \right )\right )}}{b \left (n +1\right )}-\frac {\tanh \left (b x +a \right )^{3} {\mathrm e}^{n \ln \left (\tanh \left (b x +a \right )\right )}}{b \left (3+n \right )}\) | \(55\) |
risch | \(\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 n \,{\mathrm e}^{2 b x +2 a}-3 \,{\mathrm e}^{2 b x +2 a}-1\right ) \left ({\mathrm e}^{b x +a}-1\right )^{n} \left ({\mathrm e}^{b x +a}+1\right )^{n} \left (1+{\mathrm e}^{2 b x +2 a}\right )^{-n} {\mathrm e}^{-\frac {i \pi n \left (-\operatorname {csgn}\left (\frac {i}{1+{\mathrm e}^{2 b x +2 a}}\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )}^{2}+\operatorname {csgn}\left (\frac {i}{1+{\mathrm e}^{2 b x +2 a}}\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{b x +a}+1\right )\right )+{\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right ) \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )}^{3}-{\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right ) \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )}^{2} \operatorname {csgn}\left (i \left ({\mathrm e}^{b x +a}-1\right )\right )-{\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right ) \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )}^{2} \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )+\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}-1\right ) \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{b x +a}-1\right )\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )+{\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )}^{3}-{\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{b x +a}+1\right )}{1+{\mathrm e}^{2 b x +2 a}}\right )}^{2} \operatorname {csgn}\left (i \left ({\mathrm e}^{b x +a}+1\right )\right )\right )}{2}}}{b \left (n +1\right ) \left (3+n \right ) \left (1+{\mathrm e}^{2 b x +2 a}\right )^{3}}\) | \(514\) |
Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (40) = 80\).
Time = 0.27 (sec) , antiderivative size = 180, normalized size of antiderivative = 4.50 \[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\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 )} \]
2*((sinh(b*x + a)^3 + (3*cosh(b*x + a)^2 + 2*n + 3)*sinh(b*x + a))*cosh(n* log(sinh(b*x + a)/cosh(b*x + a))) + (sinh(b*x + a)^3 + (3*cosh(b*x + a)^2 + 2*n + 3)*sinh(b*x + a))*sinh(n*log(sinh(b*x + a)/cosh(b*x + a))))/((b*n^ 2 + 4*b*n + 3*b)*cosh(b*x + a)^3 + 3*(b*n^2 + 4*b*n + 3*b)*cosh(b*x + a)*s inh(b*x + a)^2 + 3*(b*n^2 + 4*b*n + 3*b)*cosh(b*x + a))
\[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\int \tanh ^{n}{\left (a + b x \right )} \operatorname {sech}^{4}{\left (a + b x \right )}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 504 vs. \(2 (40) = 80\).
Time = 0.30 (sec) , antiderivative size = 504, normalized size of antiderivative = 12.60 \[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\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} \]
2*(2*n + 3)*e^(-2*b*x + n*log(e^(-b*x - a) + 1) + n*log(-e^(-b*x - a) + 1) - n*log(e^(-2*b*x - 2*a) + 1) - 2*a)/((n^2 + 3*(n^2 + 4*n + 3)*e^(-2*b*x - 2*a) + 3*(n^2 + 4*n + 3)*e^(-4*b*x - 4*a) + (n^2 + 4*n + 3)*e^(-6*b*x - 6*a) + 4*n + 3)*b) - 2*(2*n + 3)*e^(-4*b*x + n*log(e^(-b*x - a) + 1) + n*l og(-e^(-b*x - a) + 1) - n*log(e^(-2*b*x - 2*a) + 1) - 4*a)/((n^2 + 3*(n^2 + 4*n + 3)*e^(-2*b*x - 2*a) + 3*(n^2 + 4*n + 3)*e^(-4*b*x - 4*a) + (n^2 + 4*n + 3)*e^(-6*b*x - 6*a) + 4*n + 3)*b) - 2*e^(-6*b*x + n*log(e^(-b*x - a) + 1) + n*log(-e^(-b*x - a) + 1) - n*log(e^(-2*b*x - 2*a) + 1) - 6*a)/((n^ 2 + 3*(n^2 + 4*n + 3)*e^(-2*b*x - 2*a) + 3*(n^2 + 4*n + 3)*e^(-4*b*x - 4*a ) + (n^2 + 4*n + 3)*e^(-6*b*x - 6*a) + 4*n + 3)*b) + 2*e^(n*log(e^(-b*x - a) + 1) + n*log(-e^(-b*x - a) + 1) - n*log(e^(-2*b*x - 2*a) + 1))/((n^2 + 3*(n^2 + 4*n + 3)*e^(-2*b*x - 2*a) + 3*(n^2 + 4*n + 3)*e^(-4*b*x - 4*a) + (n^2 + 4*n + 3)*e^(-6*b*x - 6*a) + 4*n + 3)*b)
\[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\int { \tanh \left (b x + a\right )^{n} \operatorname {sech}\left (b x + a\right )^{4} \,d x } \]
Time = 2.33 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.88 \[ \int \text {sech}^4(a+b x) \tanh ^n(a+b x) \, dx=\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} \]