Optimal. Leaf size=58 \[ -\frac{2 (a c-b d) \tanh ^{-1}\left (\frac{d-c \tanh \left (\frac{x}{2}\right )}{\sqrt{c^2+d^2}}\right )}{c \sqrt{c^2+d^2}}-\frac{b \tanh ^{-1}(\cosh (x))}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.167788, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {2828, 3001, 3770, 2660, 618, 206} \[ -\frac{2 (a c-b d) \tanh ^{-1}\left (\frac{d-c \tanh \left (\frac{x}{2}\right )}{\sqrt{c^2+d^2}}\right )}{c \sqrt{c^2+d^2}}-\frac{b \tanh ^{-1}(\cosh (x))}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2828
Rule 3001
Rule 3770
Rule 2660
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{a+b \text{csch}(x)}{c+d \sinh (x)} \, dx &=-\left (i \int \frac{\text{csch}(x) (i b+i a \sinh (x))}{c+d \sinh (x)} \, dx\right )\\ &=\frac{b \int \text{csch}(x) \, dx}{c}+\frac{(a c-b d) \int \frac{1}{c+d \sinh (x)} \, dx}{c}\\ &=-\frac{b \tanh ^{-1}(\cosh (x))}{c}+\frac{(2 (a c-b d)) \operatorname{Subst}\left (\int \frac{1}{c+2 d x-c x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{c}\\ &=-\frac{b \tanh ^{-1}(\cosh (x))}{c}-\frac{(4 (a c-b d)) \operatorname{Subst}\left (\int \frac{1}{4 \left (c^2+d^2\right )-x^2} \, dx,x,2 d-2 c \tanh \left (\frac{x}{2}\right )\right )}{c}\\ &=-\frac{b \tanh ^{-1}(\cosh (x))}{c}-\frac{2 (a c-b d) \tanh ^{-1}\left (\frac{d-c \tanh \left (\frac{x}{2}\right )}{\sqrt{c^2+d^2}}\right )}{c \sqrt{c^2+d^2}}\\ \end{align*}
Mathematica [A] time = 0.136297, size = 67, normalized size = 1.16 \[ \frac{\frac{2 (a c-b d) \tan ^{-1}\left (\frac{d-c \tanh \left (\frac{x}{2}\right )}{\sqrt{-c^2-d^2}}\right )}{\sqrt{-c^2-d^2}}+b \log \left (\tanh \left (\frac{x}{2}\right )\right )}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.032, size = 86, normalized size = 1.5 \begin{align*}{\frac{b}{c}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) }+2\,{\frac{a}{\sqrt{{c}^{2}+{d}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,c\tanh \left ( x/2 \right ) -2\,d}{\sqrt{{c}^{2}+{d}^{2}}}} \right ) }-2\,{\frac{bd}{c\sqrt{{c}^{2}+{d}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,c\tanh \left ( x/2 \right ) -2\,d}{\sqrt{{c}^{2}+{d}^{2}}}} \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 [B] time = 5.79355, size = 482, normalized size = 8.31 \begin{align*} -\frac{{\left (a c - b d\right )} \sqrt{c^{2} + d^{2}} \log \left (\frac{d^{2} \cosh \left (x\right )^{2} + d^{2} \sinh \left (x\right )^{2} + 2 \, c d \cosh \left (x\right ) + 2 \, c^{2} + d^{2} + 2 \,{\left (d^{2} \cosh \left (x\right ) + c d\right )} \sinh \left (x\right ) + 2 \, \sqrt{c^{2} + d^{2}}{\left (d \cosh \left (x\right ) + d \sinh \left (x\right ) + c\right )}}{d \cosh \left (x\right )^{2} + d \sinh \left (x\right )^{2} + 2 \, c \cosh \left (x\right ) + 2 \,{\left (d \cosh \left (x\right ) + c\right )} \sinh \left (x\right ) - d}\right ) +{\left (b c^{2} + b d^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) -{\left (b c^{2} + b d^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{c^{3} + c d^{2}} \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{a + b \operatorname{csch}{\left (x \right )}}{c + d \sinh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17117, size = 122, normalized size = 2.1 \begin{align*} -\frac{b \log \left (e^{x} + 1\right )}{c} + \frac{b \log \left ({\left | e^{x} - 1 \right |}\right )}{c} + \frac{{\left (a c - b d\right )} \log \left (\frac{{\left | 2 \, d e^{x} + 2 \, c - 2 \, \sqrt{c^{2} + d^{2}} \right |}}{{\left | 2 \, d e^{x} + 2 \, c + 2 \, \sqrt{c^{2} + d^{2}} \right |}}\right )}{\sqrt{c^{2} + d^{2}} c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]