### 3.690 $$\int \frac{\sinh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx$$

Optimal. Leaf size=101 $\frac{a^2 b x}{\left (a^2-b^2\right )^2}+\frac{b x}{2 \left (a^2-b^2\right )}+\frac{a \sinh ^2(x)}{2 \left (a^2-b^2\right )}-\frac{b \sinh (x) \cosh (x)}{2 \left (a^2-b^2\right )}-\frac{a^3 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}$

[Out]

(a^2*b*x)/(a^2 - b^2)^2 + (b*x)/(2*(a^2 - b^2)) - (a^3*Log[a*Cosh[x] + b*Sinh[x]])/(a^2 - b^2)^2 - (b*Cosh[x]*
Sinh[x])/(2*(a^2 - b^2)) + (a*Sinh[x]^2)/(2*(a^2 - b^2))

________________________________________________________________________________________

Rubi [A]  time = 0.132672, antiderivative size = 101, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.312, Rules used = {3099, 3097, 3133, 2635, 8} $\frac{a^2 b x}{\left (a^2-b^2\right )^2}+\frac{b x}{2 \left (a^2-b^2\right )}+\frac{a \sinh ^2(x)}{2 \left (a^2-b^2\right )}-\frac{b \sinh (x) \cosh (x)}{2 \left (a^2-b^2\right )}-\frac{a^3 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}$

Antiderivative was successfully veriﬁed.

[In]

Int[Sinh[x]^3/(a*Cosh[x] + b*Sinh[x]),x]

[Out]

(a^2*b*x)/(a^2 - b^2)^2 + (b*x)/(2*(a^2 - b^2)) - (a^3*Log[a*Cosh[x] + b*Sinh[x]])/(a^2 - b^2)^2 - (b*Cosh[x]*
Sinh[x])/(2*(a^2 - b^2)) + (a*Sinh[x]^2)/(2*(a^2 - b^2))

Rule 3099

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

Rule 3097

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

Rule 3133

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((b*B + c*C)*x)/(b^2 + c^2), x] + Simp[((c*B - b*C)*L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]])/(e*(b^2 + c^2)), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\sinh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx &=\frac{a \sinh ^2(x)}{2 \left (a^2-b^2\right )}-\frac{a^2 \int \frac{\sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}-\frac{b \int \sinh ^2(x) \, dx}{a^2-b^2}\\ &=\frac{a^2 b x}{\left (a^2-b^2\right )^2}-\frac{b \cosh (x) \sinh (x)}{2 \left (a^2-b^2\right )}+\frac{a \sinh ^2(x)}{2 \left (a^2-b^2\right )}-\frac{\left (i a^3\right ) \int \frac{-i b \cosh (x)-i a \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{\left (a^2-b^2\right )^2}+\frac{b \int 1 \, dx}{2 \left (a^2-b^2\right )}\\ &=\frac{a^2 b x}{\left (a^2-b^2\right )^2}+\frac{b x}{2 \left (a^2-b^2\right )}-\frac{a^3 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}-\frac{b \cosh (x) \sinh (x)}{2 \left (a^2-b^2\right )}+\frac{a \sinh ^2(x)}{2 \left (a^2-b^2\right )}\\ \end{align*}

Mathematica [A]  time = 0.144926, size = 75, normalized size = 0.74 $\frac{\left (b^3-a^2 b\right ) \sinh (2 x)+a \left (a^2-b^2\right ) \cosh (2 x)+6 a^2 b x-4 a^3 \log (a \cosh (x)+b \sinh (x))-2 b^3 x}{4 (a-b)^2 (a+b)^2}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sinh[x]^3/(a*Cosh[x] + b*Sinh[x]),x]

[Out]

(6*a^2*b*x - 2*b^3*x + a*(a^2 - b^2)*Cosh[2*x] - 4*a^3*Log[a*Cosh[x] + b*Sinh[x]] + (-(a^2*b) + b^3)*Sinh[2*x]
)/(4*(a - b)^2*(a + b)^2)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 175, normalized size = 1.7 \begin{align*} -16\,{\frac{1}{ \left ( 32\,a-32\,b \right ) \left ( \tanh \left ( x/2 \right ) +1 \right ) }}+8\,{\frac{1}{ \left ( 16\,a-16\,b \right ) \left ( \tanh \left ( x/2 \right ) +1 \right ) ^{2}}}+{\frac{a}{ \left ( a-b \right ) ^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{b}{2\, \left ( a-b \right ) ^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{{a}^{3}}{ \left ( a-b \right ) ^{2} \left ( a+b \right ) ^{2}}\ln \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) }+8\,{\frac{1}{ \left ( 16\,a+16\,b \right ) \left ( \tanh \left ( x/2 \right ) -1 \right ) ^{2}}}+16\,{\frac{1}{ \left ( 32\,a+32\,b \right ) \left ( \tanh \left ( x/2 \right ) -1 \right ) }}+{\frac{a}{ \left ( a+b \right ) ^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) }+{\frac{b}{2\, \left ( a+b \right ) ^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(x)^3/(a*cosh(x)+b*sinh(x)),x)

[Out]

-16/(32*a-32*b)/(tanh(1/2*x)+1)+8/(16*a-16*b)/(tanh(1/2*x)+1)^2+1/(a-b)^2*ln(tanh(1/2*x)+1)*a-1/2/(a-b)^2*ln(t
anh(1/2*x)+1)*b-a^3/(a-b)^2/(a+b)^2*ln(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)+8/(16*a+16*b)/(tanh(1/2*x)-1)^2+16/(
32*a+32*b)/(tanh(1/2*x)-1)+1/(a+b)^2*ln(tanh(1/2*x)-1)*a+1/2/(a+b)^2*ln(tanh(1/2*x)-1)*b

________________________________________________________________________________________

Maxima [A]  time = 1.14197, size = 117, normalized size = 1.16 \begin{align*} -\frac{a^{3} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} - \frac{{\left (2 \, a + b\right )} x}{2 \,{\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac{e^{\left (2 \, x\right )}}{8 \,{\left (a + b\right )}} + \frac{e^{\left (-2 \, x\right )}}{8 \,{\left (a - b\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^3/(a*cosh(x)+b*sinh(x)),x, algorithm="maxima")

[Out]

-a^3*log(-(a - b)*e^(-2*x) - a - b)/(a^4 - 2*a^2*b^2 + b^4) - 1/2*(2*a + b)*x/(a^2 + 2*a*b + b^2) + 1/8*e^(2*x
)/(a + b) + 1/8*e^(-2*x)/(a - b)

________________________________________________________________________________________

Fricas [B]  time = 1.88408, size = 818, normalized size = 8.1 \begin{align*} \frac{{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{4} + 4 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} +{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{4} + 4 \,{\left (2 \, a^{3} + 3 \, a^{2} b - b^{3}\right )} x \cosh \left (x\right )^{2} + a^{3} + a^{2} b - a b^{2} - b^{3} + 2 \,{\left (3 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (2 \, a^{3} + 3 \, a^{2} b - b^{3}\right )} x\right )} \sinh \left (x\right )^{2} - 8 \,{\left (a^{3} \cosh \left (x\right )^{2} + 2 \, a^{3} \cosh \left (x\right ) \sinh \left (x\right ) + a^{3} \sinh \left (x\right )^{2}\right )} \log \left (\frac{2 \,{\left (a \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \,{\left ({\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{3} + 2 \,{\left (2 \, a^{3} + 3 \, a^{2} b - b^{3}\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right )}{8 \,{\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2}\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^3/(a*cosh(x)+b*sinh(x)),x, algorithm="fricas")

[Out]

1/8*((a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^4 + 4*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x)*sinh(x)^3 + (a^3 - a^2*b -
a*b^2 + b^3)*sinh(x)^4 + 4*(2*a^3 + 3*a^2*b - b^3)*x*cosh(x)^2 + a^3 + a^2*b - a*b^2 - b^3 + 2*(3*(a^3 - a^2*b
- a*b^2 + b^3)*cosh(x)^2 + 2*(2*a^3 + 3*a^2*b - b^3)*x)*sinh(x)^2 - 8*(a^3*cosh(x)^2 + 2*a^3*cosh(x)*sinh(x)
+ a^3*sinh(x)^2)*log(2*(a*cosh(x) + b*sinh(x))/(cosh(x) - sinh(x))) + 4*((a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^3
+ 2*(2*a^3 + 3*a^2*b - b^3)*x*cosh(x))*sinh(x))/((a^4 - 2*a^2*b^2 + b^4)*cosh(x)^2 + 2*(a^4 - 2*a^2*b^2 + b^4
)*cosh(x)*sinh(x) + (a^4 - 2*a^2*b^2 + b^4)*sinh(x)^2)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)**3/(a*cosh(x)+b*sinh(x)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.15356, size = 154, normalized size = 1.52 \begin{align*} -\frac{a^{3} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac{{\left (2 \, a - b\right )} x}{2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )}} - \frac{{\left (4 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} - a + b\right )} e^{\left (-2 \, x\right )}}{8 \,{\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac{e^{\left (2 \, x\right )}}{8 \,{\left (a + b\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^3/(a*cosh(x)+b*sinh(x)),x, algorithm="giac")

[Out]

-a^3*log(abs(a*e^(2*x) + b*e^(2*x) + a - b))/(a^4 - 2*a^2*b^2 + b^4) + 1/2*(2*a - b)*x/(a^2 - 2*a*b + b^2) - 1
/8*(4*a*e^(2*x) - 2*b*e^(2*x) - a + b)*e^(-2*x)/(a^2 - 2*a*b + b^2) + 1/8*e^(2*x)/(a + b)