Optimal. Leaf size=344 \[ -\frac {2 a (a-b) \sqrt {a+b} \coth (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{3 b^2 d}-\frac {2 \sqrt {a+b} (a+2 b) \coth (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{3 b d}+\frac {2 \sqrt {a+b} \coth (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{d}-\frac {2 \sqrt {a+b \text {sech}(c+d x)} \tanh (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 344, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3979, 4142,
4143, 4006, 3869, 3917, 4089} \begin {gather*} -\frac {2 a (a-b) \sqrt {a+b} \coth (c+d x) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (\text {sech}(c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 b^2 d}-\frac {2 \sqrt {a+b} (a+2 b) \coth (c+d x) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (\text {sech}(c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 b d}+\frac {2 \sqrt {a+b} \coth (c+d x) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (\text {sech}(c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d}-\frac {2 \tanh (c+d x) \sqrt {a+b \text {sech}(c+d x)}}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 3979
Rule 4006
Rule 4089
Rule 4142
Rule 4143
Rubi steps
\begin {align*} \int \sqrt {a+b \text {sech}(c+d x)} \tanh ^2(c+d x) \, dx &=-\int \sqrt {a+b \text {sech}(c+d x)} \left (-1+\text {sech}^2(c+d x)\right ) \, dx\\ &=-\frac {2 \sqrt {a+b \text {sech}(c+d x)} \tanh (c+d x)}{3 d}-\frac {2}{3} \int \frac {-\frac {3 a}{2}-b \text {sech}(c+d x)+\frac {1}{2} a \text {sech}^2(c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx\\ &=-\frac {2 \sqrt {a+b \text {sech}(c+d x)} \tanh (c+d x)}{3 d}-\frac {2}{3} \int \frac {-\frac {3 a}{2}+\left (-\frac {a}{2}-b\right ) \text {sech}(c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx-\frac {1}{3} a \int \frac {\text {sech}(c+d x) (1+\text {sech}(c+d x))}{\sqrt {a+b \text {sech}(c+d x)}} \, dx\\ &=-\frac {2 a (a-b) \sqrt {a+b} \coth (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{3 b^2 d}-\frac {2 \sqrt {a+b \text {sech}(c+d x)} \tanh (c+d x)}{3 d}+a \int \frac {1}{\sqrt {a+b \text {sech}(c+d x)}} \, dx-\frac {1}{3} (-a-2 b) \int \frac {\text {sech}(c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx\\ &=-\frac {2 a (a-b) \sqrt {a+b} \coth (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{3 b^2 d}-\frac {2 \sqrt {a+b} (a+2 b) \coth (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{3 b d}+\frac {2 \sqrt {a+b} \coth (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\text {sech}(c+d x))}{a+b}} \sqrt {-\frac {b (1+\text {sech}(c+d x))}{a-b}}}{d}-\frac {2 \sqrt {a+b \text {sech}(c+d x)} \tanh (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 180.00, size = 0, normalized size = 0.00 \begin {gather*} \text {\$Aborted} \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 2.12, size = 0, normalized size = 0.00 \[\int \sqrt {a +b \,\mathrm {sech}\left (d x +c \right )}\, \left (\tanh ^{2}\left (d x +c \right )\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 [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \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 + b \operatorname {sech}{\left (c + d x \right )}} \tanh ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\mathrm {tanh}\left (c+d\,x\right )}^2\,\sqrt {a+\frac {b}{\mathrm {cosh}\left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________