3.115 \(\int \frac {A+B \sinh (x)}{i+\sinh (x)} \, dx\)

Optimal. Leaf size=23 \[ B x-\frac {(B+i A) \cosh (x)}{\sinh (x)+i} \]

[Out]

B*x-(I*A+B)*cosh(x)/(I+sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2735, 2648} \[ B x-\frac {(B+i A) \cosh (x)}{\sinh (x)+i} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Sinh[x])/(I + Sinh[x]),x]

[Out]

B*x - ((I*A + B)*Cosh[x])/(I + Sinh[x])

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rubi steps

\begin {align*} \int \frac {A+B \sinh (x)}{i+\sinh (x)} \, dx &=B x-(-A+i B) \int \frac {1}{i+\sinh (x)} \, dx\\ &=B x-\frac {(i A+B) \cosh (x)}{i+\sinh (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.25, size = 53, normalized size = 2.30 \[ \cosh (x) \left (\frac {2 i B \sin ^{-1}\left (\frac {\sqrt {1-i \sinh (x)}}{\sqrt {2}}\right )}{\sqrt {\cosh ^2(x)}}-\frac {B+i A}{\sinh (x)+i}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Sinh[x])/(I + Sinh[x]),x]

[Out]

Cosh[x]*(((2*I)*B*ArcSin[Sqrt[1 - I*Sinh[x]]/Sqrt[2]])/Sqrt[Cosh[x]^2] - (I*A + B)/(I + Sinh[x]))

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 23, normalized size = 1.00 \[ \frac {B x e^{x} + i \, B x - 2 \, A + 2 i \, B}{e^{x} + i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sinh(x))/(I+sinh(x)),x, algorithm="fricas")

[Out]

(B*x*e^x + I*B*x - 2*A + 2*I*B)/(e^x + I)

________________________________________________________________________________________

giac [A]  time = 0.20, size = 17, normalized size = 0.74 \[ B x - \frac {2 \, {\left (A - i \, B\right )}}{e^{x} + i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sinh(x))/(I+sinh(x)),x, algorithm="giac")

[Out]

B*x - 2*(A - I*B)/(e^x + I)

________________________________________________________________________________________

maple [B]  time = 0.04, size = 46, normalized size = 2.00 \[ -\frac {2 B}{\tanh \left (\frac {x}{2}\right )+i}-\frac {2 i A}{\tanh \left (\frac {x}{2}\right )+i}-B \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+B \ln \left (\tanh \left (\frac {x}{2}\right )+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sinh(x))/(I+sinh(x)),x)

[Out]

-2/(tanh(1/2*x)+I)*B-2*I/(tanh(1/2*x)+I)*A-B*ln(tanh(1/2*x)-1)+B*ln(tanh(1/2*x)+1)

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 26, normalized size = 1.13 \[ B {\left (x + \frac {2 i}{e^{\left (-x\right )} - i}\right )} - \frac {2 \, A}{e^{\left (-x\right )} - i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sinh(x))/(I+sinh(x)),x, algorithm="maxima")

[Out]

B*(x + 2*I/(e^(-x) - I)) - 2*A/(e^(-x) - I)

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 21, normalized size = 0.91 \[ B\,x-\frac {2\,A-B\,2{}\mathrm {i}}{{\mathrm {e}}^x+1{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*sinh(x))/(sinh(x) + 1i),x)

[Out]

B*x - (2*A - B*2i)/(exp(x) + 1i)

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 19, normalized size = 0.83 \[ B x + \frac {- 2 i A - 2 B}{i e^{x} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sinh(x))/(I+sinh(x)),x)

[Out]

B*x + (-2*I*A - 2*B)/(I*exp(x) - 1)

________________________________________________________________________________________