### 3.586 $$\int \frac{1}{(a \cosh (x)+b \sinh (x))^2} \, dx$$

Optimal. Leaf size=17 $\frac{\sinh (x)}{a (a \cosh (x)+b \sinh (x))}$

[Out]

Sinh[x]/(a*(a*Cosh[x] + b*Sinh[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0145181, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.091, Rules used = {3075} $\frac{\sinh (x)}{a (a \cosh (x)+b \sinh (x))}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

Sinh[x]/(a*(a*Cosh[x] + b*Sinh[x]))

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))^2} \, dx &=\frac{\sinh (x)}{a (a \cosh (x)+b \sinh (x))}\\ \end{align*}

Mathematica [A]  time = 0.0240173, size = 17, normalized size = 1. $\frac{\sinh (x)}{a (a \cosh (x)+b \sinh (x))}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

Sinh[x]/(a*(a*Cosh[x] + b*Sinh[x]))

________________________________________________________________________________________

Maple [A]  time = 0.056, size = 29, normalized size = 1.7 \begin{align*} 2\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ( x/2 \right ) \right ) ^{2} \right ) }} \end{align*}

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

[In]

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

[Out]

2/a*tanh(1/2*x)/(a+2*tanh(1/2*x)*b+a*tanh(1/2*x)^2)

________________________________________________________________________________________

Maxima [A]  time = 1.23529, size = 39, normalized size = 2.29 \begin{align*} \frac{2}{a^{2} - b^{2} +{\left (a^{2} - 2 \, a b + b^{2}\right )} e^{\left (-2 \, x\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.36344, size = 162, normalized size = 9.53 \begin{align*} -\frac{2}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2}} \end{align*}

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

[In]

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

[Out]

-2/((a^2 + 2*a*b + b^2)*cosh(x)^2 + 2*(a^2 + 2*a*b + b^2)*cosh(x)*sinh(x) + (a^2 + 2*a*b + b^2)*sinh(x)^2 + a^
2 - b^2)

________________________________________________________________________________________

Sympy [A]  time = 151.74, size = 206, normalized size = 12.12 \begin{align*} \begin{cases} \tilde{\infty } \left (- \frac{\tanh{\left (\frac{x}{2} \right )}}{2} - \frac{1}{2 \tanh{\left (\frac{x}{2} \right )}}\right ) & \text{for}\: a = 0 \wedge b = 0 \\\frac{- \frac{\tanh{\left (\frac{x}{2} \right )}}{2} - \frac{1}{2 \tanh{\left (\frac{x}{2} \right )}}}{b^{2}} & \text{for}\: a = 0 \\\frac{x \tanh ^{2}{\left (x \right )}}{2 a^{2} \sinh ^{2}{\left (x \right )} - 4 a^{2} \sinh{\left (x \right )} \cosh{\left (x \right )} \tanh{\left (x \right )} + 2 a^{2} \cosh ^{2}{\left (x \right )} \tanh ^{2}{\left (x \right )}} - \frac{x}{2 a^{2} \sinh ^{2}{\left (x \right )} - 4 a^{2} \sinh{\left (x \right )} \cosh{\left (x \right )} \tanh{\left (x \right )} + 2 a^{2} \cosh ^{2}{\left (x \right )} \tanh ^{2}{\left (x \right )}} + \frac{\tanh{\left (x \right )}}{2 a^{2} \sinh ^{2}{\left (x \right )} - 4 a^{2} \sinh{\left (x \right )} \cosh{\left (x \right )} \tanh{\left (x \right )} + 2 a^{2} \cosh ^{2}{\left (x \right )} \tanh ^{2}{\left (x \right )}} & \text{for}\: b = - \frac{a}{\tanh{\left (x \right )}} \\\frac{2 \tanh{\left (\frac{x}{2} \right )}}{a^{2} \tanh ^{2}{\left (\frac{x}{2} \right )} + a^{2} + 2 a b \tanh{\left (\frac{x}{2} \right )}} & \text{otherwise} \end{cases} \end{align*}

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

[In]

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

[Out]

Piecewise((zoo*(-tanh(x/2)/2 - 1/(2*tanh(x/2))), Eq(a, 0) & Eq(b, 0)), ((-tanh(x/2)/2 - 1/(2*tanh(x/2)))/b**2,
Eq(a, 0)), (x*tanh(x)**2/(2*a**2*sinh(x)**2 - 4*a**2*sinh(x)*cosh(x)*tanh(x) + 2*a**2*cosh(x)**2*tanh(x)**2)
- x/(2*a**2*sinh(x)**2 - 4*a**2*sinh(x)*cosh(x)*tanh(x) + 2*a**2*cosh(x)**2*tanh(x)**2) + tanh(x)/(2*a**2*sinh
(x)**2 - 4*a**2*sinh(x)*cosh(x)*tanh(x) + 2*a**2*cosh(x)**2*tanh(x)**2), Eq(b, -a/tanh(x))), (2*tanh(x/2)/(a**
2*tanh(x/2)**2 + a**2 + 2*a*b*tanh(x/2)), True))

________________________________________________________________________________________

Giac [A]  time = 1.17418, size = 35, normalized size = 2.06 \begin{align*} -\frac{2}{{\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}{\left (a + b\right )}} \end{align*}

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

[In]

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

[Out]

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