Optimal. Leaf size=64 \[ \frac {a \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 {b}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 64, 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 = {3234, 3153,
212} \begin {gather*} \frac {a \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 {b}{\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 3234
Rubi steps
\begin {align*} \int \frac {\cosh (x)}{(a \cosh (x)+b \sinh (x))^2} \, dx &=\frac {b}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}+\frac {a \int \frac {1}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=\frac {b}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}+\frac {(i a) \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 {a \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 {b}{\left (a^2-b^2\right ) (a \cosh (x)+b \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 124, normalized size = 1.94 \begin {gather*} \frac {\sqrt {a-b} b (a+b)+2 a^2 \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 a b \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.38, size = 98, normalized size = 1.53
method | result | size |
default | \(\frac {\frac {2 b^{2} \tanh \left (\frac {x}{2}\right )}{a \left (a^{2}-b^{2}\right )}+\frac {2 b}{a^{2}-b^{2}}}{a +2 b \tanh \left (\frac {x}{2}\right )+a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}+\frac {2 a \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a^{2}-b^{2}\right )^{\frac {3}{2}}}\) | \(98\) |
risch | \(\frac {2 b \,{\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 {a \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 {a \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. 271 vs.
\(2 (60) = 120\).
time = 0.37, size = 596, normalized size = 9.31 \begin {gather*} \left [\frac {{\left ({\left (a^{2} + a b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} + a b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{2} + a b\right )} \sinh \left (x\right )^{2} + a^{2} - a b\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^{2} b - b^{3}\right )} \cosh \left (x\right ) + 2 \, {\left (a^{2} b - b^{3}\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^{2} + a b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{2} + a b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{2} + a b\right )} \sinh \left (x\right )^{2} + a^{2} - a b\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^{2} b - b^{3}\right )} \cosh \left (x\right ) - {\left (a^{2} b - b^{3}\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 {\cosh {\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.12 \begin {gather*} \frac {2 \, a \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 \, b 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.71, size = 183, normalized size = 2.86 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\left (a^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 {a^2}-2\,b^2\,{\left (a^2\right )}^{3/2}+b^4\,\sqrt {a^2}+a\,b\,{\left (a^2\right )}^{3/2}-a^3\,b\,\sqrt {a^2}}\right )\,\sqrt {a^2}}{\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}}+\frac {2\,b\,{\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]
________________________________________________________________________________________