Optimal. Leaf size=52 \[ \frac {\tanh ^{-1}\left (\frac {b-a \tanh (x)}{\sqrt {a^2+b^2}}\right )}{2 \sqrt {a^2+b^2}}+\frac {\log (a+b \sinh (2 x))}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 68, normalized size of antiderivative = 1.31, number of steps used = 9, number of rules used = 7, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {1075, 12, 634, 618, 206, 628, 260} \[ \frac {\tanh ^{-1}\left (\frac {b-a \tanh (x)}{\sqrt {a^2+b^2}}\right )}{2 \sqrt {a^2+b^2}}+\frac {\log \left (-a \tanh ^2(x)+a+2 b \tanh (x)\right )}{4 b}+\frac {\log (\cosh (x))}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 206
Rule 260
Rule 618
Rule 628
Rule 634
Rule 1075
Rubi steps
\begin {align*} \int \frac {\sinh ^2(x)}{a+b \sinh (2 x)} \, dx &=-\operatorname {Subst}\left (\int \frac {x^2}{\left (-1+x^2\right ) \left (a+2 b x-a x^2\right )} \, dx,x,\tanh (x)\right )\\ &=\frac {\operatorname {Subst}\left (\int -\frac {2 b x}{-1+x^2} \, dx,x,\tanh (x)\right )}{4 b^2}+\frac {\operatorname {Subst}\left (\int -\frac {2 a b x}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )}{4 b^2}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {x}{-1+x^2} \, dx,x,\tanh (x)\right )}{2 b}-\frac {a \operatorname {Subst}\left (\int \frac {x}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )}{2 b}\\ &=\frac {\log (\cosh (x))}{2 b}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )+\frac {\operatorname {Subst}\left (\int \frac {2 b-2 a x}{a+2 b x-a x^2} \, dx,x,\tanh (x)\right )}{4 b}\\ &=\frac {\log (\cosh (x))}{2 b}+\frac {\log \left (a+2 b \tanh (x)-a \tanh ^2(x)\right )}{4 b}+\operatorname {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh (x)\right )\\ &=\frac {\tanh ^{-1}\left (\frac {2 b-2 a \tanh (x)}{2 \sqrt {a^2+b^2}}\right )}{2 \sqrt {a^2+b^2}}+\frac {\log (\cosh (x))}{2 b}+\frac {\log \left (a+2 b \tanh (x)-a \tanh ^2(x)\right )}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 59, normalized size = 1.13 \[ \frac {1}{4} \left (\frac {\log (a+b \sinh (2 x))}{b}-\frac {2 \tan ^{-1}\left (\frac {b-a \tanh (x)}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.48, size = 251, normalized size = 4.83 \[ \frac {\sqrt {a^{2} + b^{2}} b \log \left (\frac {b^{2} \cosh \relax (x)^{4} + 4 \, b^{2} \cosh \relax (x) \sinh \relax (x)^{3} + b^{2} \sinh \relax (x)^{4} + 2 \, a b \cosh \relax (x)^{2} + 2 \, {\left (3 \, b^{2} \cosh \relax (x)^{2} + a b\right )} \sinh \relax (x)^{2} + 2 \, a^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \relax (x)^{3} + a b \cosh \relax (x)\right )} \sinh \relax (x) + 2 \, {\left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + a\right )} \sqrt {a^{2} + b^{2}}}{b \cosh \relax (x)^{4} + 4 \, b \cosh \relax (x) \sinh \relax (x)^{3} + b \sinh \relax (x)^{4} + 2 \, a \cosh \relax (x)^{2} + 2 \, {\left (3 \, b \cosh \relax (x)^{2} + a\right )} \sinh \relax (x)^{2} + 4 \, {\left (b \cosh \relax (x)^{3} + a \cosh \relax (x)\right )} \sinh \relax (x) - b}\right ) - 2 \, {\left (a^{2} + b^{2}\right )} x + {\left (a^{2} + b^{2}\right )} \log \left (\frac {2 \, {\left (2 \, b \cosh \relax (x) \sinh \relax (x) + a\right )}}{\cosh \relax (x)^{2} - 2 \, \cosh \relax (x) \sinh \relax (x) + \sinh \relax (x)^{2}}\right )}{4 \, {\left (a^{2} b + b^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 92, normalized size = 1.77 \[ -\frac {\log \left (\frac {{\left | 2 \, b e^{\left (2 \, x\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (2 \, x\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{4 \, \sqrt {a^{2} + b^{2}}} - \frac {x}{2 \, b} + \frac {\log \left ({\left | b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b \right |}\right )}{4 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.39, size = 75, normalized size = 1.44 \[ -\frac {\ln \left (\tanh \relax (x )-1\right )}{4 b}-\frac {\ln \left (1+\tanh \relax (x )\right )}{4 b}+\frac {\ln \left (a \left (\tanh ^{2}\relax (x )\right )-2 b \tanh \relax (x )-a \right )}{4 b}-\frac {\arctanh \left (\frac {2 a \tanh \relax (x )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{2 \sqrt {a^{2}+b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 85, normalized size = 1.63 \[ -\frac {\log \left (\frac {b e^{\left (-2 \, x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-2 \, x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{4 \, \sqrt {a^{2} + b^{2}}} - \frac {x}{2 \, b} + \frac {\log \left (b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b\right )}{4 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.49, size = 273, normalized size = 5.25 \[ \frac {\mathrm {atan}\left (\frac {a^7}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {b^7\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {a\,b^6}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^3\,b^4}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^5\,b^2}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^2\,b^5\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {3\,a^4\,b^3\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}+\frac {a^6\,b\,{\mathrm {e}}^{2\,x}}{{\left (-a^2-b^2\right )}^{7/2}}\right )}{2\,\sqrt {-a^2-b^2}}-\frac {x}{2\,b}+\frac {4\,b^3\,\ln \left (2\,a\,{\mathrm {e}}^{2\,x}-b+b\,{\mathrm {e}}^{4\,x}\right )}{16\,a^2\,b^2+16\,b^4}+\frac {4\,a^2\,b\,\ln \left (2\,a\,{\mathrm {e}}^{2\,x}-b+b\,{\mathrm {e}}^{4\,x}\right )}{16\,a^2\,b^2+16\,b^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 {\sinh ^{2}{\relax (x )}}{a + b \sinh {\left (2 x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________