3.1.81 \(\int \frac {1}{\sqrt {a+a \text {sech}(c+d x)}} \, dx\) [81]

Optimal. Leaf size=85 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a+a \text {sech}(c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {2} \sqrt {a+a \text {sech}(c+d x)}}\right )}{\sqrt {a} d} \]

[Out]

2*arctanh(a^(1/2)*tanh(d*x+c)/(a+a*sech(d*x+c))^(1/2))/d/a^(1/2)-arctanh(1/2*a^(1/2)*tanh(d*x+c)*2^(1/2)/(a+a*
sech(d*x+c))^(1/2))*2^(1/2)/d/a^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3861, 3859, 209, 3880} \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a \text {sech}(c+d x)+a}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {2} \sqrt {a \text {sech}(c+d x)+a}}\right )}{\sqrt {a} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[a + a*Sech[c + d*x]],x]

[Out]

(2*ArcTanh[(Sqrt[a]*Tanh[c + d*x])/Sqrt[a + a*Sech[c + d*x]]])/(Sqrt[a]*d) - (Sqrt[2]*ArcTanh[(Sqrt[a]*Tanh[c
+ d*x])/(Sqrt[2]*Sqrt[a + a*Sech[c + d*x]])])/(Sqrt[a]*d)

Rule 209

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

Rule 3859

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(a + x^2), x], x, b*(C
ot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3861

Int[1/Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[1/a, Int[Sqrt[a + b*Csc[c + d*x]], x], x]
- Dist[b/a, Int[Csc[c + d*x]/Sqrt[a + b*Csc[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3880

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2/f, Subst[Int[1/(2
*a + x^2), x], x, b*(Cot[e + f*x]/Sqrt[a + b*Csc[e + f*x]])], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0
]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {a+a \text {sech}(c+d x)}} \, dx &=\frac {\int \sqrt {a+a \text {sech}(c+d x)} \, dx}{a}-\int \frac {\text {sech}(c+d x)}{\sqrt {a+a \text {sech}(c+d x)}} \, dx\\ &=\frac {(2 i) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {i a \tanh (c+d x)}{\sqrt {a+a \text {sech}(c+d x)}}\right )}{d}-\frac {(2 i) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {i a \tanh (c+d x)}{\sqrt {a+a \text {sech}(c+d x)}}\right )}{d}\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a+a \text {sech}(c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {2} \sqrt {a+a \text {sech}(c+d x)}}\right )}{\sqrt {a} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.83, size = 118, normalized size = 1.39 \begin {gather*} \frac {\left (1+e^{c+d x}\right ) \left (\sqrt {2} \sinh ^{-1}\left (e^{c+d x}\right )-2 \tanh ^{-1}\left (\frac {-1+e^{c+d x}}{\sqrt {2} \sqrt {1+e^{2 (c+d x)}}}\right )-\sqrt {2} \tanh ^{-1}\left (\sqrt {1+e^{2 (c+d x)}}\right )\right )}{\sqrt {2} d \sqrt {1+e^{2 (c+d x)}} \sqrt {a (1+\text {sech}(c+d x))}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[a + a*Sech[c + d*x]],x]

[Out]

((1 + E^(c + d*x))*(Sqrt[2]*ArcSinh[E^(c + d*x)] - 2*ArcTanh[(-1 + E^(c + d*x))/(Sqrt[2]*Sqrt[1 + E^(2*(c + d*
x))])] - Sqrt[2]*ArcTanh[Sqrt[1 + E^(2*(c + d*x))]]))/(Sqrt[2]*d*Sqrt[1 + E^(2*(c + d*x))]*Sqrt[a*(1 + Sech[c
+ d*x])])

________________________________________________________________________________________

Maple [F]
time = 2.63, size = 0, normalized size = 0.00 \[\int \frac {1}{\sqrt {a +a \,\mathrm {sech}\left (d x +c \right )}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sech(d*x+c))^(1/2),x)

[Out]

int(1/(a+a*sech(d*x+c))^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sech(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt(a*sech(d*x + c) + a), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 868 vs. \(2 (70) = 140\).
time = 0.41, size = 868, normalized size = 10.21 \begin {gather*} \frac {\sqrt {2} \sqrt {a} \log \left (-\frac {3 \, \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, \cosh \left (d x + c\right ) - 1\right )} \sinh \left (d x + c\right ) + 3 \, \sinh \left (d x + c\right )^{2} - \frac {2 \, \sqrt {2} {\left (\cosh \left (d x + c\right )^{3} + {\left (3 \, \cosh \left (d x + c\right ) - 1\right )} \sinh \left (d x + c\right )^{2} + \sinh \left (d x + c\right )^{3} - \cosh \left (d x + c\right )^{2} + {\left (3 \, \cosh \left (d x + c\right )^{2} - 2 \, \cosh \left (d x + c\right ) + 1\right )} \sinh \left (d x + c\right ) + \cosh \left (d x + c\right ) - 1\right )} \sqrt {\frac {a}{\cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} + 1}}}{\sqrt {a}} - 2 \, \cosh \left (d x + c\right ) + 3}{\cosh \left (d x + c\right )^{2} + 2 \, {\left (\cosh \left (d x + c\right ) + 1\right )} \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) + 1}\right ) + \sqrt {a} \log \left (-\frac {a \cosh \left (d x + c\right )^{4} + a \sinh \left (d x + c\right )^{4} - 3 \, a \cosh \left (d x + c\right )^{3} + {\left (4 \, a \cosh \left (d x + c\right ) - 3 \, a\right )} \sinh \left (d x + c\right )^{3} + 5 \, a \cosh \left (d x + c\right )^{2} + {\left (6 \, a \cosh \left (d x + c\right )^{2} - 9 \, a \cosh \left (d x + c\right ) + 5 \, a\right )} \sinh \left (d x + c\right )^{2} + {\left (\cosh \left (d x + c\right )^{5} + {\left (5 \, \cosh \left (d x + c\right ) - 3\right )} \sinh \left (d x + c\right )^{4} + \sinh \left (d x + c\right )^{5} - 3 \, \cosh \left (d x + c\right )^{4} + {\left (10 \, \cosh \left (d x + c\right )^{2} - 12 \, \cosh \left (d x + c\right ) + 5\right )} \sinh \left (d x + c\right )^{3} + 5 \, \cosh \left (d x + c\right )^{3} + {\left (10 \, \cosh \left (d x + c\right )^{3} - 18 \, \cosh \left (d x + c\right )^{2} + 15 \, \cosh \left (d x + c\right ) - 7\right )} \sinh \left (d x + c\right )^{2} - 7 \, \cosh \left (d x + c\right )^{2} + {\left (5 \, \cosh \left (d x + c\right )^{4} - 12 \, \cosh \left (d x + c\right )^{3} + 15 \, \cosh \left (d x + c\right )^{2} - 14 \, \cosh \left (d x + c\right ) + 4\right )} \sinh \left (d x + c\right ) + 4 \, \cosh \left (d x + c\right ) - 4\right )} \sqrt {a} \sqrt {\frac {a}{\cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} + 1}} - 4 \, a \cosh \left (d x + c\right ) + {\left (4 \, a \cosh \left (d x + c\right )^{3} - 9 \, a \cosh \left (d x + c\right )^{2} + 10 \, a \cosh \left (d x + c\right ) - 4 \, a\right )} \sinh \left (d x + c\right ) + 4 \, a}{\cosh \left (d x + c\right )^{3} + 3 \, \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right ) + 3 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + \sinh \left (d x + c\right )^{3}}\right ) + \sqrt {a} \log \left (\frac {a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} + {\left (\cosh \left (d x + c\right )^{3} + {\left (3 \, \cosh \left (d x + c\right ) + 1\right )} \sinh \left (d x + c\right )^{2} + \sinh \left (d x + c\right )^{3} + \cosh \left (d x + c\right )^{2} + {\left (3 \, \cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) + 1\right )} \sinh \left (d x + c\right ) + \cosh \left (d x + c\right ) + 1\right )} \sqrt {a} \sqrt {\frac {a}{\cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} + 1}} + a \cosh \left (d x + c\right ) + {\left (2 \, a \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) + a}{\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )}\right )}{2 \, a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sech(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

1/2*(sqrt(2)*sqrt(a)*log(-(3*cosh(d*x + c)^2 + 2*(3*cosh(d*x + c) - 1)*sinh(d*x + c) + 3*sinh(d*x + c)^2 - 2*s
qrt(2)*(cosh(d*x + c)^3 + (3*cosh(d*x + c) - 1)*sinh(d*x + c)^2 + sinh(d*x + c)^3 - cosh(d*x + c)^2 + (3*cosh(
d*x + c)^2 - 2*cosh(d*x + c) + 1)*sinh(d*x + c) + cosh(d*x + c) - 1)*sqrt(a/(cosh(d*x + c)^2 + 2*cosh(d*x + c)
*sinh(d*x + c) + sinh(d*x + c)^2 + 1))/sqrt(a) - 2*cosh(d*x + c) + 3)/(cosh(d*x + c)^2 + 2*(cosh(d*x + c) + 1)
*sinh(d*x + c) + sinh(d*x + c)^2 + 2*cosh(d*x + c) + 1)) + sqrt(a)*log(-(a*cosh(d*x + c)^4 + a*sinh(d*x + c)^4
 - 3*a*cosh(d*x + c)^3 + (4*a*cosh(d*x + c) - 3*a)*sinh(d*x + c)^3 + 5*a*cosh(d*x + c)^2 + (6*a*cosh(d*x + c)^
2 - 9*a*cosh(d*x + c) + 5*a)*sinh(d*x + c)^2 + (cosh(d*x + c)^5 + (5*cosh(d*x + c) - 3)*sinh(d*x + c)^4 + sinh
(d*x + c)^5 - 3*cosh(d*x + c)^4 + (10*cosh(d*x + c)^2 - 12*cosh(d*x + c) + 5)*sinh(d*x + c)^3 + 5*cosh(d*x + c
)^3 + (10*cosh(d*x + c)^3 - 18*cosh(d*x + c)^2 + 15*cosh(d*x + c) - 7)*sinh(d*x + c)^2 - 7*cosh(d*x + c)^2 + (
5*cosh(d*x + c)^4 - 12*cosh(d*x + c)^3 + 15*cosh(d*x + c)^2 - 14*cosh(d*x + c) + 4)*sinh(d*x + c) + 4*cosh(d*x
 + c) - 4)*sqrt(a)*sqrt(a/(cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c)^2 + 1)) - 4*a*cosh(
d*x + c) + (4*a*cosh(d*x + c)^3 - 9*a*cosh(d*x + c)^2 + 10*a*cosh(d*x + c) - 4*a)*sinh(d*x + c) + 4*a)/(cosh(d
*x + c)^3 + 3*cosh(d*x + c)^2*sinh(d*x + c) + 3*cosh(d*x + c)*sinh(d*x + c)^2 + sinh(d*x + c)^3)) + sqrt(a)*lo
g((a*cosh(d*x + c)^2 + a*sinh(d*x + c)^2 + (cosh(d*x + c)^3 + (3*cosh(d*x + c) + 1)*sinh(d*x + c)^2 + sinh(d*x
 + c)^3 + cosh(d*x + c)^2 + (3*cosh(d*x + c)^2 + 2*cosh(d*x + c) + 1)*sinh(d*x + c) + cosh(d*x + c) + 1)*sqrt(
a)*sqrt(a/(cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c)^2 + 1)) + a*cosh(d*x + c) + (2*a*co
sh(d*x + c) + a)*sinh(d*x + c) + a)/(cosh(d*x + c) + sinh(d*x + c))))/(a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a \operatorname {sech}{\left (c + d x \right )} + a}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sech(d*x+c))**(1/2),x)

[Out]

Integral(1/sqrt(a*sech(c + d*x) + a), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sech(d*x+c))^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Error: Bad Argument Type

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\sqrt {a+\frac {a}{\mathrm {cosh}\left (c+d\,x\right )}}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________