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/4*I*ln(I-sinh(x))-1/4*I*ln(I+sinh(x))-1/2*I/(1+I*sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 45, normalized size of antiderivative = 1.00, 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 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]))

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]

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.04, 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

________________________________________________________________________________________

fricas [B]  time = 1.22, size = 71, normalized size = 1.58 \[ \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} \]

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)

________________________________________________________________________________________

giac [B]  time = 0.12, size = 55, normalized size = 1.22 \[ \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 ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.21, size = 65, normalized size = 1.44 \[ i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )-\frac {i \ln \left (\tanh \left (\frac {x}{2}\right )+i\right )}{2}-\frac {3 i \ln \left (\tanh \left (\frac {x}{2}\right )-i\right )}{2}+\frac {i}{\left (\tanh \left (\frac {x}{2}\right )-i\right )^{2}}+\frac {1}{\tanh \left (\frac {x}{2}\right )-i} \]

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)+I*ln(tanh(1/2*x)+1)-1/2*I*ln(tanh(1/2*x)+I)-3/2*I*ln(tanh(1/2*x)-I)+I/(tanh(1/2*x)-I)^2+1/
(tanh(1/2*x)-I)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 45, normalized size = 1.00 \[ -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 ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 0.23, size = 50, normalized size = 1.11 \[ x\,1{}\mathrm {i}+\mathrm {atan}\left ({\mathrm {e}}^x\right )-\ln \left (\left ({\mathrm {e}}^x-\mathrm {i}\right )\,\left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}+\frac {1{}\mathrm {i}}{1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {1}{{\mathrm {e}}^x-\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)/(1/sinh(x) + 1i),x)

[Out]

x*1i + atan(exp(x)) - log((exp(x) - 1i)*(exp(x) + 1i))*1i + 1i/(exp(x)*2i - exp(2*x) + 1) - 1/(exp(x) - 1i)

________________________________________________________________________________________

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

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)

________________________________________________________________________________________