Optimal. Leaf size=65 \[ -\frac {(A-3 B) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{2 \sqrt {2} a^{3/2}}-\frac {(A+B) \sinh (x)}{2 (a-a \cosh (x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2829, 2728,
212} \begin {gather*} -\frac {(A-3 B) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{2 \sqrt {2} a^{3/2}}-\frac {(A+B) \sinh (x)}{2 (a-a \cosh (x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2829
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)}{(a-a \cosh (x))^{3/2}} \, dx &=-\frac {(A+B) \sinh (x)}{2 (a-a \cosh (x))^{3/2}}+\frac {(A-3 B) \int \frac {1}{\sqrt {a-a \cosh (x)}} \, dx}{4 a}\\ &=-\frac {(A+B) \sinh (x)}{2 (a-a \cosh (x))^{3/2}}+\frac {(i (A-3 B)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {i a \sinh (x)}{\sqrt {a-a \cosh (x)}}\right )}{2 a}\\ &=-\frac {(A-3 B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{2 \sqrt {2} a^{3/2}}-\frac {(A+B) \sinh (x)}{2 (a-a \cosh (x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 71, normalized size = 1.09 \begin {gather*} \frac {\left ((A+B) \text {csch}^2\left (\frac {x}{4}\right )+4 (A-3 B) \log \left (\tanh \left (\frac {x}{4}\right )\right )+(A+B) \text {sech}^2\left (\frac {x}{4}\right )\right ) \sinh ^3\left (\frac {x}{2}\right )}{4 a (-1+\cosh (x)) \sqrt {a-a \cosh (x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.26, size = 83, normalized size = 1.28
method | result | size |
default | \(\frac {\cosh \left (\frac {x}{2}\right ) \left (2 A +2 B \right )+\left (\ln \left (\cosh \left (\frac {x}{2}\right )-1\right ) A -\ln \left (\cosh \left (\frac {x}{2}\right )+1\right ) A -3 \ln \left (\cosh \left (\frac {x}{2}\right )-1\right ) B +3 \ln \left (\cosh \left (\frac {x}{2}\right )+1\right ) B \right ) \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}{4 a \sinh \left (\frac {x}{2}\right ) \sqrt {-2 \left (\sinh ^{2}\left (\frac {x}{2}\right )\right ) a}}\) | \(83\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \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. 217 vs.
\(2 (50) = 100\).
time = 0.44, size = 217, normalized size = 3.34 \begin {gather*} \frac {\sqrt {2} {\left ({\left (A - 3 \, B\right )} \cosh \left (x\right )^{2} + {\left (A - 3 \, B\right )} \sinh \left (x\right )^{2} - 2 \, {\left (A - 3 \, B\right )} \cosh \left (x\right ) + 2 \, {\left ({\left (A - 3 \, B\right )} \cosh \left (x\right ) - A + 3 \, B\right )} \sinh \left (x\right ) + A - 3 \, B\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {1}{2}} \sqrt {-a} \sqrt {-\frac {a}{\cosh \left (x\right ) + \sinh \left (x\right )}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - a \cosh \left (x\right ) - a \sinh \left (x\right ) - a}{\cosh \left (x\right ) + \sinh \left (x\right ) - 1}\right ) - 4 \, \sqrt {\frac {1}{2}} {\left ({\left (A + B\right )} \cosh \left (x\right )^{2} + {\left (A + B\right )} \sinh \left (x\right )^{2} + {\left (A + B\right )} \cosh \left (x\right ) + {\left (2 \, {\left (A + B\right )} \cosh \left (x\right ) + A + B\right )} \sinh \left (x\right )\right )} \sqrt {-\frac {a}{\cosh \left (x\right ) + \sinh \left (x\right )}}}{4 \, {\left (a^{2} \cosh \left (x\right )^{2} + a^{2} \sinh \left (x\right )^{2} - 2 \, a^{2} \cosh \left (x\right ) + a^{2} + 2 \, {\left (a^{2} \cosh \left (x\right ) - a^{2}\right )} \sinh \left (x\right )\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 {A + B \cosh {\left (x \right )}}{\left (- a \left (\cosh {\left (x \right )} - 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 111 vs.
\(2 (50) = 100\).
time = 0.43, size = 111, normalized size = 1.71 \begin {gather*} -\frac {{\left (\sqrt {2} A - 3 \, \sqrt {2} B\right )} \arctan \left (\frac {\sqrt {-a e^{x}}}{\sqrt {a}}\right )}{2 \, a^{\frac {3}{2}} \mathrm {sgn}\left (-e^{x} + 1\right )} + \frac {\sqrt {2} {\left (\sqrt {-a e^{x}} A a e^{x} + \sqrt {-a e^{x}} B a e^{x} + \sqrt {-a e^{x}} A a + \sqrt {-a e^{x}} B a\right )}}{2 \, {\left (a e^{x} - a\right )}^{2} a \mathrm {sgn}\left (-e^{x} + 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {A+B\,\mathrm {cosh}\left (x\right )}{{\left (a-a\,\mathrm {cosh}\left (x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________