Integrand size = 21, antiderivative size = 48 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\frac {a^2 \log (\cosh (c+d x))}{d}-\frac {a b \text {sech}^2(c+d x)}{d}-\frac {b^2 \text {sech}^4(c+d x)}{4 d} \] Output:
a^2*ln(cosh(d*x+c))/d-a*b*sech(d*x+c)^2/d-1/4*b^2*sech(d*x+c)^4/d
Time = 0.09 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.71 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\frac {\cosh ^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right )^2 \left (4 a^2 \log (\cosh (c+d x))-4 a b \text {sech}^2(c+d x)-b^2 \text {sech}^4(c+d x)\right )}{d (a+2 b+a \cosh (2 c+2 d x))^2} \] Input:
Integrate[(a + b*Sech[c + d*x]^2)^2*Tanh[c + d*x],x]
Output:
(Cosh[c + d*x]^4*(a + b*Sech[c + d*x]^2)^2*(4*a^2*Log[Cosh[c + d*x]] - 4*a *b*Sech[c + d*x]^2 - b^2*Sech[c + d*x]^4))/(d*(a + 2*b + a*Cosh[2*c + 2*d* x])^2)
Time = 0.25 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.96, 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, 243, 49, 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 (c+d x) \left (a+b \text {sech}^2(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -i \tan (i c+i d x) \left (a+b \sec (i c+i d x)^2\right )^2dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \left (b \sec (i c+i d x)^2+a\right )^2 \tan (i c+i d x)dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle \frac {\int \left (a \cosh ^2(c+d x)+b\right )^2 \text {sech}^5(c+d x)d\cosh (c+d x)}{d}\) |
\(\Big \downarrow \) 243 |
\(\displaystyle \frac {\int \left (a \cosh ^2(c+d x)+b\right )^2 \text {sech}^3(c+d x)d\cosh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {\int \left (b^2 \text {sech}^3(c+d x)+2 a b \text {sech}^2(c+d x)+a^2 \text {sech}(c+d x)\right )d\cosh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \log \left (\cosh ^2(c+d x)\right )-2 a b \text {sech}(c+d x)-\frac {1}{2} b^2 \text {sech}^2(c+d x)}{2 d}\) |
Input:
Int[(a + b*Sech[c + d*x]^2)^2*Tanh[c + d*x],x]
Output:
(a^2*Log[Cosh[c + d*x]^2] - 2*a*b*Sech[c + d*x] - (b^2*Sech[c + d*x]^2)/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[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2 Subst[In t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I ntegerQ[(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 = 9.64 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.88
method | result | size |
derivativedivides | \(-\frac {\frac {\operatorname {sech}\left (d x +c \right )^{4} b^{2}}{4}+\operatorname {sech}\left (d x +c \right )^{2} a b +a^{2} \ln \left (\operatorname {sech}\left (d x +c \right )\right )}{d}\) | \(42\) |
default | \(-\frac {\frac {\operatorname {sech}\left (d x +c \right )^{4} b^{2}}{4}+\operatorname {sech}\left (d x +c \right )^{2} a b +a^{2} \ln \left (\operatorname {sech}\left (d x +c \right )\right )}{d}\) | \(42\) |
parts | \(\frac {a^{2} \ln \left (\cosh \left (d x +c \right )\right )}{d}-\frac {b^{2} \operatorname {sech}\left (d x +c \right )^{4}}{4 d}+\frac {a b \tanh \left (d x +c \right )^{2}}{d}\) | \(46\) |
risch | \(-a^{2} x -\frac {2 a^{2} c}{d}-\frac {4 b \,{\mathrm e}^{2 d x +2 c} \left ({\mathrm e}^{4 d x +4 c} a +2 a \,{\mathrm e}^{2 d x +2 c}+b \,{\mathrm e}^{2 d x +2 c}+a \right )}{d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{4}}+\frac {a^{2} \ln \left ({\mathrm e}^{2 d x +2 c}+1\right )}{d}\) | \(100\) |
Input:
int((a+b*sech(d*x+c)^2)^2*tanh(d*x+c),x,method=_RETURNVERBOSE)
Output:
-1/d*(1/4*sech(d*x+c)^4*b^2+sech(d*x+c)^2*a*b+a^2*ln(sech(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 1180 vs. \(2 (46) = 92\).
Time = 0.28 (sec) , antiderivative size = 1180, normalized size of antiderivative = 24.58 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\text {Too large to display} \] Input:
integrate((a+b*sech(d*x+c)^2)^2*tanh(d*x+c),x, algorithm="fricas")
Output:
-(a^2*d*x*cosh(d*x + c)^8 + 8*a^2*d*x*cosh(d*x + c)*sinh(d*x + c)^7 + a^2* d*x*sinh(d*x + c)^8 + 4*(a^2*d*x + a*b)*cosh(d*x + c)^6 + 4*(7*a^2*d*x*cos h(d*x + c)^2 + a^2*d*x + a*b)*sinh(d*x + c)^6 + 8*(7*a^2*d*x*cosh(d*x + c) ^3 + 3*(a^2*d*x + a*b)*cosh(d*x + c))*sinh(d*x + c)^5 + 2*(3*a^2*d*x + 4*a *b + 2*b^2)*cosh(d*x + c)^4 + 2*(35*a^2*d*x*cosh(d*x + c)^4 + 3*a^2*d*x + 30*(a^2*d*x + a*b)*cosh(d*x + c)^2 + 4*a*b + 2*b^2)*sinh(d*x + c)^4 + a^2* d*x + 8*(7*a^2*d*x*cosh(d*x + c)^5 + 10*(a^2*d*x + a*b)*cosh(d*x + c)^3 + (3*a^2*d*x + 4*a*b + 2*b^2)*cosh(d*x + c))*sinh(d*x + c)^3 + 4*(a^2*d*x + a*b)*cosh(d*x + c)^2 + 4*(7*a^2*d*x*cosh(d*x + c)^6 + 15*(a^2*d*x + a*b)*c osh(d*x + c)^4 + a^2*d*x + 3*(3*a^2*d*x + 4*a*b + 2*b^2)*cosh(d*x + c)^2 + a*b)*sinh(d*x + c)^2 - (a^2*cosh(d*x + c)^8 + 8*a^2*cosh(d*x + c)*sinh(d* x + c)^7 + a^2*sinh(d*x + c)^8 + 4*a^2*cosh(d*x + c)^6 + 4*(7*a^2*cosh(d*x + c)^2 + a^2)*sinh(d*x + c)^6 + 6*a^2*cosh(d*x + c)^4 + 8*(7*a^2*cosh(d*x + c)^3 + 3*a^2*cosh(d*x + c))*sinh(d*x + c)^5 + 2*(35*a^2*cosh(d*x + c)^4 + 30*a^2*cosh(d*x + c)^2 + 3*a^2)*sinh(d*x + c)^4 + 4*a^2*cosh(d*x + c)^2 + 8*(7*a^2*cosh(d*x + c)^5 + 10*a^2*cosh(d*x + c)^3 + 3*a^2*cosh(d*x + c) )*sinh(d*x + c)^3 + 4*(7*a^2*cosh(d*x + c)^6 + 15*a^2*cosh(d*x + c)^4 + 9* a^2*cosh(d*x + c)^2 + a^2)*sinh(d*x + c)^2 + a^2 + 8*(a^2*cosh(d*x + c)^7 + 3*a^2*cosh(d*x + c)^5 + 3*a^2*cosh(d*x + c)^3 + a^2*cosh(d*x + c))*sinh( d*x + c))*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))) + 8*(a^2...
Time = 0.30 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.31 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\begin {cases} a^{2} x - \frac {a^{2} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {a b \operatorname {sech}^{2}{\left (c + d x \right )}}{d} - \frac {b^{2} \operatorname {sech}^{4}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (a + b \operatorname {sech}^{2}{\left (c \right )}\right )^{2} \tanh {\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate((a+b*sech(d*x+c)**2)**2*tanh(d*x+c),x)
Output:
Piecewise((a**2*x - a**2*log(tanh(c + d*x) + 1)/d - a*b*sech(c + d*x)**2/d - b**2*sech(c + d*x)**4/(4*d), Ne(d, 0)), (x*(a + b*sech(c)**2)**2*tanh(c ), True))
Time = 0.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.15 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\frac {a b \tanh \left (d x + c\right )^{2}}{d} + \frac {a^{2} \log \left (\cosh \left (d x + c\right )\right )}{d} - \frac {4 \, b^{2}}{d {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{4}} \] Input:
integrate((a+b*sech(d*x+c)^2)^2*tanh(d*x+c),x, algorithm="maxima")
Output:
a*b*tanh(d*x + c)^2/d + a^2*log(cosh(d*x + c))/d - 4*b^2/(d*(e^(d*x + c) + e^(-d*x - c))^4)
Leaf count of result is larger than twice the leaf count of optimal. 162 vs. \(2 (46) = 92\).
Time = 0.13 (sec) , antiderivative size = 162, normalized size of antiderivative = 3.38 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=-\frac {12 \, {\left (d x + c\right )} a^{2} - 12 \, a^{2} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {25 \, a^{2} e^{\left (8 \, d x + 8 \, c\right )} + 100 \, a^{2} e^{\left (6 \, d x + 6 \, c\right )} + 48 \, a b e^{\left (6 \, d x + 6 \, c\right )} + 150 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 96 \, a b e^{\left (4 \, d x + 4 \, c\right )} + 48 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 100 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} + 48 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 25 \, a^{2}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}}}{12 \, d} \] Input:
integrate((a+b*sech(d*x+c)^2)^2*tanh(d*x+c),x, algorithm="giac")
Output:
-1/12*(12*(d*x + c)*a^2 - 12*a^2*log(e^(2*d*x + 2*c) + 1) + (25*a^2*e^(8*d *x + 8*c) + 100*a^2*e^(6*d*x + 6*c) + 48*a*b*e^(6*d*x + 6*c) + 150*a^2*e^( 4*d*x + 4*c) + 96*a*b*e^(4*d*x + 4*c) + 48*b^2*e^(4*d*x + 4*c) + 100*a^2*e ^(2*d*x + 2*c) + 48*a*b*e^(2*d*x + 2*c) + 25*a^2)/(e^(2*d*x + 2*c) + 1)^4) /d
Time = 2.41 (sec) , antiderivative size = 182, normalized size of antiderivative = 3.79 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\frac {4\,\left (a\,b-b^2\right )}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-a^2\,x+\frac {8\,b^2}{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^2}{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^2\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+1\right )}{d}-\frac {4\,a\,b}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )} \] Input:
int(tanh(c + d*x)*(a + b/cosh(c + d*x)^2)^2,x)
Output:
(4*(a*b - b^2))/(d*(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1)) - a^2*x + (8*b^2)/(d*(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1 )) - (4*b^2)/(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)) + (a^2*log(exp(2*c)*exp(2*d*x) + 1))/d - (4*a *b)/(d*(exp(2*c + 2*d*x) + 1))
Time = 0.22 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.17 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx=\frac {4 \,\mathrm {log}\left (e^{2 d x +2 c}+1\right ) a^{2}-\mathrm {sech}\left (d x +c \right )^{4} b^{2}-4 \mathrm {sech}\left (d x +c \right )^{2} a b -4 a^{2} d x}{4 d} \] Input:
int((a+b*sech(d*x+c)^2)^2*tanh(d*x+c),x)
Output:
(4*log(e**(2*c + 2*d*x) + 1)*a**2 - sech(c + d*x)**4*b**2 - 4*sech(c + d*x )**2*a*b - 4*a**2*d*x)/(4*d)