Optimal. Leaf size=118 \[ -\frac{2 a c \tanh ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2+c^2}}\right )}{\left (b^2-c^2\right ) \sqrt{a^2-b^2+c^2}}-\frac{b \log \left (2 a \tanh \left (\frac{x}{2}\right )+(b-c) \tanh ^2\left (\frac{x}{2}\right )+b+c\right )}{b^2-c^2}+\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.584307, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.412, Rules used = {4397, 12, 1628, 634, 618, 206, 628} \[ -\frac{2 a c \tanh ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2+c^2}}\right )}{\left (b^2-c^2\right ) \sqrt{a^2-b^2+c^2}}-\frac{b \log \left (2 a \tanh \left (\frac{x}{2}\right )+(b-c) \tanh ^2\left (\frac{x}{2}\right )+b+c\right )}{b^2-c^2}+\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4397
Rule 12
Rule 1628
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{\text{csch}^2(x)}{a+b \coth (x)+c \text{csch}(x)} \, dx &=i \int \frac{\text{csch}(x)}{i c+i b \cosh (x)+i a \sinh (x)} \, dx\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{-1+x^2}{2 x \left (b+c+2 a x+(b-c) x^2\right )} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )\right )\\ &=-\operatorname{Subst}\left (\int \frac{-1+x^2}{x \left (b+c+2 a x+(b-c) x^2\right )} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )\\ &=-\operatorname{Subst}\left (\int \left (-\frac{1}{(b+c) x}+\frac{2 (a+b x)}{(b+c) \left (b+c+2 a x+(b-c) x^2\right )}\right ) \, dx,x,\tanh \left (\frac{x}{2}\right )\right )\\ &=\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c}-\frac{2 \operatorname{Subst}\left (\int \frac{a+b x}{b+c+2 a x+(b-c) x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{b+c}\\ &=\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c}-\frac{b \operatorname{Subst}\left (\int \frac{2 a+2 (b-c) x}{b+c+2 a x+(b-c) x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{b^2-c^2}+\frac{(2 a c) \operatorname{Subst}\left (\int \frac{1}{b+c+2 a x+(b-c) x^2} \, dx,x,\tanh \left (\frac{x}{2}\right )\right )}{b^2-c^2}\\ &=\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c}-\frac{b \log \left (b+c+2 a \tanh \left (\frac{x}{2}\right )+(b-c) \tanh ^2\left (\frac{x}{2}\right )\right )}{b^2-c^2}-\frac{(4 a c) \operatorname{Subst}\left (\int \frac{1}{4 \left (a^2-b^2+c^2\right )-x^2} \, dx,x,2 a+2 (b-c) \tanh \left (\frac{x}{2}\right )\right )}{b^2-c^2}\\ &=-\frac{2 a c \tanh ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2+c^2}}\right )}{\left (b^2-c^2\right ) \sqrt{a^2-b^2+c^2}}+\frac{\log \left (\tanh \left (\frac{x}{2}\right )\right )}{b+c}-\frac{b \log \left (b+c+2 a \tanh \left (\frac{x}{2}\right )+(b-c) \tanh ^2\left (\frac{x}{2}\right )\right )}{b^2-c^2}\\ \end{align*}
Mathematica [A] time = 0.193392, size = 97, normalized size = 0.82 \[ \frac{-\frac{2 a c \tan ^{-1}\left (\frac{a+(b-c) \tanh \left (\frac{x}{2}\right )}{\sqrt{-a^2+b^2-c^2}}\right )}{\sqrt{-a^2+b^2-c^2}}+b \log (a \sinh (x)+b \cosh (x)+c)-b \log (\sinh (x))+c \log \left (\tanh \left (\frac{x}{2}\right )\right )}{c^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 180, normalized size = 1.5 \begin{align*} -{\frac{b}{ \left ( b-c \right ) \left ( b+c \right ) }\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b- \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}c+2\,a\tanh \left ( x/2 \right ) +b+c \right ) }-2\,{\frac{a}{ \left ( b+c \right ) \sqrt{-{a}^{2}+{b}^{2}-{c}^{2}}}\arctan \left ( 1/2\,{\frac{2\, \left ( b-c \right ) \tanh \left ( x/2 \right ) +2\,a}{\sqrt{-{a}^{2}+{b}^{2}-{c}^{2}}}} \right ) }+2\,{\frac{ab}{ \left ( b+c \right ) \sqrt{-{a}^{2}+{b}^{2}-{c}^{2}} \left ( b-c \right ) }\arctan \left ( 1/2\,{\frac{2\, \left ( b-c \right ) \tanh \left ( x/2 \right ) +2\,a}{\sqrt{-{a}^{2}+{b}^{2}-{c}^{2}}}} \right ) }+{\frac{1}{b+c}\ln \left ( \tanh \left ({\frac{x}{2}} \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 [B] time = 14.5817, size = 1372, normalized size = 11.63 \begin{align*} \text{result too large to display} \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{\operatorname{csch}^{2}{\left (x \right )}}{a + b \coth{\left (x \right )} + c \operatorname{csch}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15592, size = 165, normalized size = 1.4 \begin{align*} \frac{2 \, a c \arctan \left (\frac{a e^{x} + b e^{x} + c}{\sqrt{-a^{2} + b^{2} - c^{2}}}\right )}{\sqrt{-a^{2} + b^{2} - c^{2}}{\left (b^{2} - c^{2}\right )}} - \frac{b \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + 2 \, c e^{x} - a + b\right )}{b^{2} - c^{2}} + \frac{\log \left (e^{x} + 1\right )}{b - c} + \frac{\log \left ({\left | e^{x} - 1 \right |}\right )}{b + c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]