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.58, antiderivative size = 118, normalized size of antiderivative = 1.00, 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 12
Rule 206
Rule 618
Rule 628
Rule 634
Rule 1628
Rule 4397
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.24, 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]
________________________________________________________________________________________
fricas [B] time = 1.55, size = 546, normalized size = 4.63 \[ \left [-\frac {\sqrt {a^{2} - b^{2} + c^{2}} a c \log \left (\frac {2 \, {\left (a + b\right )} c \cosh \relax (x) + {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \relax (x)^{2} + {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \relax (x)^{2} + a^{2} - b^{2} + 2 \, c^{2} + 2 \, {\left ({\left (a + b\right )} c + {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x) + 2 \, \sqrt {a^{2} - b^{2} + c^{2}} {\left ({\left (a + b\right )} \cosh \relax (x) + {\left (a + b\right )} \sinh \relax (x) + c\right )}}{{\left (a + b\right )} \cosh \relax (x)^{2} + {\left (a + b\right )} \sinh \relax (x)^{2} + 2 \, c \cosh \relax (x) + 2 \, {\left ({\left (a + b\right )} \cosh \relax (x) + c\right )} \sinh \relax (x) - a + b}\right ) + {\left (a^{2} b - b^{3} + b c^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \relax (x) + a \sinh \relax (x) + c\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - {\left (a^{2} b - b^{3} + b c^{2} + c^{3} + {\left (a^{2} - b^{2}\right )} c\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) - {\left (a^{2} b - b^{3} + b c^{2} - c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right )}{a^{2} b^{2} - b^{4} - c^{4} - {\left (a^{2} - 2 \, b^{2}\right )} c^{2}}, \frac {2 \, \sqrt {-a^{2} + b^{2} - c^{2}} a c \arctan \left (\frac {\sqrt {-a^{2} + b^{2} - c^{2}} {\left ({\left (a + b\right )} \cosh \relax (x) + {\left (a + b\right )} \sinh \relax (x) + c\right )}}{a^{2} - b^{2} + c^{2}}\right ) - {\left (a^{2} b - b^{3} + b c^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \relax (x) + a \sinh \relax (x) + c\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) + {\left (a^{2} b - b^{3} + b c^{2} + c^{3} + {\left (a^{2} - b^{2}\right )} c\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right ) + {\left (a^{2} b - b^{3} + b c^{2} - c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) - 1\right )}{a^{2} b^{2} - b^{4} - c^{4} - {\left (a^{2} - 2 \, b^{2}\right )} c^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 122, normalized size = 1.03 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 180, normalized size = 1.53 \[ -\frac {b \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b -\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) c +2 a \tanh \left (\frac {x}{2}\right )+b +c \right )}{\left (b +c \right ) \left (b -c \right )}-\frac {2 \arctan \left (\frac {2 \left (b -c \right ) \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}-c^{2}}}\right ) a}{\left (b +c \right ) \sqrt {-a^{2}+b^{2}-c^{2}}}+\frac {2 \arctan \left (\frac {2 \left (b -c \right ) \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}-c^{2}}}\right ) b a}{\left (b +c \right ) \sqrt {-a^{2}+b^{2}-c^{2}}\, \left (b -c \right )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{b +c} \]
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 = 7.18, size = 1069, normalized size = 9.06 \[ \frac {\ln \left ({\mathrm {e}}^x-1\right )}{b+c}+\frac {\ln \left ({\mathrm {e}}^x+1\right )}{b-c}+\frac {\ln \left (-\frac {64\,\left (b-a+2\,c\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^4}-\frac {\left (\frac {32\,\left (-2\,a^3+3\,{\mathrm {e}}^x\,a^2\,c+2\,a\,b^2+6\,{\mathrm {e}}^x\,a\,b\,c-2\,a\,c^2+3\,{\mathrm {e}}^x\,b^2\,c+2\,b\,c^2+4\,{\mathrm {e}}^x\,c^3\right )}{{\left (a+b\right )}^5}+\frac {\left (\frac {32\,\left (a-b\right )\,\left (2\,b^3+6\,{\mathrm {e}}^x\,b^2\,c+2\,a\,b^2+b\,c^2+6\,a\,{\mathrm {e}}^x\,b\,c-3\,{\mathrm {e}}^x\,c^3+2\,a\,c^2\right )}{{\left (a+b\right )}^5}-\frac {32\,\left (a^2\,b+b\,c^2-b^3+a\,c\,\sqrt {a^2-b^2+c^2}\right )\,\left (-2\,a^3\,b^2-4\,{\mathrm {e}}^x\,a^3\,b\,c-2\,a^3\,c^2+{\mathrm {e}}^x\,a^2\,b^2\,c+4\,a^2\,b\,c^2+3\,{\mathrm {e}}^x\,a^2\,c^3+2\,a\,b^4+6\,{\mathrm {e}}^x\,a\,b^3\,c+a\,b^2\,c^2-6\,{\mathrm {e}}^x\,a\,b\,c^3-3\,a\,c^4+{\mathrm {e}}^x\,b^4\,c-3\,b^3\,c^2-5\,{\mathrm {e}}^x\,b^2\,c^3+3\,b\,c^4+4\,{\mathrm {e}}^x\,c^5\right )}{{\left (a+b\right )}^5\,\left (b^2-c^2\right )\,\left (a^2-b^2+c^2\right )}\right )\,\left (a^2\,b+b\,c^2-b^3+a\,c\,\sqrt {a^2-b^2+c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2-b^2+c^2\right )}\right )\,\left (a^2\,b+b\,c^2-b^3+a\,c\,\sqrt {a^2-b^2+c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2-b^2+c^2\right )}\right )\,\left (a^2\,b+b\,c^2-b^3+a\,c\,\sqrt {a^2-b^2+c^2}\right )}{-a^2\,b^2+a^2\,c^2+b^4-2\,b^2\,c^2+c^4}+\frac {\ln \left (-\frac {64\,\left (b-a+2\,c\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^4}-\frac {\left (\frac {32\,\left (-2\,a^3+3\,{\mathrm {e}}^x\,a^2\,c+2\,a\,b^2+6\,{\mathrm {e}}^x\,a\,b\,c-2\,a\,c^2+3\,{\mathrm {e}}^x\,b^2\,c+2\,b\,c^2+4\,{\mathrm {e}}^x\,c^3\right )}{{\left (a+b\right )}^5}+\frac {\left (\frac {32\,\left (a-b\right )\,\left (2\,b^3+6\,{\mathrm {e}}^x\,b^2\,c+2\,a\,b^2+b\,c^2+6\,a\,{\mathrm {e}}^x\,b\,c-3\,{\mathrm {e}}^x\,c^3+2\,a\,c^2\right )}{{\left (a+b\right )}^5}-\frac {32\,\left (a^2\,b+b\,c^2-b^3-a\,c\,\sqrt {a^2-b^2+c^2}\right )\,\left (-2\,a^3\,b^2-4\,{\mathrm {e}}^x\,a^3\,b\,c-2\,a^3\,c^2+{\mathrm {e}}^x\,a^2\,b^2\,c+4\,a^2\,b\,c^2+3\,{\mathrm {e}}^x\,a^2\,c^3+2\,a\,b^4+6\,{\mathrm {e}}^x\,a\,b^3\,c+a\,b^2\,c^2-6\,{\mathrm {e}}^x\,a\,b\,c^3-3\,a\,c^4+{\mathrm {e}}^x\,b^4\,c-3\,b^3\,c^2-5\,{\mathrm {e}}^x\,b^2\,c^3+3\,b\,c^4+4\,{\mathrm {e}}^x\,c^5\right )}{{\left (a+b\right )}^5\,\left (b^2-c^2\right )\,\left (a^2-b^2+c^2\right )}\right )\,\left (a^2\,b+b\,c^2-b^3-a\,c\,\sqrt {a^2-b^2+c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2-b^2+c^2\right )}\right )\,\left (a^2\,b+b\,c^2-b^3-a\,c\,\sqrt {a^2-b^2+c^2}\right )}{\left (b^2-c^2\right )\,\left (a^2-b^2+c^2\right )}\right )\,\left (a^2\,b+b\,c^2-b^3-a\,c\,\sqrt {a^2-b^2+c^2}\right )}{-a^2\,b^2+a^2\,c^2+b^4-2\,b^2\,c^2+c^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {csch}^{2}{\relax (x )}}{a + b \coth {\relax (x )} + c \operatorname {csch}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________