Optimal. Leaf size=38 \[ \frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a-a \text {sech}(c+d x)}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 38, normalized size of antiderivative = 1.00, 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 = {3859, 209}
\begin {gather*} \frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a-a \text {sech}(c+d x)}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rubi steps
\begin {align*} \int \sqrt {a-a \text {sech}(c+d x)} \, dx &=-\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} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {a-a \text {sech}(c+d x)}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.64, size = 70, normalized size = 1.84 \begin {gather*} \frac {\sqrt {1+e^{2 (c+d x)}} \left (\sinh ^{-1}\left (e^{c+d x}\right )+\tanh ^{-1}\left (\sqrt {1+e^{2 (c+d x)}}\right )\right ) \sqrt {a-a \text {sech}(c+d x)}}{d \left (-1+e^{c+d x}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 2.82, size = 0, normalized size = 0.00 \[\int \sqrt {a -a \,\mathrm {sech}\left (d x +c \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 642 vs.
\(2 (32) = 64\).
time = 0.45, size = 642, normalized size = 16.89 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- a \operatorname {sech}{\left (c + d x \right )} + a}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs.
\(2 (32) = 64\).
time = 0.41, size = 101, normalized size = 2.66 \begin {gather*} -\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 ) \mathrm {sgn}\left (e^{\left (d x + c\right )} - 1\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 ) \mathrm {sgn}\left (e^{\left (d x + c\right )} - 1\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \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]
[Out]
________________________________________________________________________________________