Optimal. Leaf size=66 \[ -\frac {b \text {ArcTan}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}-\frac {a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3233, 3153,
212} \begin {gather*} -\frac {b \text {ArcTan}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}-\frac {a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3153
Rule 3233
Rubi steps
\begin {align*} \int \frac {\sinh (x)}{(a \cosh (x)+b \sinh (x))^2} \, dx &=-\frac {a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}-\frac {b \int \frac {1}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=-\frac {a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}-\frac {(i b) \text {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )}{a^2-b^2}\\ &=-\frac {b \tan ^{-1}\left (\frac {b \cosh (x)+a \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}-\frac {a}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 125, normalized size = 1.89 \begin {gather*} -\frac {a \sqrt {a-b} (a+b)+2 a b \sqrt {a+b} \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right ) \cosh (x)+2 b^2 \sqrt {a+b} \text {ArcTan}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b} \sqrt {a+b}}\right ) \sinh (x)}{(a-b)^{3/2} (a+b)^2 (a \cosh (x)+b \sinh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.77, size = 99, normalized size = 1.50
method | result | size |
default | \(\frac {-8 b \tanh \left (\frac {x}{2}\right )-8 a}{\left (4 a^{2}-4 b^{2}\right ) \left (a +2 b \tanh \left (\frac {x}{2}\right )+a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )\right )}-\frac {8 b \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (4 a^{2}-4 b^{2}\right ) \sqrt {a^{2}-b^{2}}}\) | \(99\) |
risch | \(-\frac {2 a \,{\mathrm e}^{x}}{\left (a -b \right ) \left (a +b \right ) \left ({\mathrm e}^{2 x} a +b \,{\mathrm e}^{2 x}+a -b \right )}-\frac {b \ln \left ({\mathrm e}^{x}+\frac {a -b}{\sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right )}+\frac {b \ln \left ({\mathrm e}^{x}-\frac {a -b}{\sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right )}\) | \(132\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 270 vs.
\(2 (62) = 124\).
time = 0.35, size = 594, normalized size = 9.00 \begin {gather*} \left [\frac {{\left ({\left (a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a b + b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a b + b^{2}\right )} \sinh \left (x\right )^{2} + a b - b^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - a + b}{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} + a - b}\right ) - 2 \, {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) - 2 \, {\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )}{a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5} + {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \sinh \left (x\right )^{2}}, \frac {2 \, {\left ({\left ({\left (a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a b + b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a b + b^{2}\right )} \sinh \left (x\right )^{2} + a b - b^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (\frac {\sqrt {a^{2} - b^{2}}}{{\left (a + b\right )} \cosh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )}\right ) - {\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) - {\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )\right )}}{a^{5} - a^{4} b - 2 \, a^{3} b^{2} + 2 \, a^{2} b^{3} + a b^{4} - b^{5} + {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{5} + a^{4} b - 2 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4} + b^{5}\right )} \sinh \left (x\right )^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sinh {\left (x \right )}}{\left (a \cosh {\left (x \right )} + b \sinh {\left (x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 72, normalized size = 1.09 \begin {gather*} -\frac {2 \, b \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, a e^{x}}{{\left (a^{2} - b^{2}\right )} {\left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.65, size = 183, normalized size = 2.77 \begin {gather*} -\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\left (b^2\,\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}+a\,b\,\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}\right )}{a^4\,\sqrt {b^2}-2\,a^2\,{\left (b^2\right )}^{3/2}+b^4\,\sqrt {b^2}+a\,b\,{\left (b^2\right )}^{3/2}-a\,b^3\,\sqrt {b^2}}\right )\,\sqrt {b^2}}{\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}}-\frac {2\,a\,{\mathrm {e}}^x}{\left (a+b\right )\,\left (a-b\right )\,\left (a-b+{\mathrm {e}}^{2\,x}\,\left (a+b\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________