3.587 \(\int \frac{1}{a^2-b^2 \cosh ^2(x)} \, dx\)

Optimal. Leaf size=35 \[ \frac{\tanh ^{-1}\left (\frac{a \tanh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}} \]

[Out]

ArcTanh[(a*Tanh[x])/Sqrt[a^2 - b^2]]/(a*Sqrt[a^2 - b^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0369354, antiderivative size = 35, normalized size of antiderivative = 1., 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 = {3181, 208} \[ \frac{\tanh ^{-1}\left (\frac{a \tanh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTanh[(a*Tanh[x])/Sqrt[a^2 - b^2]]/(a*Sqrt[a^2 - b^2])

Rule 3181

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[1/(a + (a + b)*ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{a^2-b^2 \cosh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{a^2-\left (a^2-b^2\right ) x^2} \, dx,x,\coth (x)\right )\\ &=\frac{\tanh ^{-1}\left (\frac{a \tanh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}}\\ \end{align*}

Mathematica [A]  time = 0.0447526, size = 35, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{a \tanh (x)}{\sqrt{a^2-b^2}}\right )}{a \sqrt{a^2-b^2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTanh[(a*Tanh[x])/Sqrt[a^2 - b^2]]/(a*Sqrt[a^2 - b^2])

________________________________________________________________________________________

Maple [B]  time = 0.024, size = 74, normalized size = 2.1 \begin{align*}{\frac{1}{a}{\it Artanh} \left ({(a+b)\tanh \left ({\frac{x}{2}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}}+{\frac{1}{a}{\it Artanh} \left ({(a-b)\tanh \left ({\frac{x}{2}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/a/((a+b)*(a-b))^(1/2)*arctanh((a+b)*tanh(1/2*x)/((a+b)*(a-b))^(1/2))+1/a/((a+b)*(a-b))^(1/2)*arctanh((a-b)*t
anh(1/2*x)/((a+b)*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.24971, size = 945, normalized size = 27. \begin{align*} \left [\frac{\sqrt{a^{2} - b^{2}} \log \left (\frac{b^{4} \cosh \left (x\right )^{4} + 4 \, b^{4} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{4} \sinh \left (x\right )^{4} + 8 \, a^{4} - 8 \, a^{2} b^{2} + b^{4} - 2 \,{\left (2 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b^{4} \cosh \left (x\right )^{2} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2} + 4 \,{\left (b^{4} \cosh \left (x\right )^{3} -{\left (2 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + 4 \,{\left (a b^{2} \cosh \left (x\right )^{2} + 2 \, a b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a b^{2} \sinh \left (x\right )^{2} - 2 \, a^{3} + a b^{2}\right )} \sqrt{a^{2} - b^{2}}}{b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} - 2 \,{\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b^{2} \cosh \left (x\right )^{2} - 2 \, a^{2} + b^{2}\right )} \sinh \left (x\right )^{2} + b^{2} + 4 \,{\left (b^{2} \cosh \left (x\right )^{3} -{\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}\right )}{2 \,{\left (a^{3} - a b^{2}\right )}}, \frac{\sqrt{-a^{2} + b^{2}} \arctan \left (-\frac{{\left (b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2} - 2 \, a^{2} + b^{2}\right )} \sqrt{-a^{2} + b^{2}}}{2 \,{\left (a^{3} - a b^{2}\right )}}\right )}{a^{3} - a b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/2*sqrt(a^2 - b^2)*log((b^4*cosh(x)^4 + 4*b^4*cosh(x)*sinh(x)^3 + b^4*sinh(x)^4 + 8*a^4 - 8*a^2*b^2 + b^4 -
2*(2*a^2*b^2 - b^4)*cosh(x)^2 + 2*(3*b^4*cosh(x)^2 - 2*a^2*b^2 + b^4)*sinh(x)^2 + 4*(b^4*cosh(x)^3 - (2*a^2*b^
2 - b^4)*cosh(x))*sinh(x) + 4*(a*b^2*cosh(x)^2 + 2*a*b^2*cosh(x)*sinh(x) + a*b^2*sinh(x)^2 - 2*a^3 + a*b^2)*sq
rt(a^2 - b^2))/(b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b^2*sinh(x)^4 - 2*(2*a^2 - b^2)*cosh(x)^2 + 2*(3*b^2
*cosh(x)^2 - 2*a^2 + b^2)*sinh(x)^2 + b^2 + 4*(b^2*cosh(x)^3 - (2*a^2 - b^2)*cosh(x))*sinh(x)))/(a^3 - a*b^2),
 sqrt(-a^2 + b^2)*arctan(-1/2*(b^2*cosh(x)^2 + 2*b^2*cosh(x)*sinh(x) + b^2*sinh(x)^2 - 2*a^2 + b^2)*sqrt(-a^2
+ b^2)/(a^3 - a*b^2))/(a^3 - a*b^2)]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.12546, size = 68, normalized size = 1.94 \begin{align*} -\frac{\arctan \left (\frac{b^{2} e^{\left (2 \, x\right )} - 2 \, a^{2} + b^{2}}{2 \, \sqrt{-a^{2} + b^{2}} a}\right )}{\sqrt{-a^{2} + b^{2}} a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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