Optimal. Leaf size=94 \[ -\frac {(3 A-5 B) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{16 \sqrt {2} a^{5/2}}-\frac {(A+B) \sinh (x)}{4 (a-a \cosh (x))^{5/2}}-\frac {(3 A-5 B) \sinh (x)}{16 a (a-a \cosh (x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2829, 2729,
2728, 212} \begin {gather*} -\frac {(3 A-5 B) \text {ArcTan}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{16 \sqrt {2} a^{5/2}}-\frac {(3 A-5 B) \sinh (x)}{16 a (a-a \cosh (x))^{3/2}}-\frac {(A+B) \sinh (x)}{4 (a-a \cosh (x))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2729
Rule 2829
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)}{(a-a \cosh (x))^{5/2}} \, dx &=-\frac {(A+B) \sinh (x)}{4 (a-a \cosh (x))^{5/2}}+\frac {(3 A-5 B) \int \frac {1}{(a-a \cosh (x))^{3/2}} \, dx}{8 a}\\ &=-\frac {(A+B) \sinh (x)}{4 (a-a \cosh (x))^{5/2}}-\frac {(3 A-5 B) \sinh (x)}{16 a (a-a \cosh (x))^{3/2}}+\frac {(3 A-5 B) \int \frac {1}{\sqrt {a-a \cosh (x)}} \, dx}{32 a^2}\\ &=-\frac {(A+B) \sinh (x)}{4 (a-a \cosh (x))^{5/2}}-\frac {(3 A-5 B) \sinh (x)}{16 a (a-a \cosh (x))^{3/2}}+\frac {(i (3 A-5 B)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {i a \sinh (x)}{\sqrt {a-a \cosh (x)}}\right )}{16 a^2}\\ &=-\frac {(3 A-5 B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{16 \sqrt {2} a^{5/2}}-\frac {(A+B) \sinh (x)}{4 (a-a \cosh (x))^{5/2}}-\frac {(3 A-5 B) \sinh (x)}{16 a (a-a \cosh (x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 108, normalized size = 1.15 \begin {gather*} \frac {\left (2 (3 A-5 B) \text {csch}^2\left (\frac {x}{4}\right )-(A+B) \text {csch}^4\left (\frac {x}{4}\right )+8 (3 A-5 B) \log \left (\tanh \left (\frac {x}{4}\right )\right )+2 (3 A-5 B) \text {sech}^2\left (\frac {x}{4}\right )+(A+B) \text {sech}^4\left (\frac {x}{4}\right )\right ) \sinh ^5\left (\frac {x}{2}\right )}{32 a^2 (-1+\cosh (x))^2 \sqrt {a-a \cosh (x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.25, size = 118, normalized size = 1.26
method | result | size |
default | \(\frac {\left (6 A -10 B \right ) \cosh \left (\frac {x}{2}\right ) \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )+\left (-4 A -4 B \right ) \cosh \left (\frac {x}{2}\right )+\left (3 \ln \left (\cosh \left (\frac {x}{2}\right )-1\right ) A -3 \ln \left (\cosh \left (\frac {x}{2}\right )+1\right ) A -5 \ln \left (\cosh \left (\frac {x}{2}\right )-1\right ) B +5 \ln \left (\cosh \left (\frac {x}{2}\right )+1\right ) B \right ) \left (\sinh ^{4}\left (\frac {x}{2}\right )\right )}{32 a^{2} \left (\cosh \left (\frac {x}{2}\right )+1\right ) \left (\cosh \left (\frac {x}{2}\right )-1\right ) \sinh \left (\frac {x}{2}\right ) \sqrt {-2 \left (\sinh ^{2}\left (\frac {x}{2}\right )\right ) a}}\) | \(118\) |
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. 548 vs.
\(2 (75) = 150\).
time = 0.36, size = 548, normalized size = 5.83 \begin {gather*} \frac {\sqrt {2} {\left ({\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{4} + {\left (3 \, A - 5 \, B\right )} \sinh \left (x\right )^{4} - 4 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{3} + 4 \, {\left ({\left (3 \, A - 5 \, B\right )} \cosh \left (x\right ) - 3 \, A + 5 \, B\right )} \sinh \left (x\right )^{3} + 6 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{2} + 6 \, {\left ({\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{2} - 2 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right ) + 3 \, A - 5 \, B\right )} \sinh \left (x\right )^{2} - 4 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right ) + 4 \, {\left ({\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{3} - 3 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{2} + 3 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right ) - 3 \, A + 5 \, B\right )} \sinh \left (x\right ) + 3 \, A - 5 \, 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 (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{4} + {\left (3 \, A - 5 \, B\right )} \sinh \left (x\right )^{4} - {\left (11 \, A + 3 \, B\right )} \cosh \left (x\right )^{3} + {\left (4 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right ) - 11 \, A - 3 \, B\right )} \sinh \left (x\right )^{3} - {\left (11 \, A + 3 \, B\right )} \cosh \left (x\right )^{2} + {\left (6 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{2} - 3 \, {\left (11 \, A + 3 \, B\right )} \cosh \left (x\right ) - 11 \, A - 3 \, B\right )} \sinh \left (x\right )^{2} + {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right ) + {\left (4 \, {\left (3 \, A - 5 \, B\right )} \cosh \left (x\right )^{3} - 3 \, {\left (11 \, A + 3 \, B\right )} \cosh \left (x\right )^{2} - 2 \, {\left (11 \, A + 3 \, B\right )} \cosh \left (x\right ) + 3 \, A - 5 \, B\right )} \sinh \left (x\right )\right )} \sqrt {-\frac {a}{\cosh \left (x\right ) + \sinh \left (x\right )}}}{32 \, {\left (a^{3} \cosh \left (x\right )^{4} + a^{3} \sinh \left (x\right )^{4} - 4 \, a^{3} \cosh \left (x\right )^{3} + 6 \, a^{3} \cosh \left (x\right )^{2} - 4 \, a^{3} \cosh \left (x\right ) + 4 \, {\left (a^{3} \cosh \left (x\right ) - a^{3}\right )} \sinh \left (x\right )^{3} + a^{3} + 6 \, {\left (a^{3} \cosh \left (x\right )^{2} - 2 \, a^{3} \cosh \left (x\right ) + a^{3}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (a^{3} \cosh \left (x\right )^{3} - 3 \, a^{3} \cosh \left (x\right )^{2} + 3 \, a^{3} \cosh \left (x\right ) - a^{3}\right )} \sinh \left (x\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \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. 189 vs.
\(2 (75) = 150\).
time = 0.42, size = 189, normalized size = 2.01 \begin {gather*} -\frac {\sqrt {2} {\left (3 \, A - 5 \, B\right )} \arctan \left (\frac {\sqrt {-a e^{x}}}{\sqrt {a}}\right )}{16 \, a^{\frac {5}{2}} \mathrm {sgn}\left (-e^{x} + 1\right )} + \frac {\sqrt {2} {\left (3 \, \sqrt {-a e^{x}} A a^{3} e^{\left (3 \, x\right )} - 5 \, \sqrt {-a e^{x}} B a^{3} e^{\left (3 \, x\right )} - 11 \, \sqrt {-a e^{x}} A a^{3} e^{\left (2 \, x\right )} - 3 \, \sqrt {-a e^{x}} B a^{3} e^{\left (2 \, x\right )} - 11 \, \sqrt {-a e^{x}} A a^{3} e^{x} - 3 \, \sqrt {-a e^{x}} B a^{3} e^{x} + 3 \, \sqrt {-a e^{x}} A a^{3} - 5 \, \sqrt {-a e^{x}} B a^{3}\right )}}{16 \, {\left (a e^{x} - a\right )}^{4} a^{2} \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.01 \begin {gather*} \int \frac {A+B\,\mathrm {cosh}\left (x\right )}{{\left (a-a\,\mathrm {cosh}\left (x\right )\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________