Integrand size = 11, antiderivative size = 61 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=-\frac {b \arctan (\sinh (x))}{a^2+b^2}+\frac {b^2 \log (a+b \text {csch}(x))}{a \left (a^2+b^2\right )}+\frac {\log (\sinh (x))}{a}-\frac {a \log (\tanh (x))}{a^2+b^2} \] Output:
-b*arctan(sinh(x))/(a^2+b^2)+b^2*ln(a+b*csch(x))/a/(a^2+b^2)+ln(sinh(x))/a -a*ln(tanh(x))/(a^2+b^2)
Result contains complex when optimal does not.
Time = 0.04 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.03 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=\frac {a (a+i b) \log (i-\sinh (x))+a (a-i b) \log (i+\sinh (x))+2 b^2 \log (b+a \sinh (x))}{2 a \left (a^2+b^2\right )} \] Input:
Integrate[Tanh[x]/(a + b*Csch[x]),x]
Output:
(a*(a + I*b)*Log[I - Sinh[x]] + a*(a - I*b)*Log[I + Sinh[x]] + 2*b^2*Log[b + a*Sinh[x]])/(2*a*(a^2 + b^2))
Time = 0.35 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.38, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3042, 26, 4373, 25, 615, 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 \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i}{\cot (i x) (a+i b \csc (i x))}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {1}{\cot (i x) (a+i b \csc (i x))}dx\) |
\(\Big \downarrow \) 4373 |
\(\displaystyle b^2 \int -\frac {\sinh (x)}{b (a+b \text {csch}(x)) \left (\text {csch}^2(x) b^2+b^2\right )}d(b \text {csch}(x))\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -b^2 \int \frac {\sinh (x)}{b (a+b \text {csch}(x)) \left (\text {csch}^2(x) b^2+b^2\right )}d(b \text {csch}(x))\) |
\(\Big \downarrow \) 615 |
\(\displaystyle -b^2 \int \left (\frac {-b^2-a \text {csch}(x) b}{b^2 \left (a^2+b^2\right ) \left (\text {csch}^2(x) b^2+b^2\right )}+\frac {\sinh (x)}{a b^3}-\frac {1}{a \left (a^2+b^2\right ) (a+b \text {csch}(x))}\right )d(b \text {csch}(x))\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle b^2 \left (\frac {\arctan (\text {csch}(x))}{b \left (a^2+b^2\right )}+\frac {a \log \left (b^2 \text {csch}^2(x)+b^2\right )}{2 b^2 \left (a^2+b^2\right )}+\frac {\log (a+b \text {csch}(x))}{a \left (a^2+b^2\right )}-\frac {\log (b \text {csch}(x))}{a b^2}\right )\) |
Input:
Int[Tanh[x]/(a + b*Csch[x]),x]
Output:
b^2*(ArcTan[Csch[x]]/(b*(a^2 + b^2)) - Log[b*Csch[x]]/(a*b^2) + Log[a + b* Csch[x]]/(a*(a^2 + b^2)) + (a*Log[b^2 + b^2*Csch[x]^2])/(2*b^2*(a^2 + b^2) ))
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[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1)) Subst[Int[(b^2 - x^ 2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
Time = 0.24 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.59
method | result | size |
default | \(\frac {4 a \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )-8 b \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{4 a^{2}+4 b^{2}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a}+\frac {b^{2} \ln \left (-b \tanh \left (\frac {x}{2}\right )^{2}+2 a \tanh \left (\frac {x}{2}\right )+b \right )}{a \left (a^{2}+b^{2}\right )}\) | \(97\) |
risch | \(\frac {x}{a}-\frac {2 a x}{a^{2}+b^{2}}-\frac {2 b^{2} x}{a \left (a^{2}+b^{2}\right )}+\frac {i \ln \left ({\mathrm e}^{x}-i\right ) b}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{x}-i\right ) a}{a^{2}+b^{2}}-\frac {i \ln \left ({\mathrm e}^{x}+i\right ) b}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{x}+i\right ) a}{a^{2}+b^{2}}+\frac {b^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}-1\right )}{a \left (a^{2}+b^{2}\right )}\) | \(141\) |
Input:
int(tanh(x)/(a+b*csch(x)),x,method=_RETURNVERBOSE)
Output:
8/(4*a^2+4*b^2)*(1/2*a*ln(tanh(1/2*x)^2+1)-b*arctan(tanh(1/2*x)))-1/a*ln(t anh(1/2*x)-1)-1/a*ln(tanh(1/2*x)+1)+b^2/a/(a^2+b^2)*ln(-b*tanh(1/2*x)^2+2* a*tanh(1/2*x)+b)
Time = 0.09 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.23 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=-\frac {2 \, a b \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - b^{2} \log \left (\frac {2 \, {\left (a \sinh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - a^{2} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + {\left (a^{2} + b^{2}\right )} x}{a^{3} + a b^{2}} \] Input:
integrate(tanh(x)/(a+b*csch(x)),x, algorithm="fricas")
Output:
-(2*a*b*arctan(cosh(x) + sinh(x)) - b^2*log(2*(a*sinh(x) + b)/(cosh(x) - s inh(x))) - a^2*log(2*cosh(x)/(cosh(x) - sinh(x))) + (a^2 + b^2)*x)/(a^3 + a*b^2)
\[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=\int \frac {\tanh {\left (x \right )}}{a + b \operatorname {csch}{\left (x \right )}}\, dx \] Input:
integrate(tanh(x)/(a+b*csch(x)),x)
Output:
Integral(tanh(x)/(a + b*csch(x)), x)
Time = 0.11 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.21 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=\frac {b^{2} \log \left (-2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} - a\right )}{a^{3} + a b^{2}} + \frac {2 \, b \arctan \left (e^{\left (-x\right )}\right )}{a^{2} + b^{2}} + \frac {a \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{2} + b^{2}} + \frac {x}{a} \] Input:
integrate(tanh(x)/(a+b*csch(x)),x, algorithm="maxima")
Output:
b^2*log(-2*b*e^(-x) + a*e^(-2*x) - a)/(a^3 + a*b^2) + 2*b*arctan(e^(-x))/( a^2 + b^2) + a*log(e^(-2*x) + 1)/(a^2 + b^2) + x/a
Time = 0.12 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.46 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=\frac {b^{2} \log \left ({\left | -a {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, b \right |}\right )}{a^{3} + a b^{2}} - \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} b}{2 \, {\left (a^{2} + b^{2}\right )}} + \frac {a \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}{2 \, {\left (a^{2} + b^{2}\right )}} \] Input:
integrate(tanh(x)/(a+b*csch(x)),x, algorithm="giac")
Output:
b^2*log(abs(-a*(e^(-x) - e^x) + 2*b))/(a^3 + a*b^2) - 1/2*(pi + 2*arctan(1 /2*(e^(2*x) - 1)*e^(-x)))*b/(a^2 + b^2) + 1/2*a*log((e^(-x) - e^x)^2 + 4)/ (a^2 + b^2)
Time = 3.80 (sec) , antiderivative size = 132, normalized size of antiderivative = 2.16 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=\frac {\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )}{a-b\,1{}\mathrm {i}}-\frac {x}{a}+\frac {b^2\,\ln \left (a^5\,{\mathrm {e}}^{2\,x}-a\,b^4-a^5+a^3\,b^2+2\,b^5\,{\mathrm {e}}^x-a^3\,b^2\,{\mathrm {e}}^{2\,x}+2\,a^4\,b\,{\mathrm {e}}^x+a\,b^4\,{\mathrm {e}}^{2\,x}-2\,a^2\,b^3\,{\mathrm {e}}^x\right )}{a^3+a\,b^2}+\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{-b+a\,1{}\mathrm {i}} \] Input:
int(tanh(x)/(a + b/sinh(x)),x)
Output:
log(exp(x)*1i + 1)/(a - b*1i) + (log(exp(x) + 1i)*1i)/(a*1i - b) - x/a + ( b^2*log(a^5*exp(2*x) - a*b^4 - a^5 + a^3*b^2 + 2*b^5*exp(x) - a^3*b^2*exp( 2*x) + 2*a^4*b*exp(x) + a*b^4*exp(2*x) - 2*a^2*b^3*exp(x)))/(a*b^2 + a^3)
Time = 0.24 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.11 \[ \int \frac {\tanh (x)}{a+b \text {csch}(x)} \, dx=\frac {-2 \mathit {atan} \left (e^{x}\right ) a b +\mathrm {log}\left (e^{2 x}+1\right ) a^{2}+\mathrm {log}\left (e^{2 x} a +2 e^{x} b -a \right ) b^{2}-a^{2} x -b^{2} x}{a \left (a^{2}+b^{2}\right )} \] Input:
int(tanh(x)/(a+b*csch(x)),x)
Output:
( - 2*atan(e**x)*a*b + log(e**(2*x) + 1)*a**2 + log(e**(2*x)*a + 2*e**x*b - a)*b**2 - a**2*x - b**2*x)/(a*(a**2 + b**2))