Integrand size = 21, antiderivative size = 49 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\frac {a \log (\cosh (c+d x))}{d}+\frac {(a-b) \text {sech}^2(c+d x)}{2 d}+\frac {b \text {sech}^4(c+d x)}{4 d} \] Output:
a*ln(cosh(d*x+c))/d+1/2*(a-b)*sech(d*x+c)^2/d+1/4*b*sech(d*x+c)^4/d
Time = 0.06 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.88 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\frac {a \left (2 \log (\cosh (c+d x))+\text {sech}^2(c+d x)\right )}{2 d}+\frac {b \tanh ^4(c+d x)}{4 d} \] Input:
Integrate[(a + b*Sech[c + d*x]^2)*Tanh[c + d*x]^3,x]
Output:
(a*(2*Log[Cosh[c + d*x]] + Sech[c + d*x]^2))/(2*d) + (b*Tanh[c + d*x]^4)/( 4*d)
Time = 0.26 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 26, 4626, 354, 85, 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 ^3(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int i \tan (i c+i d x)^3 \left (a+b \sec (i c+i d x)^2\right )dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle i \int \left (b \sec (i c+i d x)^2+a\right ) \tan (i c+i d x)^3dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \left (1-\cosh ^2(c+d x)\right ) \left (a \cosh ^2(c+d x)+b\right ) \text {sech}^5(c+d x)d\cosh (c+d x)}{d}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle -\frac {\int \left (1-\cosh ^2(c+d x)\right ) \left (a \cosh ^2(c+d x)+b\right ) \text {sech}^3(c+d x)d\cosh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 85 |
\(\displaystyle -\frac {\int \left (b \text {sech}^3(c+d x)+(a-b) \text {sech}^2(c+d x)-a \text {sech}(c+d x)\right )d\cosh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-(a-b) \text {sech}(c+d x)-a \log \left (\cosh ^2(c+d x)\right )-\frac {1}{2} b \text {sech}^2(c+d x)}{2 d}\) |
Input:
Int[(a + b*Sech[c + d*x]^2)*Tanh[c + d*x]^3,x]
Output:
-1/2*(-(a*Log[Cosh[c + d*x]^2]) - (a - b)*Sech[c + d*x] - (b*Sech[c + d*x] ^2)/2)/d
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_] : > Int[ExpandIntegrand[(a + b*x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && (NeQ[n, -1] || EqQ[p, 1]) && NeQ[b*e + a* f, 0] && ( !IntegerQ[n] || LtQ[9*p + 5*n, 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, d, e, f])) && (NeQ[n + p + 3, 0] || EqQ[p, 1])
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Time = 2.44 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00
method | result | size |
derivativedivides | \(\frac {\frac {b \operatorname {sech}\left (d x +c \right )^{4}}{4}+\frac {a \operatorname {sech}\left (d x +c \right )^{2}}{2}-\frac {b \operatorname {sech}\left (d x +c \right )^{2}}{2}-a \ln \left (\operatorname {sech}\left (d x +c \right )\right )}{d}\) | \(49\) |
default | \(\frac {\frac {b \operatorname {sech}\left (d x +c \right )^{4}}{4}+\frac {a \operatorname {sech}\left (d x +c \right )^{2}}{2}-\frac {b \operatorname {sech}\left (d x +c \right )^{2}}{2}-a \ln \left (\operatorname {sech}\left (d x +c \right )\right )}{d}\) | \(49\) |
parts | \(\frac {a \left (-\frac {\tanh \left (d x +c \right )^{2}}{2}-\frac {\ln \left (-1+\tanh \left (d x +c \right )\right )}{2}-\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{2}\right )}{d}+\frac {b \tanh \left (d x +c \right )^{4}}{4 d}\) | \(54\) |
risch | \(-x a -\frac {2 a c}{d}+\frac {2 \,{\mathrm e}^{2 d x +2 c} \left ({\mathrm e}^{4 d x +4 c} a -{\mathrm e}^{4 d x +4 c} b +2 a \,{\mathrm e}^{2 d x +2 c}+a -b \right )}{d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{4}}+\frac {a \ln \left ({\mathrm e}^{2 d x +2 c}+1\right )}{d}\) | \(97\) |
Input:
int((a+b*sech(d*x+c)^2)*tanh(d*x+c)^3,x,method=_RETURNVERBOSE)
Output:
1/d*(1/4*b*sech(d*x+c)^4+1/2*a*sech(d*x+c)^2-1/2*b*sech(d*x+c)^2-a*ln(sech (d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 1072 vs. \(2 (45) = 90\).
Time = 0.23 (sec) , antiderivative size = 1072, normalized size of antiderivative = 21.88 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\text {Too large to display} \] Input:
integrate((a+b*sech(d*x+c)^2)*tanh(d*x+c)^3,x, algorithm="fricas")
Output:
-(a*d*x*cosh(d*x + c)^8 + 8*a*d*x*cosh(d*x + c)*sinh(d*x + c)^7 + a*d*x*si nh(d*x + c)^8 + 2*(2*a*d*x - a + b)*cosh(d*x + c)^6 + 2*(14*a*d*x*cosh(d*x + c)^2 + 2*a*d*x - a + b)*sinh(d*x + c)^6 + 4*(14*a*d*x*cosh(d*x + c)^3 + 3*(2*a*d*x - a + b)*cosh(d*x + c))*sinh(d*x + c)^5 + 2*(3*a*d*x - 2*a)*co sh(d*x + c)^4 + 2*(35*a*d*x*cosh(d*x + c)^4 + 3*a*d*x + 15*(2*a*d*x - a + b)*cosh(d*x + c)^2 - 2*a)*sinh(d*x + c)^4 + 8*(7*a*d*x*cosh(d*x + c)^5 + 5 *(2*a*d*x - a + b)*cosh(d*x + c)^3 + (3*a*d*x - 2*a)*cosh(d*x + c))*sinh(d *x + c)^3 + a*d*x + 2*(2*a*d*x - a + b)*cosh(d*x + c)^2 + 2*(14*a*d*x*cosh (d*x + c)^6 + 15*(2*a*d*x - a + b)*cosh(d*x + c)^4 + 2*a*d*x + 6*(3*a*d*x - 2*a)*cosh(d*x + c)^2 - a + b)*sinh(d*x + c)^2 - (a*cosh(d*x + c)^8 + 8*a *cosh(d*x + c)*sinh(d*x + c)^7 + a*sinh(d*x + c)^8 + 4*a*cosh(d*x + c)^6 + 4*(7*a*cosh(d*x + c)^2 + a)*sinh(d*x + c)^6 + 8*(7*a*cosh(d*x + c)^3 + 3* a*cosh(d*x + c))*sinh(d*x + c)^5 + 6*a*cosh(d*x + c)^4 + 2*(35*a*cosh(d*x + c)^4 + 30*a*cosh(d*x + c)^2 + 3*a)*sinh(d*x + c)^4 + 8*(7*a*cosh(d*x + c )^5 + 10*a*cosh(d*x + c)^3 + 3*a*cosh(d*x + c))*sinh(d*x + c)^3 + 4*a*cosh (d*x + c)^2 + 4*(7*a*cosh(d*x + c)^6 + 15*a*cosh(d*x + c)^4 + 9*a*cosh(d*x + c)^2 + a)*sinh(d*x + c)^2 + 8*(a*cosh(d*x + c)^7 + 3*a*cosh(d*x + c)^5 + 3*a*cosh(d*x + c)^3 + a*cosh(d*x + c))*sinh(d*x + c) + a)*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))) + 4*(2*a*d*x*cosh(d*x + c)^7 + 3*(2 *a*d*x - a + b)*cosh(d*x + c)^5 + 2*(3*a*d*x - 2*a)*cosh(d*x + c)^3 + (...
Time = 0.30 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.63 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\begin {cases} a x - \frac {a \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {a \tanh ^{2}{\left (c + d x \right )}}{2 d} - \frac {b \tanh ^{2}{\left (c + d x \right )} \operatorname {sech}^{2}{\left (c + d x \right )}}{4 d} - \frac {b \operatorname {sech}^{2}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (a + b \operatorname {sech}^{2}{\left (c \right )}\right ) \tanh ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate((a+b*sech(d*x+c)**2)*tanh(d*x+c)**3,x)
Output:
Piecewise((a*x - a*log(tanh(c + d*x) + 1)/d - a*tanh(c + d*x)**2/(2*d) - b *tanh(c + d*x)**2*sech(c + d*x)**2/(4*d) - b*sech(c + d*x)**2/(4*d), Ne(d, 0)), (x*(a + b*sech(c)**2)*tanh(c)**3, True))
Time = 0.13 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.59 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\frac {b \tanh \left (d x + c\right )^{4}}{4 \, d} + a {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac {2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} \] Input:
integrate((a+b*sech(d*x+c)^2)*tanh(d*x+c)^3,x, algorithm="maxima")
Output:
1/4*b*tanh(d*x + c)^4/d + a*(x + c/d + log(e^(-2*d*x - 2*c) + 1)/d + 2*e^( -2*d*x - 2*c)/(d*(2*e^(-2*d*x - 2*c) + e^(-4*d*x - 4*c) + 1)))
Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (45) = 90\).
Time = 0.15 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.43 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=-\frac {12 \, {\left (d x + c\right )} a - 12 \, a \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {25 \, a e^{\left (8 \, d x + 8 \, c\right )} + 76 \, a e^{\left (6 \, d x + 6 \, c\right )} + 24 \, b e^{\left (6 \, d x + 6 \, c\right )} + 102 \, a e^{\left (4 \, d x + 4 \, c\right )} + 76 \, a e^{\left (2 \, d x + 2 \, c\right )} + 24 \, b e^{\left (2 \, d x + 2 \, c\right )} + 25 \, a}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}}}{12 \, d} \] Input:
integrate((a+b*sech(d*x+c)^2)*tanh(d*x+c)^3,x, algorithm="giac")
Output:
-1/12*(12*(d*x + c)*a - 12*a*log(e^(2*d*x + 2*c) + 1) + (25*a*e^(8*d*x + 8 *c) + 76*a*e^(6*d*x + 6*c) + 24*b*e^(6*d*x + 6*c) + 102*a*e^(4*d*x + 4*c) + 76*a*e^(2*d*x + 2*c) + 24*b*e^(2*d*x + 2*c) + 25*a)/(e^(2*d*x + 2*c) + 1 )^4)/d
Time = 0.11 (sec) , antiderivative size = 173, normalized size of antiderivative = 3.53 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\frac {2\,\left (a-b\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-a\,x-\frac {2\,\left (a-3\,b\right )}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {8\,b}{d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,b}{d\,\left (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\right )}+\frac {a\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+1\right )}{d} \] Input:
int(tanh(c + d*x)^3*(a + b/cosh(c + d*x)^2),x)
Output:
(2*(a - b))/(d*(exp(2*c + 2*d*x) + 1)) - a*x - (2*(a - 3*b))/(d*(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1)) - (8*b)/(d*(3*exp(2*c + 2*d*x) + 3*exp( 4*c + 4*d*x) + exp(6*c + 6*d*x) + 1)) + (4*b)/(d*(4*exp(2*c + 2*d*x) + 6*e xp(4*c + 4*d*x) + 4*exp(6*c + 6*d*x) + exp(8*c + 8*d*x) + 1)) + (a*log(exp (2*c)*exp(2*d*x) + 1))/d
Time = 0.21 (sec) , antiderivative size = 281, normalized size of antiderivative = 5.73 \[ \int \left (a+b \text {sech}^2(c+d x)\right ) \tanh ^3(c+d x) \, dx=\frac {4 e^{4 d x +4 c} \mathrm {log}\left (e^{2 d x +2 c}+1\right ) a -e^{4 d x +4 c} \mathrm {sech}\left (d x +c \right )^{2} \tanh \left (d x +c \right )^{2} b -e^{4 d x +4 c} \mathrm {sech}\left (d x +c \right )^{2} b -4 e^{4 d x +4 c} a d x -4 e^{4 d x +4 c} a +8 e^{2 d x +2 c} \mathrm {log}\left (e^{2 d x +2 c}+1\right ) a -2 e^{2 d x +2 c} \mathrm {sech}\left (d x +c \right )^{2} \tanh \left (d x +c \right )^{2} b -2 e^{2 d x +2 c} \mathrm {sech}\left (d x +c \right )^{2} b -8 e^{2 d x +2 c} a d x +4 \,\mathrm {log}\left (e^{2 d x +2 c}+1\right ) a -\mathrm {sech}\left (d x +c \right )^{2} \tanh \left (d x +c \right )^{2} b -\mathrm {sech}\left (d x +c \right )^{2} b -4 a d x -4 a}{4 d \left (e^{4 d x +4 c}+2 e^{2 d x +2 c}+1\right )} \] Input:
int((a+b*sech(d*x+c)^2)*tanh(d*x+c)^3,x)
Output:
(4*e**(4*c + 4*d*x)*log(e**(2*c + 2*d*x) + 1)*a - e**(4*c + 4*d*x)*sech(c + d*x)**2*tanh(c + d*x)**2*b - e**(4*c + 4*d*x)*sech(c + d*x)**2*b - 4*e** (4*c + 4*d*x)*a*d*x - 4*e**(4*c + 4*d*x)*a + 8*e**(2*c + 2*d*x)*log(e**(2* c + 2*d*x) + 1)*a - 2*e**(2*c + 2*d*x)*sech(c + d*x)**2*tanh(c + d*x)**2*b - 2*e**(2*c + 2*d*x)*sech(c + d*x)**2*b - 8*e**(2*c + 2*d*x)*a*d*x + 4*lo g(e**(2*c + 2*d*x) + 1)*a - sech(c + d*x)**2*tanh(c + d*x)**2*b - sech(c + d*x)**2*b - 4*a*d*x - 4*a)/(4*d*(e**(4*c + 4*d*x) + 2*e**(2*c + 2*d*x) + 1))