3.626 \(\int (\text {sech}(x)+i \tanh (x))^3 \, dx\)

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

[Out]

-I*ln(I+sinh(x))-2*I/(1-I*sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 26, 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 = {4391, 2667, 43} \[ -\frac {2 i}{1-i \sinh (x)}-i \log (\sinh (x)+i) \]

Antiderivative was successfully verified.

[In]

Int[(Sech[x] + I*Tanh[x])^3,x]

[Out]

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

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2667

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(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]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 4391

Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x_)]^(n_.))^(p_), x_Symbol] :> Int[A
ctivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a*Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 39, normalized size = 1.50 \[ \frac {1}{2} i \tanh ^2(x)-\frac {3}{2} i \text {sech}^2(x)-\tan ^{-1}(\sinh (x))-i \log (\cosh (x))+2 \tanh (x) \text {sech}(x) \]

Antiderivative was successfully verified.

[In]

Integrate[(Sech[x] + I*Tanh[x])^3,x]

[Out]

-ArcTan[Sinh[x]] - I*Log[Cosh[x]] - ((3*I)/2)*Sech[x]^2 + 2*Sech[x]*Tanh[x] + (I/2)*Tanh[x]^2

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 49, normalized size = 1.88 \[ \frac {i \, x e^{\left (2 \, x\right )} - 2 \, {\left (x - 2\right )} e^{x} + {\left (-2 i \, e^{\left (2 \, x\right )} + 4 \, e^{x} + 2 i\right )} \log \left (e^{x} + i\right ) - i \, x}{e^{\left (2 \, x\right )} + 2 i \, e^{x} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sech(x)+I*tanh(x))^3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 21, normalized size = 0.81 \[ i \, x + \frac {4 \, e^{x}}{{\left (e^{x} + i\right )}^{2}} - 2 i \, \log \left (e^{x} + i\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sech(x)+I*tanh(x))^3,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.34, size = 41, normalized size = 1.58 \[ -\mathrm {sech}\relax (x ) \tanh \relax (x )-2 \arctan \left ({\mathrm e}^{x}\right )-\frac {3 i}{2 \cosh \relax (x )^{2}}+\frac {3 \sinh \relax (x )}{\cosh \relax (x )^{2}}-i \ln \left (\cosh \relax (x )\right )+\frac {i \left (\tanh ^{2}\relax (x )\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sech(x)+I*tanh(x))^3,x)

[Out]

-sech(x)*tanh(x)-2*arctan(exp(x))-3/2*I/cosh(x)^2+3/cosh(x)^2*sinh(x)-I*ln(cosh(x))+1/2*I*tanh(x)^2

________________________________________________________________________________________

maxima [B]  time = 0.71, size = 73, normalized size = 2.81 \[ \frac {3}{2} i \, \tanh \relax (x)^{2} - i \, x + \frac {4 \, {\left (e^{\left (-x\right )} - e^{\left (-3 \, x\right )}\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} - \frac {2 i \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} + 2 \, \arctan \left (e^{\left (-x\right )}\right ) - i \, \log \left (e^{\left (-2 \, x\right )} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sech(x)+I*tanh(x))^3,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.65, size = 39, normalized size = 1.50 \[ x\,1{}\mathrm {i}-\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,2{}\mathrm {i}-\frac {4{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}+\frac {4}{{\mathrm {e}}^x+1{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tanh(x)*1i + 1/cosh(x))^3,x)

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i \tanh {\relax (x )} + \operatorname {sech}{\relax (x )}\right )^{3}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sech(x)+I*tanh(x))**3,x)

[Out]

Integral((I*tanh(x) + sech(x))**3, x)

________________________________________________________________________________________