Integrand size = 13, antiderivative size = 56 \[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\frac {a \arctan (\sinh (x))}{b^2}-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {\text {sech}(x)}{b} \]
a*arctan(sinh(x))/b^2+sech(x)/b-arctan(cosh(x)*(b+a*tanh(x))/(a^2-b^2)^(1/ 2))*(a^2-b^2)^(1/2)/b^2
Time = 0.15 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.16 \[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\frac {2 a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )-2 \sqrt {a-b} \sqrt {a+b} \arctan \left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right )+b \text {sech}(x)}{b^2} \]
(2*a*ArcTan[Tanh[x/2]] - 2*Sqrt[a - b]*Sqrt[a + b]*ArcTan[(b + a*Tanh[x/2] )/(Sqrt[a - b]*Sqrt[a + b])] + b*Sech[x])/b^2
Time = 0.47 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {3042, 3989, 3042, 3967, 3042, 3988, 219, 4257}
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}^3(x)}{a+b \tanh (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (i x)^3}{a-i b \tan (i x)}dx\) |
\(\Big \downarrow \) 3989 |
\(\displaystyle \frac {\int \text {sech}(x) (a-b \tanh (x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\text {sech}(x)}{a+b \tanh (x)}dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sec (i x) (a+i b \tan (i x))dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {a \int \text {sech}(x)dx+b \text {sech}(x)}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (i x)}{a-i b \tan (i x)}dx}{b^2}\) |
\(\Big \downarrow \) 3988 |
\(\displaystyle \frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}-\frac {i \left (a^2-b^2\right ) \int \frac {1}{a^2-b^2+\cosh ^2(x) (b+a \tanh (x))^2}d(-i \cosh (x) (b+a \tanh (x)))}{b^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {b \text {sech}(x)+a \int \csc \left (i x+\frac {\pi }{2}\right )dx}{b^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {a \arctan (\sinh (x))+b \text {sech}(x)}{b^2}-\frac {\sqrt {a^2-b^2} \arctan \left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{b^2}\) |
-((Sqrt[a^2 - b^2]*ArcTan[(Cosh[x]*(b + a*Tanh[x]))/Sqrt[a^2 - b^2]])/b^2) + (a*ArcTan[Sinh[x]] + b*Sech[x])/b^2
3.2.11.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbo l] :> Simp[-f^(-1) Subst[Int[1/(a^2 + b^2 - x^2), x], x, (b - a*Tan[e + f *x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_ Symbol] :> Simp[-(b^2)^(-1) Int[Sec[e + f*x]^(m - 2)*(a - b*Tan[e + f*x]) , x], x] + Simp[(a^2 + b^2)/b^2 Int[Sec[e + f*x]^(m - 2)/(a + b*Tan[e + f *x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IGtQ[(m - 1) /2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 4.49 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.38
method | result | size |
default | \(\frac {\frac {2 b}{1+\tanh \left (\frac {x}{2}\right )^{2}}+2 a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{b^{2}}+\frac {2 \left (-a^{2}+b^{2}\right ) \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{2} \sqrt {a^{2}-b^{2}}}\) | \(77\) |
risch | \(\frac {2 \,{\mathrm e}^{x}}{b \left (1+{\mathrm e}^{2 x}\right )}+\frac {i a \ln \left ({\mathrm e}^{x}+i\right )}{b^{2}}-\frac {i a \ln \left ({\mathrm e}^{x}-i\right )}{b^{2}}+\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}-\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}-\frac {\sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{x}+\frac {\sqrt {-a^{2}+b^{2}}}{a +b}\right )}{b^{2}}\) | \(117\) |
2/b^2*(b/(1+tanh(1/2*x)^2)+a*arctan(tanh(1/2*x)))+2*(-a^2+b^2)/b^2/(a^2-b^ 2)^(1/2)*arctan(1/2*(2*a*tanh(1/2*x)+2*b)/(a^2-b^2)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 126 vs. \(2 (52) = 104\).
Time = 0.28 (sec) , antiderivative size = 309, normalized size of antiderivative = 5.52 \[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\left [\frac {\sqrt {-a^{2} + b^{2}} {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (\frac {{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - a + b}{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} + a - b}\right ) + 2 \, {\left (a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2} + a\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 2 \, b \cosh \left (x\right ) + 2 \, b \sinh \left (x\right )}{b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2} + b^{2}}, \frac {2 \, {\left (\sqrt {a^{2} - b^{2}} {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \arctan \left (\frac {\sqrt {a^{2} - b^{2}}}{{\left (a + b\right )} \cosh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )}\right ) + {\left (a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) \sinh \left (x\right ) + a \sinh \left (x\right )^{2} + a\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + b \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2} + b^{2}}\right ] \]
[(sqrt(-a^2 + b^2)*(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2 + 1)*log(((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 - 2*sqrt(- a^2 + b^2)*(cosh(x) + sinh(x)) - a + b)/((a + b)*cosh(x)^2 + 2*(a + b)*cos h(x)*sinh(x) + (a + b)*sinh(x)^2 + a - b)) + 2*(a*cosh(x)^2 + 2*a*cosh(x)* sinh(x) + a*sinh(x)^2 + a)*arctan(cosh(x) + sinh(x)) + 2*b*cosh(x) + 2*b*s inh(x))/(b^2*cosh(x)^2 + 2*b^2*cosh(x)*sinh(x) + b^2*sinh(x)^2 + b^2), 2*( sqrt(a^2 - b^2)*(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2 + 1)*arctan(sqr t(a^2 - b^2)/((a + b)*cosh(x) + (a + b)*sinh(x))) + (a*cosh(x)^2 + 2*a*cos h(x)*sinh(x) + a*sinh(x)^2 + a)*arctan(cosh(x) + sinh(x)) + b*cosh(x) + b* sinh(x))/(b^2*cosh(x)^2 + 2*b^2*cosh(x)*sinh(x) + b^2*sinh(x)^2 + b^2)]
\[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\int \frac {\operatorname {sech}^{3}{\left (x \right )}}{a + b \tanh {\left (x \right )}}\, dx \]
Exception generated. \[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.26 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.12 \[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\frac {2 \, a \arctan \left (e^{x}\right )}{b^{2}} - \frac {2 \, \sqrt {a^{2} - b^{2}} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{b^{2}} + \frac {2 \, e^{x}}{b {\left (e^{\left (2 \, x\right )} + 1\right )}} \]
2*a*arctan(e^x)/b^2 - 2*sqrt(a^2 - b^2)*arctan((a*e^x + b*e^x)/sqrt(a^2 - b^2))/b^2 + 2*e^x/(b*(e^(2*x) + 1))
Time = 4.29 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.12 \[ \int \frac {\text {sech}^3(x)}{a+b \tanh (x)} \, dx=\frac {\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x-\sqrt {b^2-a^2}\right )\,\sqrt {-\left (a+b\right )\,\left (a-b\right )}}{b^2}-\frac {\ln \left (a\,{\mathrm {e}}^x+b\,{\mathrm {e}}^x+\sqrt {b^2-a^2}\right )\,\sqrt {-\left (a+b\right )\,\left (a-b\right )}}{b^2}+\frac {2\,{\mathrm {e}}^x}{b\,\left ({\mathrm {e}}^{2\,x}+1\right )}-\frac {a\,\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,1{}\mathrm {i}}{b^2}+\frac {a\,\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{b^2} \]