Integrand size = 21, antiderivative size = 50 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=\frac {(a+b) \tanh (c+d x)}{d}-\frac {(a+2 b) \tanh ^3(c+d x)}{3 d}+\frac {b \tanh ^5(c+d x)}{5 d} \] Output:
(a+b)*tanh(d*x+c)/d-1/3*(a+2*b)*tanh(d*x+c)^3/d+1/5*b*tanh(d*x+c)^5/d
Time = 0.01 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.42 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=\frac {a \tanh (c+d x)}{d}+\frac {b \tanh (c+d x)}{d}-\frac {a \tanh ^3(c+d x)}{3 d}-\frac {2 b \tanh ^3(c+d x)}{3 d}+\frac {b \tanh ^5(c+d x)}{5 d} \] Input:
Integrate[Sech[c + d*x]^4*(a + b*Sech[c + d*x]^2),x]
Output:
(a*Tanh[c + d*x])/d + (b*Tanh[c + d*x])/d - (a*Tanh[c + d*x]^3)/(3*d) - (2 *b*Tanh[c + d*x]^3)/(3*d) + (b*Tanh[c + d*x]^5)/(5*d)
Result contains complex when optimal does not.
Time = 0.31 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.28, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4534, 3042, 4254, 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(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (i c+i d x+\frac {\pi }{2}\right )^4 \left (a+b \csc \left (i c+i d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {1}{5} (5 a+4 b) \int \text {sech}^4(c+d x)dx+\frac {b \tanh (c+d x) \text {sech}^4(c+d x)}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b \tanh (c+d x) \text {sech}^4(c+d x)}{5 d}+\frac {1}{5} (5 a+4 b) \int \csc \left (i c+i d x+\frac {\pi }{2}\right )^4dx\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {b \tanh (c+d x) \text {sech}^4(c+d x)}{5 d}+\frac {i (5 a+4 b) \int \left (1-\tanh ^2(c+d x)\right )d(-i \tanh (c+d x))}{5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \tanh (c+d x) \text {sech}^4(c+d x)}{5 d}+\frac {i (5 a+4 b) \left (\frac {1}{3} i \tanh ^3(c+d x)-i \tanh (c+d x)\right )}{5 d}\) |
Input:
Int[Sech[c + d*x]^4*(a + b*Sech[c + d*x]^2),x]
Output:
(b*Sech[c + d*x]^4*Tanh[c + d*x])/(5*d) + ((I/5)*(5*a + 4*b)*((-I)*Tanh[c + d*x] + (I/3)*Tanh[c + d*x]^3))/d
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Time = 0.56 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {a \left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )+b \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{d}\) | \(56\) |
default | \(\frac {a \left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )+b \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{d}\) | \(56\) |
parts | \(\frac {a \left (\frac {2}{3}+\frac {\operatorname {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )}{d}+\frac {b \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{d}\) | \(58\) |
parallelrisch | \(\frac {\left (50 a +40 b \right ) \sinh \left (3 d x +3 c \right )+\left (10 a +8 b \right ) \sinh \left (5 d x +5 c \right )+40 \sinh \left (d x +c \right ) \left (a +2 b \right )}{15 d \left (\cosh \left (5 d x +5 c \right )+5 \cosh \left (3 d x +3 c \right )+10 \cosh \left (d x +c \right )\right )}\) | \(85\) |
risch | \(-\frac {4 \left (15 \,{\mathrm e}^{6 d x +6 c} a +35 \,{\mathrm e}^{4 d x +4 c} a +40 \,{\mathrm e}^{4 d x +4 c} b +25 a \,{\mathrm e}^{2 d x +2 c}+20 b \,{\mathrm e}^{2 d x +2 c}+5 a +4 b \right )}{15 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{5}}\) | \(86\) |
Input:
int(sech(d*x+c)^4*(a+b*sech(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/d*(a*(2/3+1/3*sech(d*x+c)^2)*tanh(d*x+c)+b*(8/15+1/5*sech(d*x+c)^4+4/15* sech(d*x+c)^2)*tanh(d*x+c))
Leaf count of result is larger than twice the leaf count of optimal. 343 vs. \(2 (46) = 92\).
Time = 0.27 (sec) , antiderivative size = 343, normalized size of antiderivative = 6.86 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=-\frac {8 \, {\left (2 \, {\left (5 \, a + b\right )} \cosh \left (d x + c\right )^{3} + 6 \, {\left (5 \, a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (5 \, a - 2 \, b\right )} \sinh \left (d x + c\right )^{3} + 30 \, {\left (a + b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (5 \, a - 2 \, b\right )} \cosh \left (d x + c\right )^{2} + 5 \, a + 10 \, b\right )} \sinh \left (d x + c\right )\right )}}{15 \, {\left (d \cosh \left (d x + c\right )^{7} + 7 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{6} + d \sinh \left (d x + c\right )^{7} + 5 \, d \cosh \left (d x + c\right )^{5} + {\left (21 \, d \cosh \left (d x + c\right )^{2} + 5 \, d\right )} \sinh \left (d x + c\right )^{5} + 5 \, {\left (7 \, d \cosh \left (d x + c\right )^{3} + 5 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{4} + 11 \, d \cosh \left (d x + c\right )^{3} + {\left (35 \, d \cosh \left (d x + c\right )^{4} + 50 \, d \cosh \left (d x + c\right )^{2} + 9 \, d\right )} \sinh \left (d x + c\right )^{3} + {\left (21 \, d \cosh \left (d x + c\right )^{5} + 50 \, d \cosh \left (d x + c\right )^{3} + 33 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + 15 \, d \cosh \left (d x + c\right ) + {\left (7 \, d \cosh \left (d x + c\right )^{6} + 25 \, d \cosh \left (d x + c\right )^{4} + 27 \, d \cosh \left (d x + c\right )^{2} + 5 \, d\right )} \sinh \left (d x + c\right )\right )}} \] Input:
integrate(sech(d*x+c)^4*(a+b*sech(d*x+c)^2),x, algorithm="fricas")
Output:
-8/15*(2*(5*a + b)*cosh(d*x + c)^3 + 6*(5*a + b)*cosh(d*x + c)*sinh(d*x + c)^2 + (5*a - 2*b)*sinh(d*x + c)^3 + 30*(a + b)*cosh(d*x + c) + (3*(5*a - 2*b)*cosh(d*x + c)^2 + 5*a + 10*b)*sinh(d*x + c))/(d*cosh(d*x + c)^7 + 7*d *cosh(d*x + c)*sinh(d*x + c)^6 + d*sinh(d*x + c)^7 + 5*d*cosh(d*x + c)^5 + (21*d*cosh(d*x + c)^2 + 5*d)*sinh(d*x + c)^5 + 5*(7*d*cosh(d*x + c)^3 + 5 *d*cosh(d*x + c))*sinh(d*x + c)^4 + 11*d*cosh(d*x + c)^3 + (35*d*cosh(d*x + c)^4 + 50*d*cosh(d*x + c)^2 + 9*d)*sinh(d*x + c)^3 + (21*d*cosh(d*x + c) ^5 + 50*d*cosh(d*x + c)^3 + 33*d*cosh(d*x + c))*sinh(d*x + c)^2 + 15*d*cos h(d*x + c) + (7*d*cosh(d*x + c)^6 + 25*d*cosh(d*x + c)^4 + 27*d*cosh(d*x + c)^2 + 5*d)*sinh(d*x + c))
\[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=\int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right ) \operatorname {sech}^{4}{\left (c + d x \right )}\, dx \] Input:
integrate(sech(d*x+c)**4*(a+b*sech(d*x+c)**2),x)
Output:
Integral((a + b*sech(c + d*x)**2)*sech(c + d*x)**4, x)
Leaf count of result is larger than twice the leaf count of optimal. 300 vs. \(2 (46) = 92\).
Time = 0.04 (sec) , antiderivative size = 300, normalized size of antiderivative = 6.00 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=\frac {16}{15} \, b {\left (\frac {5 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 10 \, e^{\left (-4 \, d x - 4 \, c\right )} + 10 \, e^{\left (-6 \, d x - 6 \, c\right )} + 5 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )} + 1\right )}} + \frac {10 \, e^{\left (-4 \, d x - 4 \, c\right )}}{d {\left (5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 10 \, e^{\left (-4 \, d x - 4 \, c\right )} + 10 \, e^{\left (-6 \, d x - 6 \, c\right )} + 5 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )} + 1\right )}} + \frac {1}{d {\left (5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 10 \, e^{\left (-4 \, d x - 4 \, c\right )} + 10 \, e^{\left (-6 \, d x - 6 \, c\right )} + 5 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )} + 1\right )}}\right )} + \frac {4}{3} \, a {\left (\frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac {1}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} \] Input:
integrate(sech(d*x+c)^4*(a+b*sech(d*x+c)^2),x, algorithm="maxima")
Output:
16/15*b*(5*e^(-2*d*x - 2*c)/(d*(5*e^(-2*d*x - 2*c) + 10*e^(-4*d*x - 4*c) + 10*e^(-6*d*x - 6*c) + 5*e^(-8*d*x - 8*c) + e^(-10*d*x - 10*c) + 1)) + 10* e^(-4*d*x - 4*c)/(d*(5*e^(-2*d*x - 2*c) + 10*e^(-4*d*x - 4*c) + 10*e^(-6*d *x - 6*c) + 5*e^(-8*d*x - 8*c) + e^(-10*d*x - 10*c) + 1)) + 1/(d*(5*e^(-2* d*x - 2*c) + 10*e^(-4*d*x - 4*c) + 10*e^(-6*d*x - 6*c) + 5*e^(-8*d*x - 8*c ) + e^(-10*d*x - 10*c) + 1))) + 4/3*a*(3*e^(-2*d*x - 2*c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1)) + 1/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1)))
Time = 0.13 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.70 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (15 \, a e^{\left (6 \, d x + 6 \, c\right )} + 35 \, a e^{\left (4 \, d x + 4 \, c\right )} + 40 \, b e^{\left (4 \, d x + 4 \, c\right )} + 25 \, a e^{\left (2 \, d x + 2 \, c\right )} + 20 \, b e^{\left (2 \, d x + 2 \, c\right )} + 5 \, a + 4 \, b\right )}}{15 \, d {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{5}} \] Input:
integrate(sech(d*x+c)^4*(a+b*sech(d*x+c)^2),x, algorithm="giac")
Output:
-4/15*(15*a*e^(6*d*x + 6*c) + 35*a*e^(4*d*x + 4*c) + 40*b*e^(4*d*x + 4*c) + 25*a*e^(2*d*x + 2*c) + 20*b*e^(2*d*x + 2*c) + 5*a + 4*b)/(d*(e^(2*d*x + 2*c) + 1)^5)
Time = 2.22 (sec) , antiderivative size = 292, normalized size of antiderivative = 5.84 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=-\frac {\frac {8\,\left (a+2\,b\right )}{15\,d}+\frac {4\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}}{5\,d}}{3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1}-\frac {\frac {8\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}}{5\,d}+\frac {8\,a\,{\mathrm {e}}^{6\,c+6\,d\,x}}{5\,d}+\frac {16\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a+2\,b\right )}{5\,d}}{5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1}-\frac {\frac {2\,a}{5\,d}+\frac {6\,a\,{\mathrm {e}}^{4\,c+4\,d\,x}}{5\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+2\,b\right )}{5\,d}}{4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1}-\frac {2\,a}{5\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \] Input:
int((a + b/cosh(c + d*x)^2)/cosh(c + d*x)^4,x)
Output:
- ((8*(a + 2*b))/(15*d) + (4*a*exp(2*c + 2*d*x))/(5*d))/(3*exp(2*c + 2*d*x ) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1) - ((8*a*exp(2*c + 2*d*x))/( 5*d) + (8*a*exp(6*c + 6*d*x))/(5*d) + (16*exp(4*c + 4*d*x)*(a + 2*b))/(5*d ))/(5*exp(2*c + 2*d*x) + 10*exp(4*c + 4*d*x) + 10*exp(6*c + 6*d*x) + 5*exp (8*c + 8*d*x) + exp(10*c + 10*d*x) + 1) - ((2*a)/(5*d) + (6*a*exp(4*c + 4* d*x))/(5*d) + (8*exp(2*c + 2*d*x)*(a + 2*b))/(5*d))/(4*exp(2*c + 2*d*x) + 6*exp(4*c + 4*d*x) + 4*exp(6*c + 6*d*x) + exp(8*c + 8*d*x) + 1) - (2*a)/(5 *d*(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1))
Time = 0.22 (sec) , antiderivative size = 139, normalized size of antiderivative = 2.78 \[ \int \text {sech}^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx=\frac {-4 e^{6 d x +6 c} a -\frac {28 e^{4 d x +4 c} a}{3}-\frac {32 e^{4 d x +4 c} b}{3}-\frac {20 e^{2 d x +2 c} a}{3}-\frac {16 e^{2 d x +2 c} b}{3}-\frac {4 a}{3}-\frac {16 b}{15}}{d \left (e^{10 d x +10 c}+5 e^{8 d x +8 c}+10 e^{6 d x +6 c}+10 e^{4 d x +4 c}+5 e^{2 d x +2 c}+1\right )} \] Input:
int(sech(d*x+c)^4*(a+b*sech(d*x+c)^2),x)
Output:
(4*( - 15*e**(6*c + 6*d*x)*a - 35*e**(4*c + 4*d*x)*a - 40*e**(4*c + 4*d*x) *b - 25*e**(2*c + 2*d*x)*a - 20*e**(2*c + 2*d*x)*b - 5*a - 4*b))/(15*d*(e* *(10*c + 10*d*x) + 5*e**(8*c + 8*d*x) + 10*e**(6*c + 6*d*x) + 10*e**(4*c + 4*d*x) + 5*e**(2*c + 2*d*x) + 1))