3.588 $$\int \frac{1}{(a \cosh (x)+b \sinh (x))^4} \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0315738, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.182, Rules used = {3076, 3075} $\frac{2 \sinh (x)}{3 a \left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}+\frac{a \sinh (x)+b \cosh (x)}{3 \left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))^3}$

Antiderivative was successfully veriﬁed.

[In]

Int[(a*Cosh[x] + b*Sinh[x])^(-4),x]

[Out]

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

Rule 3076

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

Rule 3075

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

Rubi steps

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

Mathematica [A]  time = 0.132782, size = 64, normalized size = 0.96 $\frac{\sinh (x) \left (\left (a^2+b^2\right ) \cosh (2 x)+2 a^2-b^2\right )+a b \cosh (3 x)}{3 a (a-b) (a+b) (a \cosh (x)+b \sinh (x))^3}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(a*Cosh[x] + b*Sinh[x])^(-4),x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.081, size = 87, normalized size = 1.3 \begin{align*} -2\,{\frac{1}{ \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ( x/2 \right ) \right ) ^{2} \right ) ^{3}} \left ( -{\frac{ \left ( \tanh \left ( x/2 \right ) \right ) ^{5}}{a}}-2\,{\frac{b \left ( \tanh \left ( x/2 \right ) \right ) ^{4}}{{a}^{2}}}-2/3\,{\frac{ \left ({a}^{2}+2\,{b}^{2} \right ) \left ( \tanh \left ( x/2 \right ) \right ) ^{3}}{{a}^{3}}}-2\,{\frac{ \left ( \tanh \left ( x/2 \right ) \right ) ^{2}b}{{a}^{2}}}-{\frac{\tanh \left ( x/2 \right ) }{a}} \right ) } \end{align*}

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

[In]

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

[Out]

-2*(-1/a*tanh(1/2*x)^5-2/a^2*b*tanh(1/2*x)^4-2/3/a^3*(a^2+2*b^2)*tanh(1/2*x)^3-2/a^2*b*tanh(1/2*x)^2-1/a*tanh(
1/2*x))/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)^3

________________________________________________________________________________________

Maxima [B]  time = 1.12521, size = 672, normalized size = 10.03 \begin{align*} \frac{4 \,{\left (a - b\right )} e^{\left (-2 \, x\right )}}{a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5} + 3 \,{\left (a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5}\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5}\right )} e^{\left (-4 \, x\right )} +{\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} e^{\left (-6 \, x\right )}} + \frac{4 \, a}{3 \,{\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5} + 3 \,{\left (a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5}\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5}\right )} e^{\left (-4 \, x\right )} +{\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} e^{\left (-6 \, x\right )}\right )}} + \frac{4 \, b}{3 \,{\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5} + 3 \,{\left (a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5}\right )} e^{\left (-2 \, x\right )} + 3 \,{\left (a^{5} - 3 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} - 3 \, a b^{4} + b^{5}\right )} e^{\left (-4 \, x\right )} +{\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} e^{\left (-6 \, x\right )}\right )}} \end{align*}

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

[In]

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

[Out]

4*(a - b)*e^(-2*x)/(a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5 + 3*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3
+ a*b^4 - b^5)*e^(-2*x) + 3*(a^5 - 3*a^4*b + 2*a^3*b^2 + 2*a^2*b^3 - 3*a*b^4 + b^5)*e^(-4*x) + (a^5 - 5*a^4*b
+ 10*a^3*b^2 - 10*a^2*b^3 + 5*a*b^4 - b^5)*e^(-6*x)) + 4/3*a/(a^5 + a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b
^5 + 3*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*e^(-2*x) + 3*(a^5 - 3*a^4*b + 2*a^3*b^2 + 2*a^2*b^3
- 3*a*b^4 + b^5)*e^(-4*x) + (a^5 - 5*a^4*b + 10*a^3*b^2 - 10*a^2*b^3 + 5*a*b^4 - b^5)*e^(-6*x)) + 4/3*b/(a^5
+ a^4*b - 2*a^3*b^2 - 2*a^2*b^3 + a*b^4 + b^5 + 3*(a^5 - a^4*b - 2*a^3*b^2 + 2*a^2*b^3 + a*b^4 - b^5)*e^(-2*x)
+ 3*(a^5 - 3*a^4*b + 2*a^3*b^2 + 2*a^2*b^3 - 3*a*b^4 + b^5)*e^(-4*x) + (a^5 - 5*a^4*b + 10*a^3*b^2 - 10*a^2*b
^3 + 5*a*b^4 - b^5)*e^(-6*x))

________________________________________________________________________________________

Fricas [B]  time = 2.30457, size = 1234, normalized size = 18.42 \begin{align*} -\frac{8 \,{\left ({\left (2 \, a + b\right )} \cosh \left (x\right ) +{\left (a + 2 \, b\right )} \sinh \left (x\right )\right )}}{3 \,{\left ({\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \cosh \left (x\right )^{5} + 5 \,{\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{4} +{\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \sinh \left (x\right )^{5} + 3 \,{\left (a^{5} + 3 \, a^{4} b + 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} - 3 \, a b^{4} - b^{5}\right )} \cosh \left (x\right )^{3} +{\left (3 \, a^{5} + 9 \, a^{4} b + 6 \, a^{3} b^{2} - 6 \, a^{2} b^{3} - 9 \, a b^{4} - 3 \, b^{5} + 10 \,{\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{3} +{\left (10 \,{\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \cosh \left (x\right )^{3} + 9 \,{\left (a^{5} + 3 \, a^{4} b + 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} - 3 \, a b^{4} - b^{5}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + 2 \,{\left (2 \, a^{5} + a^{4} b - 4 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + 2 \, a b^{4} + b^{5}\right )} \cosh \left (x\right ) +{\left (2 \, a^{5} + 4 \, a^{4} b - 4 \, a^{3} b^{2} - 8 \, a^{2} b^{3} + 2 \, a b^{4} + 4 \, b^{5} + 5 \,{\left (a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \cosh \left (x\right )^{4} + 9 \,{\left (a^{5} + 3 \, a^{4} b + 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} - 3 \, a b^{4} - b^{5}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )\right )}} \end{align*}

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

[In]

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

[Out]

-8/3*((2*a + b)*cosh(x) + (a + 2*b)*sinh(x))/((a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*cosh(x
)^5 + 5*(a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*cosh(x)*sinh(x)^4 + (a^5 + 5*a^4*b + 10*a^3*
b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*sinh(x)^5 + 3*(a^5 + 3*a^4*b + 2*a^3*b^2 - 2*a^2*b^3 - 3*a*b^4 - b^5)*cosh(x
)^3 + (3*a^5 + 9*a^4*b + 6*a^3*b^2 - 6*a^2*b^3 - 9*a*b^4 - 3*b^5 + 10*(a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3
+ 5*a*b^4 + b^5)*cosh(x)^2)*sinh(x)^3 + (10*(a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*cosh(x)
^3 + 9*(a^5 + 3*a^4*b + 2*a^3*b^2 - 2*a^2*b^3 - 3*a*b^4 - b^5)*cosh(x))*sinh(x)^2 + 2*(2*a^5 + a^4*b - 4*a^3*b
^2 - 2*a^2*b^3 + 2*a*b^4 + b^5)*cosh(x) + (2*a^5 + 4*a^4*b - 4*a^3*b^2 - 8*a^2*b^3 + 2*a*b^4 + 4*b^5 + 5*(a^5
+ 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 + 5*a*b^4 + b^5)*cosh(x)^4 + 9*(a^5 + 3*a^4*b + 2*a^3*b^2 - 2*a^2*b^3 - 3*
a*b^4 - b^5)*cosh(x)^2)*sinh(x))

________________________________________________________________________________________

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(1/(a*cosh(x)+b*sinh(x))**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.14393, size = 72, normalized size = 1.07 \begin{align*} -\frac{4 \,{\left (3 \, a e^{\left (2 \, x\right )} + 3 \, b e^{\left (2 \, x\right )} + a - b\right )}}{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )}{\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}^{3}} \end{align*}

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

[In]

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

[Out]

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