Integrand size = 23, antiderivative size = 52 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=-\frac {a \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b} d}+\frac {\tanh (c+d x)}{b d} \] Output:
-a*arctanh(b^(1/2)*tanh(d*x+c)/(a+b)^(1/2))/b^(3/2)/(a+b)^(1/2)/d+tanh(d*x +c)/b/d
Leaf count is larger than twice the leaf count of optimal. \(182\) vs. \(2(52)=104\).
Time = 1.67 (sec) , antiderivative size = 182, normalized size of antiderivative = 3.50 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {(a+2 b+a \cosh (2 (c+d x))) \text {sech}^2(c+d x) \left (a \text {arctanh}\left (\frac {\text {sech}(d x) (\cosh (2 c)-\sinh (2 c)) ((a+2 b) \sinh (d x)-a \sinh (2 c+d x))}{2 \sqrt {a+b} \sqrt {b (\cosh (c)-\sinh (c))^4}}\right ) (-\cosh (2 c)+\sinh (2 c))+\sqrt {a+b} \text {sech}(c) \text {sech}(c+d x) \sqrt {b (\cosh (c)-\sinh (c))^4} \sinh (d x)\right )}{2 b \sqrt {a+b} d \left (a+b \text {sech}^2(c+d x)\right ) \sqrt {b (\cosh (c)-\sinh (c))^4}} \] Input:
Integrate[Sech[c + d*x]^4/(a + b*Sech[c + d*x]^2),x]
Output:
((a + 2*b + a*Cosh[2*(c + d*x)])*Sech[c + d*x]^2*(a*ArcTanh[(Sech[d*x]*(Co sh[2*c] - Sinh[2*c])*((a + 2*b)*Sinh[d*x] - a*Sinh[2*c + d*x]))/(2*Sqrt[a + b]*Sqrt[b*(Cosh[c] - Sinh[c])^4])]*(-Cosh[2*c] + Sinh[2*c]) + Sqrt[a + b ]*Sech[c]*Sech[c + d*x]*Sqrt[b*(Cosh[c] - Sinh[c])^4]*Sinh[d*x]))/(2*b*Sqr t[a + b]*d*(a + b*Sech[c + d*x]^2)*Sqrt[b*(Cosh[c] - Sinh[c])^4])
Time = 0.25 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.96, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4634, 299, 221}
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 \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (i c+i d x)^4}{a+b \sec (i c+i d x)^2}dx\) |
\(\Big \downarrow \) 4634 |
\(\displaystyle \frac {\int \frac {1-\tanh ^2(c+d x)}{-b \tanh ^2(c+d x)+a+b}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 299 |
\(\displaystyle \frac {\frac {\tanh (c+d x)}{b}-\frac {a \int \frac {1}{-b \tanh ^2(c+d x)+a+b}d\tanh (c+d x)}{b}}{d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\tanh (c+d x)}{b}-\frac {a \text {arctanh}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{3/2} \sqrt {a+b}}}{d}\) |
Input:
Int[Sech[c + d*x]^4/(a + b*Sech[c + d*x]^2),x]
Output:
(-((a*ArcTanh[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a + b]])/(b^(3/2)*Sqrt[a + b])) + Tanh[c + d*x]/b)/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x *((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 *p + 3)) Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && NeQ[2*p + 3, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_) )^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ [m/2] && IntegerQ[n/2]
Leaf count of result is larger than twice the leaf count of optimal. \(137\) vs. \(2(44)=88\).
Time = 0.69 (sec) , antiderivative size = 138, normalized size of antiderivative = 2.65
method | result | size |
derivativedivides | \(\frac {\frac {2 a \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{b}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}}{d}\) | \(138\) |
default | \(\frac {\frac {2 a \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{b}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}}{d}\) | \(138\) |
risch | \(-\frac {2}{b d \left ({\mathrm e}^{2 d x +2 c}+1\right )}+\frac {a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {a b +b^{2}}+2 b \sqrt {a b +b^{2}}+2 a b +2 b^{2}}{a \sqrt {a b +b^{2}}}\right )}{2 \sqrt {a b +b^{2}}\, d b}-\frac {a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {a b +b^{2}}+2 b \sqrt {a b +b^{2}}-2 a b -2 b^{2}}{a \sqrt {a b +b^{2}}}\right )}{2 \sqrt {a b +b^{2}}\, d b}\) | \(173\) |
Input:
int(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/d*(2*a/b*(-1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*d*x+1/2*c)^2+ 2*tanh(1/2*d*x+1/2*c)*b^(1/2)+(a+b)^(1/2))+1/4/b^(1/2)/(a+b)^(1/2)*ln((a+b )^(1/2)*tanh(1/2*d*x+1/2*c)^2-2*tanh(1/2*d*x+1/2*c)*b^(1/2)+(a+b)^(1/2)))+ 2/b*tanh(1/2*d*x+1/2*c)/(1+tanh(1/2*d*x+1/2*c)^2))
Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (44) = 88\).
Time = 0.17 (sec) , antiderivative size = 645, normalized size of antiderivative = 12.40 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx =\text {Too large to display} \] Input:
integrate(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x, algorithm="fricas")
Output:
[1/2*((a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a)*sqrt(a*b + b^2)*log((a^2*cosh(d*x + c)^4 + 4*a^2*cosh(d*x + c)*s inh(d*x + c)^3 + a^2*sinh(d*x + c)^4 + 2*(a^2 + 2*a*b)*cosh(d*x + c)^2 + 2 *(3*a^2*cosh(d*x + c)^2 + a^2 + 2*a*b)*sinh(d*x + c)^2 + a^2 + 8*a*b + 8*b ^2 + 4*(a^2*cosh(d*x + c)^3 + (a^2 + 2*a*b)*cosh(d*x + c))*sinh(d*x + c) + 4*(a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^ 2 + a + 2*b)*sqrt(a*b + b^2))/(a*cosh(d*x + c)^4 + 4*a*cosh(d*x + c)*sinh( d*x + c)^3 + a*sinh(d*x + c)^4 + 2*(a + 2*b)*cosh(d*x + c)^2 + 2*(3*a*cosh (d*x + c)^2 + a + 2*b)*sinh(d*x + c)^2 + 4*(a*cosh(d*x + c)^3 + (a + 2*b)* cosh(d*x + c))*sinh(d*x + c) + a)) - 4*a*b - 4*b^2)/((a*b^2 + b^3)*d*cosh( d*x + c)^2 + 2*(a*b^2 + b^3)*d*cosh(d*x + c)*sinh(d*x + c) + (a*b^2 + b^3) *d*sinh(d*x + c)^2 + (a*b^2 + b^3)*d), -((a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a)*sqrt(-a*b - b^2)*arctan(1/2*( a*cosh(d*x + c)^2 + 2*a*cosh(d*x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a + 2*b)*sqrt(-a*b - b^2)/(a*b + b^2)) + 2*a*b + 2*b^2)/((a*b^2 + b^3)*d*c osh(d*x + c)^2 + 2*(a*b^2 + b^3)*d*cosh(d*x + c)*sinh(d*x + c) + (a*b^2 + b^3)*d*sinh(d*x + c)^2 + (a*b^2 + b^3)*d)]
\[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\int \frac {\operatorname {sech}^{4}{\left (c + d x \right )}}{a + b \operatorname {sech}^{2}{\left (c + d x \right )}}\, dx \] Input:
integrate(sech(d*x+c)**4/(a+b*sech(d*x+c)**2),x)
Output:
Integral(sech(c + d*x)**4/(a + b*sech(c + d*x)**2), x)
Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (44) = 88\).
Time = 0.15 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.75 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {a \log \left (\frac {a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b - 2 \, \sqrt {{\left (a + b\right )} b}}{a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b + 2 \, \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} b d} + \frac {2}{{\left (b e^{\left (-2 \, d x - 2 \, c\right )} + b\right )} d} \] Input:
integrate(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x, algorithm="maxima")
Output:
1/2*a*log((a*e^(-2*d*x - 2*c) + a + 2*b - 2*sqrt((a + b)*b))/(a*e^(-2*d*x - 2*c) + a + 2*b + 2*sqrt((a + b)*b)))/(sqrt((a + b)*b)*b*d) + 2/((b*e^(-2 *d*x - 2*c) + b)*d)
Time = 0.20 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.38 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=-\frac {\frac {a \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + a + 2 \, b}{2 \, \sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b} + \frac {2}{b {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \] Input:
integrate(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x, algorithm="giac")
Output:
-(a*arctan(1/2*(a*e^(2*d*x + 2*c) + a + 2*b)/sqrt(-a*b - b^2))/(sqrt(-a*b - b^2)*b) + 2/(b*(e^(2*d*x + 2*c) + 1)))/d
Time = 0.42 (sec) , antiderivative size = 166, normalized size of antiderivative = 3.19 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {a\,\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}}{b}-\frac {2\,\left (a\,d+a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}+2\,b\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{3/2}\,d\,\sqrt {a+b}}\right )}{2\,b^{3/2}\,d\,\sqrt {a+b}}-\frac {2}{b\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {a\,\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}}{b}+\frac {2\,\left (a\,d+a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}+2\,b\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{3/2}\,d\,\sqrt {a+b}}\right )}{2\,b^{3/2}\,d\,\sqrt {a+b}} \] Input:
int(1/(cosh(c + d*x)^4*(a + b/cosh(c + d*x)^2)),x)
Output:
(a*log((4*exp(2*c + 2*d*x))/b - (2*(a*d + a*d*exp(2*c + 2*d*x) + 2*b*d*exp (2*c + 2*d*x)))/(b^(3/2)*d*(a + b)^(1/2))))/(2*b^(3/2)*d*(a + b)^(1/2)) - 2/(b*d*(exp(2*c + 2*d*x) + 1)) - (a*log((4*exp(2*c + 2*d*x))/b + (2*(a*d + a*d*exp(2*c + 2*d*x) + 2*b*d*exp(2*c + 2*d*x)))/(b^(3/2)*d*(a + b)^(1/2)) ))/(2*b^(3/2)*d*(a + b)^(1/2))
Time = 0.28 (sec) , antiderivative size = 317, normalized size of antiderivative = 6.10 \[ \int \frac {\text {sech}^4(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {-e^{2 d x +2 c} \sqrt {b}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) a -e^{2 d x +2 c} \sqrt {b}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) a +e^{2 d x +2 c} \sqrt {b}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {b}\, \sqrt {a +b}+e^{2 d x +2 c} a +a +2 b \right ) a -\sqrt {b}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) a -\sqrt {b}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) a +\sqrt {b}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {b}\, \sqrt {a +b}+e^{2 d x +2 c} a +a +2 b \right ) a +4 e^{2 d x +2 c} a b +4 e^{2 d x +2 c} b^{2}}{2 b^{2} d \left (e^{2 d x +2 c} a +e^{2 d x +2 c} b +a +b \right )} \] Input:
int(sech(d*x+c)^4/(a+b*sech(d*x+c)^2),x)
Output:
( - e**(2*c + 2*d*x)*sqrt(b)*sqrt(a + b)*log( - sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a - e**(2*c + 2*d*x)*sqrt(b)*sqrt(a + b)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a + e **(2*c + 2*d*x)*sqrt(b)*sqrt(a + b)*log(2*sqrt(b)*sqrt(a + b) + e**(2*c + 2*d*x)*a + a + 2*b)*a - sqrt(b)*sqrt(a + b)*log( - sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a - sqrt(b)*sqrt(a + b)*log(sqrt(2* sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a + sqrt(b)*sqrt(a + b)*log(2*sqrt(b)*sqrt(a + b) + e**(2*c + 2*d*x)*a + a + 2*b)*a + 4*e**(2 *c + 2*d*x)*a*b + 4*e**(2*c + 2*d*x)*b**2)/(2*b**2*d*(e**(2*c + 2*d*x)*a + e**(2*c + 2*d*x)*b + a + b))