3.120 \(\int \frac {A+B \sinh (x)}{(i-\sinh (x))^2} \, dx\)

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

[Out]

1/3*(I*A-B)*cosh(x)/(I-sinh(x))^2+1/3*(A-2*I*B)*cosh(x)/(I-sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2750, 2648} \[ \frac {(A-2 i B) \cosh (x)}{3 (-\sinh (x)+i)}+\frac {(-B+i A) \cosh (x)}{3 (-\sinh (x)+i)^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((I*A - B)*Cosh[x])/(3*(I - Sinh[x])^2) + ((A - (2*I)*B)*Cosh[x])/(3*(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 2750

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 32, normalized size = 0.65 \[ \frac {\cosh (x) (-(A-2 i B) \sinh (x)+2 i A+B)}{3 (\sinh (x)-i)^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 46, normalized size = 0.94 \[ -\frac {6 \, B e^{\left (2 \, x\right )} + {\left (6 \, A - 6 i \, B\right )} e^{x} - 2 i \, A - 4 \, B}{3 \, e^{\left (3 \, x\right )} - 9 i \, e^{\left (2 \, x\right )} - 9 \, e^{x} + 3 i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(6*B*e^(2*x) + (6*A - 6*I*B)*e^x - 2*I*A - 4*B)/(3*e^(3*x) - 9*I*e^(2*x) - 9*e^x + 3*I)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 32, normalized size = 0.65 \[ -\frac {6 \, B e^{\left (2 \, x\right )} + 6 \, A e^{x} - 6 i \, B e^{x} - 2 i \, A - 4 \, B}{3 \, {\left (e^{x} - i\right )}^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 52, normalized size = 1.06 \[ -\frac {2 A}{\tanh \left (\frac {x}{2}\right )-i}-\frac {2 i A -2 B}{\left (\tanh \left (\frac {x}{2}\right )-i\right )^{2}}-\frac {2 \left (-2 i B -2 A \right )}{3 \left (\tanh \left (\frac {x}{2}\right )-i\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*A/(tanh(1/2*x)-I)-(2*I*A-2*B)/(tanh(1/2*x)-I)^2-2/3*(-2*I*B-2*A)/(tanh(1/2*x)-I)^3

________________________________________________________________________________________

maxima [B]  time = 0.34, size = 141, normalized size = 2.88 \[ -A {\left (\frac {6 \, e^{\left (-x\right )}}{9 \, e^{\left (-x\right )} - 9 i \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 i} + \frac {2 i}{9 \, e^{\left (-x\right )} - 9 i \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 i}\right )} + \frac {1}{2} \, B {\left (\frac {12 i \, e^{\left (-x\right )}}{9 \, e^{\left (-x\right )} - 9 i \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 i} + \frac {12 \, e^{\left (-2 \, x\right )}}{9 \, e^{\left (-x\right )} - 9 i \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 i} - \frac {8}{9 \, e^{\left (-x\right )} - 9 i \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-3 \, x\right )} + 3 i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-A*(6*e^(-x)/(9*e^(-x) - 9*I*e^(-2*x) - 3*e^(-3*x) + 3*I) + 2*I/(9*e^(-x) - 9*I*e^(-2*x) - 3*e^(-3*x) + 3*I))
+ 1/2*B*(12*I*e^(-x)/(9*e^(-x) - 9*I*e^(-2*x) - 3*e^(-3*x) + 3*I) + 12*e^(-2*x)/(9*e^(-x) - 9*I*e^(-2*x) - 3*e
^(-3*x) + 3*I) - 8/(9*e^(-x) - 9*I*e^(-2*x) - 3*e^(-3*x) + 3*I))

________________________________________________________________________________________

mupad [B]  time = 0.60, size = 37, normalized size = 0.76 \[ \frac {\frac {2\,A}{3}-\frac {B\,4{}\mathrm {i}}{3}+{\mathrm {e}}^x\,\left (2\,B+A\,2{}\mathrm {i}\right )+B\,{\mathrm {e}}^{2\,x}\,2{}\mathrm {i}}{{\left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.22, size = 51, normalized size = 1.04 \[ \frac {- 2 i A + 6 B e^{2 x} - 4 B + \left (6 A - 6 i B\right ) e^{x}}{- 3 e^{3 x} + 9 i e^{2 x} + 9 e^{x} - 3 i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-2*I*A + 6*B*exp(2*x) - 4*B + (6*A - 6*I*B)*exp(x))/(-3*exp(3*x) + 9*I*exp(2*x) + 9*exp(x) - 3*I)

________________________________________________________________________________________