3.106 \(\int \frac{\tanh (x)}{i+\text{csch}(x)} \, dx\)

Optimal. Leaf size=45 \[ -\frac{i}{2 (1+i \sinh (x))}-\frac{3}{4} i \log (-\sinh (x)+i)-\frac{1}{4} i \log (\sinh (x)+i) \]

[Out]

((-3*I)/4)*Log[I - Sinh[x]] - (I/4)*Log[I + Sinh[x]] - (I/2)/(1 + I*Sinh[x])

________________________________________________________________________________________

Rubi [A]  time = 0.0475287, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3879, 88} \[ -\frac{i}{2 (1+i \sinh (x))}-\frac{3}{4} i \log (-\sinh (x)+i)-\frac{1}{4} i \log (\sinh (x)+i) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]/(I + Csch[x]),x]

[Out]

((-3*I)/4)*Log[I - Sinh[x]] - (I/4)*Log[I + Sinh[x]] - (I/2)/(1 + I*Sinh[x])

Rule 3879

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[1/(a^(m - n
- 1)*b^n*d), Subst[Int[((a - b*x)^((m - 1)/2)*(a + b*x)^((m - 1)/2 + n))/x^(m + n), x], x, Sin[c + d*x]], x] /
; FreeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && IntegerQ[n]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rubi steps

\begin{align*} \int \frac{\tanh (x)}{i+\text{csch}(x)} \, dx &=\operatorname{Subst}\left (\int \frac{x^2}{(i-i x) (i+i x)^2} \, dx,x,i \sinh (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{i}{4 (-1+x)}+\frac{i}{2 (1+x)^2}-\frac{3 i}{4 (1+x)}\right ) \, dx,x,i \sinh (x)\right )\\ &=-\frac{3}{4} i \log (i-\sinh (x))-\frac{1}{4} i \log (i+\sinh (x))-\frac{i}{2 (1+i \sinh (x))}\\ \end{align*}

Mathematica [A]  time = 0.0374018, size = 39, normalized size = 0.87 \[ \frac{1}{4} \left (-\frac{2}{\sinh (x)-i}-3 i \log (-\sinh (x)+i)-i \log (\sinh (x)+i)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]/(I + Csch[x]),x]

[Out]

((-3*I)*Log[I - Sinh[x]] - I*Log[I + Sinh[x]] - 2/(-I + Sinh[x]))/4

________________________________________________________________________________________

Maple [A]  time = 0.045, size = 65, normalized size = 1.4 \begin{align*} i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) -{\frac{3\,i}{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) +{i \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}+i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) -{\frac{i}{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)/(I+csch(x)),x)

[Out]

I*ln(tanh(1/2*x)+1)-3/2*I*ln(tanh(1/2*x)-I)+I/(tanh(1/2*x)-I)^2+1/(tanh(1/2*x)-I)+I*ln(tanh(1/2*x)-1)-1/2*I*ln
(tanh(1/2*x)+I)

________________________________________________________________________________________

Maxima [A]  time = 1.03818, size = 61, normalized size = 1.36 \begin{align*} -i \, x + \frac{e^{\left (-x\right )}}{2 i \, e^{\left (-x\right )} + e^{\left (-2 \, x\right )} - 1} - \frac{1}{2} i \, \log \left (i \, e^{\left (-x\right )} + 1\right ) - \frac{3}{2} i \, \log \left (i \, e^{\left (-x\right )} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+csch(x)),x, algorithm="maxima")

[Out]

-I*x + e^(-x)/(2*I*e^(-x) + e^(-2*x) - 1) - 1/2*I*log(I*e^(-x) + 1) - 3/2*I*log(I*e^(-x) - 1)

________________________________________________________________________________________

Fricas [B]  time = 1.6308, size = 207, normalized size = 4.6 \begin{align*} \frac{2 i \, x e^{\left (2 \, x\right )} + 2 \,{\left (2 \, x - 1\right )} e^{x} +{\left (-i \, e^{\left (2 \, x\right )} - 2 \, e^{x} + i\right )} \log \left (e^{x} + i\right ) +{\left (-3 i \, e^{\left (2 \, x\right )} - 6 \, e^{x} + 3 i\right )} \log \left (e^{x} - i\right ) - 2 i \, x}{2 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} - 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+csch(x)),x, algorithm="fricas")

[Out]

(2*I*x*e^(2*x) + 2*(2*x - 1)*e^x + (-I*e^(2*x) - 2*e^x + I)*log(e^x + I) + (-3*I*e^(2*x) - 6*e^x + 3*I)*log(e^
x - I) - 2*I*x)/(2*e^(2*x) - 4*I*e^x - 2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tanh{\left (x \right )}}{\operatorname{csch}{\left (x \right )} + i}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+csch(x)),x)

[Out]

Integral(tanh(x)/(csch(x) + I), x)

________________________________________________________________________________________

Giac [B]  time = 1.1512, size = 74, normalized size = 1.64 \begin{align*} \frac{3 i \, e^{\left (-x\right )} - 3 i \, e^{x} - 2}{4 \,{\left (e^{\left (-x\right )} - e^{x} + 2 i\right )}} - \frac{1}{4} i \, \log \left (-i \, e^{\left (-x\right )} + i \, e^{x} - 2\right ) - \frac{3}{4} i \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+csch(x)),x, algorithm="giac")

[Out]

1/4*(3*I*e^(-x) - 3*I*e^x - 2)/(e^(-x) - e^x + 2*I) - 1/4*I*log(-I*e^(-x) + I*e^x - 2) - 3/4*I*log(-e^(-x) + e
^x - 2*I)