\(\int \frac {1}{\sqrt {a \cosh (x)}} \, dx\) [19]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 8, antiderivative size = 27 \[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=-\frac {2 i \sqrt {\cosh (x)} \operatorname {EllipticF}\left (\frac {i x}{2},2\right )}{\sqrt {a \cosh (x)}} \]

[Out]

-2*I*(cosh(1/2*x)^2)^(1/2)/cosh(1/2*x)*EllipticF(I*sinh(1/2*x),2^(1/2))*cosh(x)^(1/2)/(a*cosh(x))^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2721, 2720} \[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=-\frac {2 i \sqrt {\cosh (x)} \operatorname {EllipticF}\left (\frac {i x}{2},2\right )}{\sqrt {a \cosh (x)}} \]

[In]

Int[1/Sqrt[a*Cosh[x]],x]

[Out]

((-2*I)*Sqrt[Cosh[x]]*EllipticF[(I/2)*x, 2])/Sqrt[a*Cosh[x]]

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 2721

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

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {\cosh (x)} \int \frac {1}{\sqrt {\cosh (x)}} \, dx}{\sqrt {a \cosh (x)}} \\ & = -\frac {2 i \sqrt {\cosh (x)} \operatorname {EllipticF}\left (\frac {i x}{2},2\right )}{\sqrt {a \cosh (x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=-\frac {2 i \sqrt {\cosh (x)} \operatorname {EllipticF}\left (\frac {i x}{2},2\right )}{\sqrt {a \cosh (x)}} \]

[In]

Integrate[1/Sqrt[a*Cosh[x]],x]

[Out]

((-2*I)*Sqrt[Cosh[x]]*EllipticF[(I/2)*x, 2])/Sqrt[a*Cosh[x]]

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(99\) vs. \(2(38)=76\).

Time = 0.13 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.70

method result size
default \(\frac {\sqrt {a \left (2 \cosh \left (\frac {x}{2}\right )^{2}-1\right ) \sinh \left (\frac {x}{2}\right )^{2}}\, \sqrt {2}\, \sqrt {-2 \cosh \left (\frac {x}{2}\right )^{2}+1}\, \sqrt {-\sinh \left (\frac {x}{2}\right )^{2}}\, \operatorname {EllipticF}\left (\sqrt {2}\, \cosh \left (\frac {x}{2}\right ), \frac {\sqrt {2}}{2}\right )}{\sqrt {a \left (2 \sinh \left (\frac {x}{2}\right )^{4}+\sinh \left (\frac {x}{2}\right )^{2}\right )}\, \sinh \left (\frac {x}{2}\right ) \sqrt {a \left (2 \cosh \left (\frac {x}{2}\right )^{2}-1\right )}}\) \(100\)

[In]

int(1/(a*cosh(x))^(1/2),x,method=_RETURNVERBOSE)

[Out]

(a*(2*cosh(1/2*x)^2-1)*sinh(1/2*x)^2)^(1/2)*2^(1/2)*(-2*cosh(1/2*x)^2+1)^(1/2)*(-sinh(1/2*x)^2)^(1/2)/(a*(2*si
nh(1/2*x)^4+sinh(1/2*x)^2))^(1/2)*EllipticF(2^(1/2)*cosh(1/2*x),1/2*2^(1/2))/sinh(1/2*x)/(a*(2*cosh(1/2*x)^2-1
))^(1/2)

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.08 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.59 \[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=\frac {2 \, \sqrt {2} {\rm weierstrassPInverse}\left (-4, 0, \cosh \left (x\right ) + \sinh \left (x\right )\right )}{\sqrt {a}} \]

[In]

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

[Out]

2*sqrt(2)*weierstrassPInverse(-4, 0, cosh(x) + sinh(x))/sqrt(a)

Sympy [F]

\[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=\int \frac {1}{\sqrt {a \cosh {\left (x \right )}}}\, dx \]

[In]

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

[Out]

Integral(1/sqrt(a*cosh(x)), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=\int { \frac {1}{\sqrt {a \cosh \left (x\right )}} \,d x } \]

[In]

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

[Out]

integrate(1/sqrt(a*cosh(x)), x)

Giac [F]

\[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=\int { \frac {1}{\sqrt {a \cosh \left (x\right )}} \,d x } \]

[In]

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

[Out]

integrate(1/sqrt(a*cosh(x)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {a \cosh (x)}} \, dx=\int \frac {1}{\sqrt {a\,\mathrm {cosh}\left (x\right )}} \,d x \]

[In]

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

[Out]

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