Optimal. Leaf size=49 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2659, 205} \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 2659
Rubi steps
\begin {align*} \int \frac {1}{a+b \cosh (c+d x)} \, dx &=-\frac {(2 i) \operatorname {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d}\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 48, normalized size = 0.98 \[ -\frac {2 \tan ^{-1}\left (\frac {(a-b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^2-a^2}}\right )}{d \sqrt {b^2-a^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 237, normalized size = 4.84 \[ \left [\frac {\log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} - b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) + b}\right )}{\sqrt {a^{2} - b^{2}} d}, -\frac {2 \, \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{a^{2} - b^{2}}\right )}{{\left (a^{2} - b^{2}\right )} d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 39, normalized size = 0.80 \[ \frac {2 \, \arctan \left (\frac {b e^{\left (d x + c\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 44, normalized size = 0.90 \[ \frac {2 \arctanh \left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{d \sqrt {\left (a +b \right ) \left (a -b \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.22, size = 53, normalized size = 1.08 \[ \frac {2\,\mathrm {atan}\left (\frac {a\,d+b\,d\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c}{\sqrt {b^2\,d^2-a^2\,d^2}}\right )}{\sqrt {b^2\,d^2-a^2\,d^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.62, size = 163, normalized size = 3.33 \[ \begin {cases} \frac {\tilde {\infty } x}{\cosh {\relax (c )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{b d} & \text {for}\: a = b \\- \frac {1}{b d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}} & \text {for}\: a = - b \\\frac {x}{a + b \cosh {\relax (c )}} & \text {for}\: d = 0 \\- \frac {\log {\left (- \sqrt {\frac {a}{a - b} + \frac {b}{a - b}} + \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )}}{a d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}} - b d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}}} + \frac {\log {\left (\sqrt {\frac {a}{a - b} + \frac {b}{a - b}} + \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )}}{a d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}} - b d \sqrt {\frac {a}{a - b} + \frac {b}{a - b}}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________