3.221 \(\int \frac {\tanh (x)}{(i+\sinh (x))^2} \, dx\)

Optimal. Leaf size=36 \[ -\frac {i}{4 (\sinh (x)+i)}-\frac {1}{4 (\sinh (x)+i)^2}-\frac {1}{4} i \tan ^{-1}(\sinh (x)) \]

[Out]

-1/4*I*arctan(sinh(x))-1/4/(I+sinh(x))^2-1/4*I/(I+sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2707, 77, 203} \[ -\frac {i}{4 (\sinh (x)+i)}-\frac {1}{4 (\sinh (x)+i)^2}-\frac {1}{4} i \tan ^{-1}(\sinh (x)) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]/(I + Sinh[x])^2,x]

[Out]

(-I/4)*ArcTan[Sinh[x]] - 1/(4*(I + Sinh[x])^2) - (I/4)/(I + Sinh[x])

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 203

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

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 29, normalized size = 0.81 \[ -\frac {i \left (\sinh (x)+(\sinh (x)+i)^2 \tan ^{-1}(\sinh (x))\right )}{4 (\sinh (x)+i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]/(I + Sinh[x])^2,x]

[Out]

((-1/4*I)*(Sinh[x] + ArcTan[Sinh[x]]*(I + Sinh[x])^2))/(I + Sinh[x])^2

________________________________________________________________________________________

fricas [B]  time = 1.74, size = 95, normalized size = 2.64 \[ \frac {{\left (e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - 6 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} + 1\right )} \log \left (e^{x} + i\right ) - {\left (e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - 6 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} + 1\right )} \log \left (e^{x} - i\right ) - 2 i \, e^{\left (3 \, x\right )} + 2 i \, e^{x}}{4 \, e^{\left (4 \, x\right )} + 16 i \, e^{\left (3 \, x\right )} - 24 \, e^{\left (2 \, x\right )} - 16 i \, e^{x} + 4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+sinh(x))^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.52, size = 66, normalized size = 1.83 \[ -\frac {3 \, {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 20 i \, e^{\left (-x\right )} + 20 i \, e^{x} - 12}{16 \, {\left (e^{\left (-x\right )} - e^{x} - 2 i\right )}^{2}} + \frac {1}{8} \, \log \left (-e^{\left (-x\right )} + e^{x} + 2 i\right ) - \frac {1}{8} \, \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+sinh(x))^2,x, algorithm="giac")

[Out]

-1/16*(3*(e^(-x) - e^x)^2 - 20*I*e^(-x) + 20*I*e^x - 12)/(e^(-x) - e^x - 2*I)^2 + 1/8*log(-e^(-x) + e^x + 2*I)
 - 1/8*log(-e^(-x) + e^x - 2*I)

________________________________________________________________________________________

maple [B]  time = 0.08, size = 66, normalized size = 1.83 \[ \frac {2 i}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {i}{2 \left (\tanh \left (\frac {x}{2}\right )+i\right )}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{4}}-\frac {3}{2 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+i\right )}{4}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-i\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)/(I+sinh(x))^2,x)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.33, size = 61, normalized size = 1.69 \[ \frac {-i \, e^{\left (-x\right )} + i \, e^{\left (-3 \, x\right )}}{8 i \, e^{\left (-x\right )} - 12 \, e^{\left (-2 \, x\right )} - 8 i \, e^{\left (-3 \, x\right )} + 2 \, e^{\left (-4 \, x\right )} + 2} - \frac {1}{4} \, \log \left (e^{\left (-x\right )} + i\right ) + \frac {1}{4} \, \log \left (e^{\left (-x\right )} - i\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+sinh(x))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.87, size = 99, normalized size = 2.75 \[ \frac {\ln \left (-\frac {1}{2}+\frac {{\mathrm {e}}^x\,1{}\mathrm {i}}{2}\right )}{4}-\frac {\ln \left (\frac {1}{2}+\frac {{\mathrm {e}}^x\,1{}\mathrm {i}}{2}\right )}{4}-\frac {3}{2\,\left ({\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}\right )}+\frac {1}{{\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1+{\mathrm {e}}^{3\,x}\,4{}\mathrm {i}-{\mathrm {e}}^x\,4{}\mathrm {i}}-\frac {1{}\mathrm {i}}{2\,\left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}+\frac {2{}\mathrm {i}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log((exp(x)*1i)/2 - 1/2)/4 - log((exp(x)*1i)/2 + 1/2)/4 - 3/(2*(exp(2*x) + exp(x)*2i - 1)) + 1/(exp(3*x)*4i -
6*exp(2*x) + exp(4*x) - exp(x)*4i + 1) - 1i/(2*(exp(x) + 1i)) + 2i/(exp(2*x)*3i + exp(3*x) - 3*exp(x) - 1i)

________________________________________________________________________________________

sympy [A]  time = 0.23, size = 58, normalized size = 1.61 \[ \frac {- i e^{3 x} + i e^{x}}{2 e^{4 x} + 8 i e^{3 x} - 12 e^{2 x} - 8 i e^{x} + 2} + \operatorname {RootSum} {\left (16 z^{2} + 1, \left (i \mapsto i \log {\left (4 i + e^{x} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)/(I+sinh(x))**2,x)

[Out]

(-I*exp(3*x) + I*exp(x))/(2*exp(4*x) + 8*I*exp(3*x) - 12*exp(2*x) - 8*I*exp(x) + 2) + RootSum(16*_z**2 + 1, La
mbda(_i, _i*log(4*_i + exp(x))))

________________________________________________________________________________________