Optimal. Leaf size=59 \[ \frac{x}{a}-\frac{2 b \tan ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a d \sqrt{a-b} \sqrt{a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0553858, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3783, 2659, 208} \[ \frac{x}{a}-\frac{2 b \tan ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a d \sqrt{a-b} \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3783
Rule 2659
Rule 208
Rubi steps
\begin{align*} \int \frac{1}{a+b \text{sech}(c+d x)} \, dx &=\frac{x}{a}-\frac{\int \frac{1}{1+\frac{a \cosh (c+d x)}{b}} \, dx}{a}\\ &=\frac{x}{a}+\frac{(2 i) \operatorname{Subst}\left (\int \frac{1}{1+\frac{a}{b}+\left (1-\frac{a}{b}\right ) x^2} \, dx,x,\tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{a d}\\ &=\frac{x}{a}-\frac{2 b \tan ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a \sqrt{a-b} \sqrt{a+b} d}\\ \end{align*}
Mathematica [A] time = 0.10464, size = 60, normalized size = 1.02 \[ \frac{\frac{2 b \tan ^{-1}\left (\frac{(b-a) \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{d \sqrt{a^2-b^2}}+\frac{c}{d}+x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.014, size = 88, normalized size = 1.5 \begin{align*}{\frac{1}{da}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }-{\frac{1}{da}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) }-2\,{\frac{b}{da\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}\arctan \left ({\frac{ \left ( a-b \right ) \tanh \left ( 1/2\,dx+c/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.51876, size = 648, normalized size = 10.98 \begin{align*} \left [\frac{{\left (a^{2} - b^{2}\right )} d x - \sqrt{-a^{2} + b^{2}} b \log \left (\frac{a^{2} \cosh \left (d x + c\right )^{2} + a^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) - a^{2} + 2 \, b^{2} + 2 \,{\left (a^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) + 2 \, \sqrt{-a^{2} + b^{2}}{\left (a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + b\right )}}{a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) + 2 \,{\left (a \cosh \left (d x + c\right ) + b\right )} \sinh \left (d x + c\right ) + a}\right )}{{\left (a^{3} - a b^{2}\right )} d}, \frac{{\left (a^{2} - b^{2}\right )} d x + 2 \, \sqrt{a^{2} - b^{2}} b \arctan \left (-\frac{a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + b}{\sqrt{a^{2} - b^{2}}}\right )}{{\left (a^{3} - a b^{2}\right )} d}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{a + b \operatorname{sech}{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14122, size = 76, normalized size = 1.29 \begin{align*} -\frac{2 \, b \arctan \left (\frac{a e^{\left (d x + c\right )} + b}{\sqrt{a^{2} - b^{2}}}\right )}{\sqrt{a^{2} - b^{2}} a d} + \frac{d x + c}{a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]