Optimal. Leaf size=152 \[ -\frac {2 i (A b-a B) \sqrt {a+b \cosh (x)} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \left (a^2-b^2\right ) \sqrt {\frac {a+b \cosh (x)}{a+b}}}-\frac {2 i B \sqrt {\frac {a+b \cosh (x)}{a+b}} F\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \sqrt {a+b \cosh (x)}}-\frac {2 (A b-a B) \sinh (x)}{\left (a^2-b^2\right ) \sqrt {a+b \cosh (x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {2833, 2831,
2742, 2740, 2734, 2732} \begin {gather*} -\frac {2 \sinh (x) (A b-a B)}{\left (a^2-b^2\right ) \sqrt {a+b \cosh (x)}}-\frac {2 i (A b-a B) \sqrt {a+b \cosh (x)} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \left (a^2-b^2\right ) \sqrt {\frac {a+b \cosh (x)}{a+b}}}-\frac {2 i B \sqrt {\frac {a+b \cosh (x)}{a+b}} F\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \sqrt {a+b \cosh (x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2833
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)}{(a+b \cosh (x))^{3/2}} \, dx &=-\frac {2 (A b-a B) \sinh (x)}{\left (a^2-b^2\right ) \sqrt {a+b \cosh (x)}}-\frac {2 \int \frac {\frac {1}{2} (-a A+b B)-\frac {1}{2} (A b-a B) \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx}{a^2-b^2}\\ &=-\frac {2 (A b-a B) \sinh (x)}{\left (a^2-b^2\right ) \sqrt {a+b \cosh (x)}}+\frac {B \int \frac {1}{\sqrt {a+b \cosh (x)}} \, dx}{b}+\frac {(A b-a B) \int \sqrt {a+b \cosh (x)} \, dx}{b \left (a^2-b^2\right )}\\ &=-\frac {2 (A b-a B) \sinh (x)}{\left (a^2-b^2\right ) \sqrt {a+b \cosh (x)}}+\frac {\left ((A b-a B) \sqrt {a+b \cosh (x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cosh (x)}{a+b}} \, dx}{b \left (a^2-b^2\right ) \sqrt {\frac {a+b \cosh (x)}{a+b}}}+\frac {\left (B \sqrt {\frac {a+b \cosh (x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cosh (x)}{a+b}}} \, dx}{b \sqrt {a+b \cosh (x)}}\\ &=-\frac {2 i (A b-a B) \sqrt {a+b \cosh (x)} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \left (a^2-b^2\right ) \sqrt {\frac {a+b \cosh (x)}{a+b}}}-\frac {2 i B \sqrt {\frac {a+b \cosh (x)}{a+b}} F\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \sqrt {a+b \cosh (x)}}-\frac {2 (A b-a B) \sinh (x)}{\left (a^2-b^2\right ) \sqrt {a+b \cosh (x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 133, normalized size = 0.88 \begin {gather*} \frac {2 i (a+b) (-A b+a B) \sqrt {\frac {a+b \cosh (x)}{a+b}} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )-2 i \left (a^2-b^2\right ) B \sqrt {\frac {a+b \cosh (x)}{a+b}} F\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )+2 b (-A b+a B) \sinh (x)}{(a-b) b (a+b) \sqrt {a+b \cosh (x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(484\) vs.
\(2(178)=356\).
time = 1.66, size = 485, normalized size = 3.19
method | result | size |
default | \(\frac {\sqrt {\left (2 b \left (\cosh ^{2}\left (\frac {x}{2}\right )\right )+a -b \right ) \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \left (\frac {2 B \sqrt {\frac {2 b \left (\cosh ^{2}\left (\frac {x}{2}\right )\right )+a -b}{a -b}}\, \sqrt {-\left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \EllipticF \left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {\frac {-2 a +2 b}{b}}}{2}\right )}{b \sqrt {-\frac {2 b}{a -b}}\, \sqrt {2 \left (\sinh ^{4}\left (\frac {x}{2}\right )\right ) b +\left (a +b \right ) \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}}-\frac {2 \left (A b -B a \right ) \sqrt {2 \left (\sinh ^{4}\left (\frac {x}{2}\right )\right ) b +\left (a +b \right ) \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \left (2 \cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}\, \left (\sinh ^{2}\left (\frac {x}{2}\right )\right ) b -\sqrt {-\left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {\frac {2 b \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}{a -b}+\frac {a +b}{a -b}}\, \EllipticF \left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {\frac {-2 a +2 b}{b}}}{2}\right ) a -\sqrt {-\left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {\frac {2 b \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}{a -b}+\frac {a +b}{a -b}}\, \EllipticF \left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {\frac {-2 a +2 b}{b}}}{2}\right ) b +2 \sqrt {-\left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {\frac {2 b \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}{a -b}+\frac {a +b}{a -b}}\, \EllipticE \left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {\frac {-2 a +2 b}{b}}}{2}\right ) b \right )}{b \sinh \left (\frac {x}{2}\right )^{2} \left (2 b \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )+a +b \right ) \sqrt {-\frac {2 b}{a -b}}\, \left (a^{2}-b^{2}\right )}\right )}{\sinh \left (\frac {x}{2}\right ) \sqrt {2 b \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )+a +b}}\) | \(485\) |
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 [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 639, normalized size = 4.20 \begin {gather*} \frac {2 \, {\left ({\left (\sqrt {2} {\left (2 \, B a^{2} b + A a b^{2} - 3 \, B b^{3}\right )} \cosh \left (x\right )^{2} + \sqrt {2} {\left (2 \, B a^{2} b + A a b^{2} - 3 \, B b^{3}\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {2} {\left (2 \, B a^{3} + A a^{2} b - 3 \, B a b^{2}\right )} \cosh \left (x\right ) + 2 \, {\left (\sqrt {2} {\left (2 \, B a^{2} b + A a b^{2} - 3 \, B b^{3}\right )} \cosh \left (x\right ) + \sqrt {2} {\left (2 \, B a^{3} + A a^{2} b - 3 \, B a b^{2}\right )}\right )} \sinh \left (x\right ) + \sqrt {2} {\left (2 \, B a^{2} b + A a b^{2} - 3 \, B b^{3}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cosh \left (x\right ) + 3 \, b \sinh \left (x\right ) + 2 \, a}{3 \, b}\right ) + 3 \, {\left (\sqrt {2} {\left (B a b^{2} - A b^{3}\right )} \cosh \left (x\right )^{2} + \sqrt {2} {\left (B a b^{2} - A b^{3}\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {2} {\left (B a^{2} b - A a b^{2}\right )} \cosh \left (x\right ) + 2 \, {\left (\sqrt {2} {\left (B a b^{2} - A b^{3}\right )} \cosh \left (x\right ) + \sqrt {2} {\left (B a^{2} b - A a b^{2}\right )}\right )} \sinh \left (x\right ) + \sqrt {2} {\left (B a b^{2} - A b^{3}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cosh \left (x\right ) + 3 \, b \sinh \left (x\right ) + 2 \, a}{3 \, b}\right )\right ) + 6 \, {\left ({\left (B a b^{2} - A b^{3}\right )} \cosh \left (x\right )^{2} + {\left (B a b^{2} - A b^{3}\right )} \sinh \left (x\right )^{2} + {\left (B a^{2} b - A a b^{2}\right )} \cosh \left (x\right ) + {\left (B a^{2} b - A a b^{2} + 2 \, {\left (B a b^{2} - A b^{3}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \sqrt {b \cosh \left (x\right ) + a}\right )}}{3 \, {\left (a^{2} b^{3} - b^{5} + {\left (a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )^{2} + {\left (a^{2} b^{3} - b^{5}\right )} \sinh \left (x\right )^{2} + 2 \, {\left (a^{3} b^{2} - a b^{4}\right )} \cosh \left (x\right ) + 2 \, {\left (a^{3} b^{2} - a b^{4} + {\left (a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )\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 [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \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+b\,\mathrm {cosh}\left (x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________