3.84 \(\int \frac {\text {csch}(x)}{a+b \tanh (x)} \, dx\)

Optimal. Leaf size=52 \[ -\frac {b \tan ^{-1}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}}-\frac {\tanh ^{-1}(\cosh (x))}{a} \]

[Out]

-arctanh(cosh(x))/a-b*arctan((b*cosh(x)+a*sinh(x))/(a^2-b^2)^(1/2))/a/(a^2-b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {3518, 3110, 3770, 3074, 206} \[ -\frac {b \tan ^{-1}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}}-\frac {\tanh ^{-1}(\cosh (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Csch[x]/(a + b*Tanh[x]),x]

[Out]

-((b*ArcTan[(b*Cosh[x] + a*Sinh[x])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2])) - ArcTanh[Cosh[x]]/a

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3074

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Dist[d^(-1), Subst[Int
[1/(a^2 + b^2 - x^2), x], x, b*Cos[c + d*x] - a*Sin[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2,
0]

Rule 3110

Int[(cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.))/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(
c_.) + (d_.)*(x_)]), x_Symbol] :> Int[ExpandTrig[(cos[c + d*x]^m*sin[c + d*x]^n)/(a*cos[c + d*x] + b*sin[c + d
*x]), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IntegersQ[m, n]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\text {csch}(x)}{a+b \tanh (x)} \, dx &=\int \frac {\coth (x)}{a \cosh (x)+b \sinh (x)} \, dx\\ &=i \int \left (-\frac {i \text {csch}(x)}{a}+\frac {i b}{a (a \cosh (x)+b \sinh (x))}\right ) \, dx\\ &=\frac {\int \text {csch}(x) \, dx}{a}-\frac {b \int \frac {1}{a \cosh (x)+b \sinh (x)} \, dx}{a}\\ &=-\frac {\tanh ^{-1}(\cosh (x))}{a}-\frac {(i b) \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )}{a}\\ &=-\frac {b \tan ^{-1}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}}-\frac {\tanh ^{-1}(\cosh (x))}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 59, normalized size = 1.13 \[ \frac {\log \left (\tanh \left (\frac {x}{2}\right )\right )-\frac {2 b \tan ^{-1}\left (\frac {a \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a-b} \sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b}}}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csch[x]/(a + b*Tanh[x]),x]

[Out]

((-2*b*ArcTan[(b + a*Tanh[x/2])/(Sqrt[a - b]*Sqrt[a + b])])/(Sqrt[a - b]*Sqrt[a + b]) + Log[Tanh[x/2]])/a

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 237, normalized size = 4.56 \[ \left [-\frac {\sqrt {-a^{2} + b^{2}} b \log \left (\frac {{\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} + 2 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )} - a + b}{{\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} + a - b}\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) - {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right )}{a^{3} - a b^{2}}, \frac {2 \, \sqrt {a^{2} - b^{2}} b \arctan \left (\frac {\sqrt {a^{2} - b^{2}}}{{\left (a + b\right )} \cosh \relax (x) + {\left (a + b\right )} \sinh \relax (x)}\right ) - {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) + {\left (a^{2} - b^{2}\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right )}{a^{3} - a b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*tanh(x)),x, algorithm="fricas")

[Out]

[-(sqrt(-a^2 + b^2)*b*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)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 + a - b))
+ (a^2 - b^2)*log(cosh(x) + sinh(x) + 1) - (a^2 - b^2)*log(cosh(x) + sinh(x) - 1))/(a^3 - a*b^2), (2*sqrt(a^2
- b^2)*b*arctan(sqrt(a^2 - b^2)/((a + b)*cosh(x) + (a + b)*sinh(x))) - (a^2 - b^2)*log(cosh(x) + sinh(x) + 1)
+ (a^2 - b^2)*log(cosh(x) + sinh(x) - 1))/(a^3 - a*b^2)]

________________________________________________________________________________________

giac [A]  time = 0.12, size = 60, normalized size = 1.15 \[ -\frac {2 \, b \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} a} - \frac {\log \left (e^{x} + 1\right )}{a} + \frac {\log \left ({\left | e^{x} - 1 \right |}\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*tanh(x)),x, algorithm="giac")

[Out]

-2*b*arctan((a*e^x + b*e^x)/sqrt(a^2 - b^2))/(sqrt(a^2 - b^2)*a) - log(e^x + 1)/a + log(abs(e^x - 1))/a

________________________________________________________________________________________

maple [A]  time = 0.11, size = 53, normalized size = 1.02 \[ -\frac {2 b \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{a \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(x)/(a+b*tanh(x)),x)

[Out]

-2/a*b/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tanh(1/2*x)+2*b)/(a^2-b^2)^(1/2))+1/a*ln(tanh(1/2*x))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*tanh(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more details)Is 4*b^2-4*a^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.40, size = 177, normalized size = 3.40 \[ \frac {\ln \left (32\,a\,b-32\,a^2+32\,a^2\,{\mathrm {e}}^x-32\,a\,b\,{\mathrm {e}}^x\right )}{a}-\frac {\ln \left (32\,a\,b-32\,a^2-32\,a^2\,{\mathrm {e}}^x+32\,a\,b\,{\mathrm {e}}^x\right )}{a}-\frac {b\,\ln \left (32\,a\,b^2\,{\mathrm {e}}^x+32\,a^2\,b\,{\mathrm {e}}^x-32\,a\,b\,\sqrt {b^2-a^2}\right )\,\sqrt {b^2-a^2}}{a\,b^2-a^3}+\frac {b\,\ln \left (32\,a\,b^2\,{\mathrm {e}}^x+32\,a^2\,b\,{\mathrm {e}}^x+32\,a\,b\,\sqrt {b^2-a^2}\right )\,\sqrt {b^2-a^2}}{a\,b^2-a^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sinh(x)*(a + b*tanh(x))),x)

[Out]

log(32*a*b - 32*a^2 + 32*a^2*exp(x) - 32*a*b*exp(x))/a - log(32*a*b - 32*a^2 - 32*a^2*exp(x) + 32*a*b*exp(x))/
a - (b*log(32*a*b^2*exp(x) + 32*a^2*b*exp(x) - 32*a*b*(b^2 - a^2)^(1/2))*(b^2 - a^2)^(1/2))/(a*b^2 - a^3) + (b
*log(32*a*b^2*exp(x) + 32*a^2*b*exp(x) + 32*a*b*(b^2 - a^2)^(1/2))*(b^2 - a^2)^(1/2))/(a*b^2 - a^3)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {csch}{\relax (x )}}{a + b \tanh {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(x)/(a+b*tanh(x)),x)

[Out]

Integral(csch(x)/(a + b*tanh(x)), x)

________________________________________________________________________________________