Integrand size = 17, antiderivative size = 31 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh ^5(a+b x)}{5 b} \] Output:
1/3*tanh(b*x+a)^3/b-1/5*tanh(b*x+a)^5/b
Time = 0.12 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.81 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=\frac {2 \tanh (a+b x)}{15 b}+\frac {\text {sech}^2(a+b x) \tanh (a+b x)}{15 b}-\frac {\text {sech}^4(a+b x) \tanh (a+b x)}{5 b} \] Input:
Integrate[Sech[a + b*x]^4*Tanh[a + b*x]^2,x]
Output:
(2*Tanh[a + b*x])/(15*b) + (Sech[a + b*x]^2*Tanh[a + b*x])/(15*b) - (Sech[ a + b*x]^4*Tanh[a + b*x])/(5*b)
Result contains complex when optimal does not.
Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.16, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3042, 25, 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 \tanh ^2(a+b x) \text {sech}^4(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (i a+i b x)^2 \left (-\sec (i a+i b x)^4\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \sec (i a+i b x)^4 \tan (i a+i b x)^2dx\) |
\(\Big \downarrow \) 3087 |
\(\displaystyle \frac {i \int -\tanh ^2(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 ^4(a+b x)-\tanh ^2(a+b x)\right )d(i \tanh (a+b x))}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {i \left (\frac {1}{5} i \tanh ^5(a+b x)-\frac {1}{3} i \tanh ^3(a+b x)\right )}{b}\) |
Input:
Int[Sech[a + b*x]^4*Tanh[a + b*x]^2,x]
Output:
(I*((-1/3*I)*Tanh[a + b*x]^3 + (I/5)*Tanh[a + b*x]^5))/b
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 = 5.50 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.84
method | result | size |
derivativedivides | \(\frac {-\frac {\tanh \left (b x +a \right )^{5}}{5}+\frac {\tanh \left (b x +a \right )^{3}}{3}}{b}\) | \(26\) |
default | \(\frac {-\frac {\tanh \left (b x +a \right )^{5}}{5}+\frac {\tanh \left (b x +a \right )^{3}}{3}}{b}\) | \(26\) |
risch | \(-\frac {4 \left (15 \,{\mathrm e}^{6 b x +6 a}-5 \,{\mathrm e}^{4 b x +4 a}+5 \,{\mathrm e}^{2 b x +2 a}+1\right )}{15 b \left ({\mathrm e}^{2 b x +2 a}+1\right )^{5}}\) | \(54\) |
Input:
int(sech(b*x+a)^4*tanh(b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
1/b*(-1/5*tanh(b*x+a)^5+1/3*tanh(b*x+a)^3)
Leaf count of result is larger than twice the leaf count of optimal. 304 vs. \(2 (27) = 54\).
Time = 0.08 (sec) , antiderivative size = 304, normalized size of antiderivative = 9.81 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=-\frac {8 \, {\left (8 \, \cosh \left (b x + a\right )^{3} + 24 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{2} + 7 \, \sinh \left (b x + a\right )^{3} + {\left (21 \, \cosh \left (b x + a\right )^{2} - 5\right )} \sinh \left (b x + a\right )\right )}}{15 \, {\left (b \cosh \left (b x + a\right )^{7} + 7 \, b \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{6} + b \sinh \left (b x + a\right )^{7} + 5 \, b \cosh \left (b x + a\right )^{5} + {\left (21 \, b \cosh \left (b x + a\right )^{2} + 5 \, b\right )} \sinh \left (b x + a\right )^{5} + 5 \, {\left (7 \, b \cosh \left (b x + a\right )^{3} + 5 \, b \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right )^{4} + 11 \, b \cosh \left (b x + a\right )^{3} + {\left (35 \, b \cosh \left (b x + a\right )^{4} + 50 \, b \cosh \left (b x + a\right )^{2} + 9 \, b\right )} \sinh \left (b x + a\right )^{3} + {\left (21 \, b \cosh \left (b x + a\right )^{5} + 50 \, b \cosh \left (b x + a\right )^{3} + 33 \, b \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right )^{2} + 15 \, b \cosh \left (b x + a\right ) + {\left (7 \, b \cosh \left (b x + a\right )^{6} + 25 \, b \cosh \left (b x + a\right )^{4} + 27 \, b \cosh \left (b x + a\right )^{2} + 5 \, b\right )} \sinh \left (b x + a\right )\right )}} \] Input:
integrate(sech(b*x+a)^4*tanh(b*x+a)^2,x, algorithm="fricas")
Output:
-8/15*(8*cosh(b*x + a)^3 + 24*cosh(b*x + a)*sinh(b*x + a)^2 + 7*sinh(b*x + a)^3 + (21*cosh(b*x + a)^2 - 5)*sinh(b*x + a))/(b*cosh(b*x + a)^7 + 7*b*c osh(b*x + a)*sinh(b*x + a)^6 + b*sinh(b*x + a)^7 + 5*b*cosh(b*x + a)^5 + ( 21*b*cosh(b*x + a)^2 + 5*b)*sinh(b*x + a)^5 + 5*(7*b*cosh(b*x + a)^3 + 5*b *cosh(b*x + a))*sinh(b*x + a)^4 + 11*b*cosh(b*x + a)^3 + (35*b*cosh(b*x + a)^4 + 50*b*cosh(b*x + a)^2 + 9*b)*sinh(b*x + a)^3 + (21*b*cosh(b*x + a)^5 + 50*b*cosh(b*x + a)^3 + 33*b*cosh(b*x + a))*sinh(b*x + a)^2 + 15*b*cosh( b*x + a) + (7*b*cosh(b*x + a)^6 + 25*b*cosh(b*x + a)^4 + 27*b*cosh(b*x + a )^2 + 5*b)*sinh(b*x + a))
\[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=\int \tanh ^{2}{\left (a + b x \right )} \operatorname {sech}^{4}{\left (a + b x \right )}\, dx \] Input:
integrate(sech(b*x+a)**4*tanh(b*x+a)**2,x)
Output:
Integral(tanh(a + b*x)**2*sech(a + b*x)**4, x)
Leaf count of result is larger than twice the leaf count of optimal. 276 vs. \(2 (27) = 54\).
Time = 0.04 (sec) , antiderivative size = 276, normalized size of antiderivative = 8.90 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=\frac {4 \, e^{\left (-2 \, b x - 2 \, a\right )}}{3 \, b {\left (5 \, e^{\left (-2 \, b x - 2 \, a\right )} + 10 \, e^{\left (-4 \, b x - 4 \, a\right )} + 10 \, e^{\left (-6 \, b x - 6 \, a\right )} + 5 \, e^{\left (-8 \, b x - 8 \, a\right )} + e^{\left (-10 \, b x - 10 \, a\right )} + 1\right )}} - \frac {4 \, e^{\left (-4 \, b x - 4 \, a\right )}}{3 \, b {\left (5 \, e^{\left (-2 \, b x - 2 \, a\right )} + 10 \, e^{\left (-4 \, b x - 4 \, a\right )} + 10 \, e^{\left (-6 \, b x - 6 \, a\right )} + 5 \, e^{\left (-8 \, b x - 8 \, a\right )} + e^{\left (-10 \, b x - 10 \, a\right )} + 1\right )}} + \frac {4 \, e^{\left (-6 \, b x - 6 \, a\right )}}{b {\left (5 \, e^{\left (-2 \, b x - 2 \, a\right )} + 10 \, e^{\left (-4 \, b x - 4 \, a\right )} + 10 \, e^{\left (-6 \, b x - 6 \, a\right )} + 5 \, e^{\left (-8 \, b x - 8 \, a\right )} + e^{\left (-10 \, b x - 10 \, a\right )} + 1\right )}} + \frac {4}{15 \, b {\left (5 \, e^{\left (-2 \, b x - 2 \, a\right )} + 10 \, e^{\left (-4 \, b x - 4 \, a\right )} + 10 \, e^{\left (-6 \, b x - 6 \, a\right )} + 5 \, e^{\left (-8 \, b x - 8 \, a\right )} + e^{\left (-10 \, b x - 10 \, a\right )} + 1\right )}} \] Input:
integrate(sech(b*x+a)^4*tanh(b*x+a)^2,x, algorithm="maxima")
Output:
4/3*e^(-2*b*x - 2*a)/(b*(5*e^(-2*b*x - 2*a) + 10*e^(-4*b*x - 4*a) + 10*e^( -6*b*x - 6*a) + 5*e^(-8*b*x - 8*a) + e^(-10*b*x - 10*a) + 1)) - 4/3*e^(-4* b*x - 4*a)/(b*(5*e^(-2*b*x - 2*a) + 10*e^(-4*b*x - 4*a) + 10*e^(-6*b*x - 6 *a) + 5*e^(-8*b*x - 8*a) + e^(-10*b*x - 10*a) + 1)) + 4*e^(-6*b*x - 6*a)/( b*(5*e^(-2*b*x - 2*a) + 10*e^(-4*b*x - 4*a) + 10*e^(-6*b*x - 6*a) + 5*e^(- 8*b*x - 8*a) + e^(-10*b*x - 10*a) + 1)) + 4/15/(b*(5*e^(-2*b*x - 2*a) + 10 *e^(-4*b*x - 4*a) + 10*e^(-6*b*x - 6*a) + 5*e^(-8*b*x - 8*a) + e^(-10*b*x - 10*a) + 1))
Time = 0.13 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.71 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=-\frac {4 \, {\left (15 \, e^{\left (6 \, b x + 6 \, a\right )} - 5 \, e^{\left (4 \, b x + 4 \, a\right )} + 5 \, e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}}{15 \, b {\left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}^{5}} \] Input:
integrate(sech(b*x+a)^4*tanh(b*x+a)^2,x, algorithm="giac")
Output:
-4/15*(15*e^(6*b*x + 6*a) - 5*e^(4*b*x + 4*a) + 5*e^(2*b*x + 2*a) + 1)/(b* (e^(2*b*x + 2*a) + 1)^5)
Time = 1.00 (sec) , antiderivative size = 270, normalized size of antiderivative = 8.71 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=\frac {\frac {8}{15\,b}-\frac {4\,{\mathrm {e}}^{2\,a+2\,b\,x}}{5\,b}}{3\,{\mathrm {e}}^{2\,a+2\,b\,x}+3\,{\mathrm {e}}^{4\,a+4\,b\,x}+{\mathrm {e}}^{6\,a+6\,b\,x}+1}-\frac {\frac {2}{5\,b}-\frac {8\,{\mathrm {e}}^{2\,a+2\,b\,x}}{5\,b}+\frac {6\,{\mathrm {e}}^{4\,a+4\,b\,x}}{5\,b}}{4\,{\mathrm {e}}^{2\,a+2\,b\,x}+6\,{\mathrm {e}}^{4\,a+4\,b\,x}+4\,{\mathrm {e}}^{6\,a+6\,b\,x}+{\mathrm {e}}^{8\,a+8\,b\,x}+1}-\frac {\frac {8\,{\mathrm {e}}^{2\,a+2\,b\,x}}{5\,b}-\frac {16\,{\mathrm {e}}^{4\,a+4\,b\,x}}{5\,b}+\frac {8\,{\mathrm {e}}^{6\,a+6\,b\,x}}{5\,b}}{5\,{\mathrm {e}}^{2\,a+2\,b\,x}+10\,{\mathrm {e}}^{4\,a+4\,b\,x}+10\,{\mathrm {e}}^{6\,a+6\,b\,x}+5\,{\mathrm {e}}^{8\,a+8\,b\,x}+{\mathrm {e}}^{10\,a+10\,b\,x}+1}-\frac {2}{5\,b\,\left (2\,{\mathrm {e}}^{2\,a+2\,b\,x}+{\mathrm {e}}^{4\,a+4\,b\,x}+1\right )} \] Input:
int(tanh(a + b*x)^2/cosh(a + b*x)^4,x)
Output:
(8/(15*b) - (4*exp(2*a + 2*b*x))/(5*b))/(3*exp(2*a + 2*b*x) + 3*exp(4*a + 4*b*x) + exp(6*a + 6*b*x) + 1) - (2/(5*b) - (8*exp(2*a + 2*b*x))/(5*b) + ( 6*exp(4*a + 4*b*x))/(5*b))/(4*exp(2*a + 2*b*x) + 6*exp(4*a + 4*b*x) + 4*ex p(6*a + 6*b*x) + exp(8*a + 8*b*x) + 1) - ((8*exp(2*a + 2*b*x))/(5*b) - (16 *exp(4*a + 4*b*x))/(5*b) + (8*exp(6*a + 6*b*x))/(5*b))/(5*exp(2*a + 2*b*x) + 10*exp(4*a + 4*b*x) + 10*exp(6*a + 6*b*x) + 5*exp(8*a + 8*b*x) + exp(10 *a + 10*b*x) + 1) - 2/(5*b*(2*exp(2*a + 2*b*x) + exp(4*a + 4*b*x) + 1))
Time = 0.22 (sec) , antiderivative size = 105, normalized size of antiderivative = 3.39 \[ \int \text {sech}^4(a+b x) \tanh ^2(a+b x) \, dx=\frac {-4 e^{6 b x +6 a}+\frac {4 e^{4 b x +4 a}}{3}-\frac {4 e^{2 b x +2 a}}{3}-\frac {4}{15}}{b \left (e^{10 b x +10 a}+5 e^{8 b x +8 a}+10 e^{6 b x +6 a}+10 e^{4 b x +4 a}+5 e^{2 b x +2 a}+1\right )} \] Input:
int(sech(b*x+a)^4*tanh(b*x+a)^2,x)
Output:
(4*( - 15*e**(6*a + 6*b*x) + 5*e**(4*a + 4*b*x) - 5*e**(2*a + 2*b*x) - 1)) /(15*b*(e**(10*a + 10*b*x) + 5*e**(8*a + 8*b*x) + 10*e**(6*a + 6*b*x) + 10 *e**(4*a + 4*b*x) + 5*e**(2*a + 2*b*x) + 1))