\(\int \sqrt {a+a \text {sech}(c+d x)} \, dx\) [80]

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

Optimal result

Integrand size = 14, antiderivative size = 37 \[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a+a \text {sech}(c+d x)}}\right )}{d} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 37, 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.143, Rules used = {3859, 209} \[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a \text {sech}(c+d x)+a}}\right )}{d} \]

[In]

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

[Out]

(2*Sqrt[a]*ArcTanh[(Sqrt[a]*Tanh[c + d*x])/Sqrt[a + a*Sech[c + d*x]]])/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]

Rubi steps \begin{align*} \text {integral}& = \frac {(2 i a) \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 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a+a \text {sech}(c+d x)}}\right )}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.62 \[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\frac {\sqrt {2} \text {arcsinh}\left (\sqrt {2} \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cosh (c+d x)} \text {sech}\left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\text {sech}(c+d x))}}{d} \]

[In]

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

[Out]

(Sqrt[2]*ArcSinh[Sqrt[2]*Sinh[(c + d*x)/2]]*Sqrt[Cosh[c + d*x]]*Sech[(c + d*x)/2]*Sqrt[a*(1 + Sech[c + d*x])])
/d

Maple [F]

\[\int \sqrt {a +\operatorname {sech}\left (d x +c \right ) a}d x\]

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 637 vs. \(2 (31) = 62\).

Time = 0.27 (sec) , antiderivative size = 637, normalized size of antiderivative = 17.22 \[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\frac {\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 \, d} \]

[In]

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

[Out]

1/2*(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)*sin
h(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*co
sh(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)*log((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*cos
h(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*cosh(d*x + c) + a)*sinh(d*x + c) + a)/(cosh(d*x + c) + s
inh(d*x + c))))/d

Sympy [F]

\[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\int \sqrt {a \operatorname {sech}{\left (c + d x \right )} + a}\, dx \]

[In]

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

[Out]

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

Maxima [F]

\[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\int { \sqrt {a \operatorname {sech}\left (d x + c\right ) + a} \,d x } \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (31) = 62\).

Time = 0.33 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.24 \[ \int \sqrt {a+a \text {sech}(c+d x)} \, dx=\frac {\frac {2 \, a \arctan \left (-\frac {\sqrt {a} e^{\left (d x + c\right )} - \sqrt {a e^{\left (2 \, d x + 2 \, c\right )} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - \sqrt {a} \log \left ({\left | -\sqrt {a} e^{\left (d x + c\right )} + \sqrt {a e^{\left (2 \, d x + 2 \, c\right )} + a} \right |}\right )}{d} \]

[In]

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

[Out]

(2*a*arctan(-(sqrt(a)*e^(d*x + c) - sqrt(a*e^(2*d*x + 2*c) + a))/sqrt(-a))/sqrt(-a) - sqrt(a)*log(abs(-sqrt(a)
*e^(d*x + c) + sqrt(a*e^(2*d*x + 2*c) + a))))/d

Mupad [F(-1)]

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

[In]

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

[Out]

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