Integrand size = 13, antiderivative size = 50 \[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=-\frac {\text {arctanh}(\cosh (x))}{b}+\frac {2 a \text {arctanh}\left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2}} \]
Time = 0.21 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.34 \[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=\frac {-\frac {2 a \arctan \left (\frac {a-b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}-\log \left (\cosh \left (\frac {x}{2}\right )\right )+\log \left (\sinh \left (\frac {x}{2}\right )\right )}{b} \]
((-2*a*ArcTan[(a - b*Tanh[x/2])/Sqrt[-a^2 - b^2]])/Sqrt[-a^2 - b^2] - Log[ Cosh[x/2]] + Log[Sinh[x/2]])/b
Time = 0.43 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.16, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.923, Rules used = {3042, 25, 4276, 26, 3042, 26, 4257, 4318, 3042, 3139, 1083, 219}
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 {csch}^2(x)}{a+b \text {csch}(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\csc (i x)^2}{a+i b \csc (i x)}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\csc (i x)^2}{a+i b \csc (i x)}dx\) |
\(\Big \downarrow \) 4276 |
\(\displaystyle \frac {i \int -i \text {csch}(x)dx}{b}-\frac {i a \int -\frac {i \text {csch}(x)}{a+b \text {csch}(x)}dx}{b}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\int \text {csch}(x)dx}{b}-\frac {a \int \frac {\text {csch}(x)}{a+b \text {csch}(x)}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int i \csc (i x)dx}{b}-\frac {a \int \frac {i \csc (i x)}{a+i b \csc (i x)}dx}{b}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {i \int \csc (i x)dx}{b}-\frac {i a \int \frac {\csc (i x)}{a+i b \csc (i x)}dx}{b}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {\text {arctanh}(\cosh (x))}{b}-\frac {i a \int \frac {\csc (i x)}{a+i b \csc (i x)}dx}{b}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle -\frac {a \int \frac {1}{\frac {a \sinh (x)}{b}+1}dx}{b^2}-\frac {\text {arctanh}(\cosh (x))}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\text {arctanh}(\cosh (x))}{b}-\frac {a \int \frac {1}{1-\frac {i a \sin (i x)}{b}}dx}{b^2}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle -\frac {2 a \int \frac {1}{-\tanh ^2\left (\frac {x}{2}\right )+\frac {2 a \tanh \left (\frac {x}{2}\right )}{b}+1}d\tanh \left (\frac {x}{2}\right )}{b^2}-\frac {\text {arctanh}(\cosh (x))}{b}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {4 a \int \frac {1}{4 \left (\frac {a^2}{b^2}+1\right )-\left (\frac {2 a}{b}-2 \tanh \left (\frac {x}{2}\right )\right )^2}d\left (\frac {2 a}{b}-2 \tanh \left (\frac {x}{2}\right )\right )}{b^2}-\frac {\text {arctanh}(\cosh (x))}{b}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {2 a \text {arctanh}\left (\frac {b \left (\frac {2 a}{b}-2 \tanh \left (\frac {x}{2}\right )\right )}{2 \sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2}}-\frac {\text {arctanh}(\cosh (x))}{b}\) |
-(ArcTanh[Cosh[x]]/b) + (2*a*ArcTanh[(b*((2*a)/b - 2*Tanh[x/2]))/(2*Sqrt[a ^2 + b^2])])/(b*Sqrt[a^2 + b^2])
3.1.81.3.1 Defintions of rubi rules used
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_)^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[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Sym bol] :> Simp[1/b Int[Csc[e + f*x], x], x] - Simp[a/b Int[Csc[e + f*x]/( a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Time = 0.17 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.98
method | result | size |
default | \(\frac {2 a \,\operatorname {arctanh}\left (\frac {-2 b \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{b \sqrt {a^{2}+b^{2}}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{b}\) | \(49\) |
risch | \(\frac {\ln \left ({\mathrm e}^{x}-1\right )}{b}+\frac {a \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, a}\right )}{\sqrt {a^{2}+b^{2}}\, b}-\frac {a \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, a}\right )}{\sqrt {a^{2}+b^{2}}\, b}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{b}\) | \(124\) |
2*a/b/(a^2+b^2)^(1/2)*arctanh(1/2*(-2*b*tanh(1/2*x)+2*a)/(a^2+b^2)^(1/2))+ 1/b*ln(tanh(1/2*x))
Leaf count of result is larger than twice the leaf count of optimal. 156 vs. \(2 (46) = 92\).
Time = 0.28 (sec) , antiderivative size = 156, normalized size of antiderivative = 3.12 \[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=\frac {\sqrt {a^{2} + b^{2}} a \log \left (\frac {a^{2} \cosh \left (x\right )^{2} + a^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + a^{2} + 2 \, b^{2} + 2 \, {\left (a^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + b\right )}}{a \cosh \left (x\right )^{2} + a \sinh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) + 2 \, {\left (a \cosh \left (x\right ) + b\right )} \sinh \left (x\right ) - a}\right ) - {\left (a^{2} + b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + {\left (a^{2} + b^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{2} b + b^{3}} \]
(sqrt(a^2 + b^2)*a*log((a^2*cosh(x)^2 + a^2*sinh(x)^2 + 2*a*b*cosh(x) + a^ 2 + 2*b^2 + 2*(a^2*cosh(x) + a*b)*sinh(x) + 2*sqrt(a^2 + b^2)*(a*cosh(x) + a*sinh(x) + b))/(a*cosh(x)^2 + a*sinh(x)^2 + 2*b*cosh(x) + 2*(a*cosh(x) + b)*sinh(x) - a)) - (a^2 + b^2)*log(cosh(x) + sinh(x) + 1) + (a^2 + b^2)*l og(cosh(x) + sinh(x) - 1))/(a^2*b + b^3)
\[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=\int \frac {\operatorname {csch}^{2}{\left (x \right )}}{a + b \operatorname {csch}{\left (x \right )}}\, dx \]
Time = 0.26 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.66 \[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=-\frac {a \log \left (\frac {a e^{\left (-x\right )} - b - \sqrt {a^{2} + b^{2}}}{a e^{\left (-x\right )} - b + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} b} - \frac {\log \left (e^{\left (-x\right )} + 1\right )}{b} + \frac {\log \left (e^{\left (-x\right )} - 1\right )}{b} \]
-a*log((a*e^(-x) - b - sqrt(a^2 + b^2))/(a*e^(-x) - b + sqrt(a^2 + b^2)))/ (sqrt(a^2 + b^2)*b) - log(e^(-x) + 1)/b + log(e^(-x) - 1)/b
Time = 0.28 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.64 \[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=-\frac {a \log \left (\frac {{\left | 2 \, a e^{x} + 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a e^{x} + 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} b} - \frac {\log \left (e^{x} + 1\right )}{b} + \frac {\log \left ({\left | e^{x} - 1 \right |}\right )}{b} \]
-a*log(abs(2*a*e^x + 2*b - 2*sqrt(a^2 + b^2))/abs(2*a*e^x + 2*b + 2*sqrt(a ^2 + b^2)))/(sqrt(a^2 + b^2)*b) - log(e^x + 1)/b + log(abs(e^x - 1))/b
Time = 2.42 (sec) , antiderivative size = 287, normalized size of antiderivative = 5.74 \[ \int \frac {\text {csch}^2(x)}{a+b \text {csch}(x)} \, dx=\frac {\ln \left (32\,b-32\,b\,{\mathrm {e}}^x\right )}{b}-\frac {\ln \left (32\,b+32\,b\,{\mathrm {e}}^x\right )}{b}+\frac {a\,\ln \left (128\,b^5\,{\mathrm {e}}^x-64\,a^3\,b^2-64\,a\,b^4-128\,b^4\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}+32\,a^4\,b\,{\mathrm {e}}^x+160\,a^2\,b^3\,{\mathrm {e}}^x+64\,a\,b^3\,\sqrt {a^2+b^2}+32\,a^3\,b\,\sqrt {a^2+b^2}-96\,a^2\,b^2\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\sqrt {a^2+b^2}}{a^2\,b+b^3}-\frac {a\,\ln \left (64\,a\,b^4+64\,a^3\,b^2-128\,b^5\,{\mathrm {e}}^x-128\,b^4\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}-32\,a^4\,b\,{\mathrm {e}}^x-160\,a^2\,b^3\,{\mathrm {e}}^x+64\,a\,b^3\,\sqrt {a^2+b^2}+32\,a^3\,b\,\sqrt {a^2+b^2}-96\,a^2\,b^2\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\sqrt {a^2+b^2}}{a^2\,b+b^3} \]
log(32*b - 32*b*exp(x))/b - log(32*b + 32*b*exp(x))/b + (a*log(128*b^5*exp (x) - 64*a^3*b^2 - 64*a*b^4 - 128*b^4*exp(x)*(a^2 + b^2)^(1/2) + 32*a^4*b* exp(x) + 160*a^2*b^3*exp(x) + 64*a*b^3*(a^2 + b^2)^(1/2) + 32*a^3*b*(a^2 + b^2)^(1/2) - 96*a^2*b^2*exp(x)*(a^2 + b^2)^(1/2))*(a^2 + b^2)^(1/2))/(a^2 *b + b^3) - (a*log(64*a*b^4 + 64*a^3*b^2 - 128*b^5*exp(x) - 128*b^4*exp(x) *(a^2 + b^2)^(1/2) - 32*a^4*b*exp(x) - 160*a^2*b^3*exp(x) + 64*a*b^3*(a^2 + b^2)^(1/2) + 32*a^3*b*(a^2 + b^2)^(1/2) - 96*a^2*b^2*exp(x)*(a^2 + b^2)^ (1/2))*(a^2 + b^2)^(1/2))/(a^2*b + b^3)