Integrand size = 17, antiderivative size = 108 \[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=-\frac {2 i B \sqrt {a+b \cosh (x)} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \sqrt {\frac {a+b \cosh (x)}{a+b}}}-\frac {2 i (A b-a B) \sqrt {\frac {a+b \cosh (x)}{a+b}} \operatorname {EllipticF}\left (\frac {i x}{2},\frac {2 b}{a+b}\right )}{b \sqrt {a+b \cosh (x)}} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {2831, 2742, 2740, 2734, 2732} \[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=-\frac {2 i (A b-a B) \sqrt {\frac {a+b \cosh (x)}{a+b}} \operatorname {EllipticF}\left (\frac {i x}{2},\frac {2 b}{a+b}\right )}{b \sqrt {a+b \cosh (x)}}-\frac {2 i B \sqrt {a+b \cosh (x)} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \sqrt {\frac {a+b \cosh (x)}{a+b}}} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rubi steps \begin{align*} \text {integral}& = \frac {B \int \sqrt {a+b \cosh (x)} \, dx}{b}+\frac {(A b-a B) \int \frac {1}{\sqrt {a+b \cosh (x)}} \, dx}{b} \\ & = \frac {\left (B \sqrt {a+b \cosh (x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cosh (x)}{a+b}} \, dx}{b \sqrt {\frac {a+b \cosh (x)}{a+b}}}+\frac {\left ((A b-a 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 B \sqrt {a+b \cosh (x)} E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )}{b \sqrt {\frac {a+b \cosh (x)}{a+b}}}-\frac {2 i (A b-a B) \sqrt {\frac {a+b \cosh (x)}{a+b}} \operatorname {EllipticF}\left (\frac {i x}{2},\frac {2 b}{a+b}\right )}{b \sqrt {a+b \cosh (x)}} \\ \end{align*}
Time = 0.37 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.74 \[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=-\frac {2 i \sqrt {\frac {a+b \cosh (x)}{a+b}} \left ((a+b) B E\left (\frac {i x}{2}|\frac {2 b}{a+b}\right )+(A b-a B) \operatorname {EllipticF}\left (\frac {i x}{2},\frac {2 b}{a+b}\right )\right )}{b \sqrt {a+b \cosh (x)}} \]
[In]
[Out]
Time = 1.69 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.02
method | result | size |
default | \(\frac {2 \left (A \operatorname {EllipticF}\left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {-\frac {2 \left (a -b \right )}{b}}}{2}\right )+B \operatorname {EllipticF}\left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {-\frac {2 \left (a -b \right )}{b}}}{2}\right )-2 B \operatorname {EllipticE}\left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {-\frac {2 \left (a -b \right )}{b}}}{2}\right )\right ) \sqrt {-\sinh \left (\frac {x}{2}\right )^{2}}\, \sqrt {\frac {2 \cosh \left (\frac {x}{2}\right )^{2} b +a -b}{a -b}}\, \sqrt {\left (2 \cosh \left (\frac {x}{2}\right )^{2} b +a -b \right ) \sinh \left (\frac {x}{2}\right )^{2}}}{\sqrt {-\frac {2 b}{a -b}}\, \sqrt {2 \sinh \left (\frac {x}{2}\right )^{4} b +\left (a +b \right ) \sinh \left (\frac {x}{2}\right )^{2}}\, \sinh \left (\frac {x}{2}\right ) \sqrt {2 \sinh \left (\frac {x}{2}\right )^{2} b +a +b}}\) | \(218\) |
parts | \(\frac {2 A \sqrt {\left (2 \cosh \left (\frac {x}{2}\right )^{2} b +a -b \right ) \sinh \left (\frac {x}{2}\right )^{2}}\, \sqrt {\frac {2 \cosh \left (\frac {x}{2}\right )^{2} b +a -b}{a -b}}\, \sqrt {-\sinh \left (\frac {x}{2}\right )^{2}}\, \operatorname {EllipticF}\left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {-\frac {2 \left (a -b \right )}{b}}}{2}\right )}{\sqrt {-\frac {2 b}{a -b}}\, \sqrt {2 \sinh \left (\frac {x}{2}\right )^{4} b +\left (a +b \right ) \sinh \left (\frac {x}{2}\right )^{2}}\, \sinh \left (\frac {x}{2}\right ) \sqrt {2 \sinh \left (\frac {x}{2}\right )^{2} b +a +b}}+\frac {2 B \left (\operatorname {EllipticF}\left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {-\frac {2 \left (a -b \right )}{b}}}{2}\right )-2 \operatorname {EllipticE}\left (\cosh \left (\frac {x}{2}\right ) \sqrt {-\frac {2 b}{a -b}}, \frac {\sqrt {-\frac {2 \left (a -b \right )}{b}}}{2}\right )\right ) \sqrt {-\sinh \left (\frac {x}{2}\right )^{2}}\, \sqrt {\frac {2 \cosh \left (\frac {x}{2}\right )^{2} b +a -b}{a -b}}\, \sqrt {\left (2 \cosh \left (\frac {x}{2}\right )^{2} b +a -b \right ) \sinh \left (\frac {x}{2}\right )^{2}}}{\sqrt {-\frac {2 b}{a -b}}\, \sqrt {2 \sinh \left (\frac {x}{2}\right )^{4} b +\left (a +b \right ) \sinh \left (\frac {x}{2}\right )^{2}}\, \sinh \left (\frac {x}{2}\right ) \sqrt {2 \sinh \left (\frac {x}{2}\right )^{2} b +a +b}}\) | \(329\) |
risch | \(\frac {B \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}+b \right ) \sqrt {2}\, {\mathrm e}^{-x}}{b \sqrt {\left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}+b \right ) {\mathrm e}^{-x}}}+\frac {\left (\frac {4 A \left (a +\sqrt {a^{2}-b^{2}}\right ) \sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}\, \sqrt {\frac {{\mathrm e}^{x}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}}{-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}}}\, \sqrt {-\frac {{\mathrm e}^{x} b}{a +\sqrt {a^{2}-b^{2}}}}\, \operatorname {EllipticF}\left (\sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}}}{b \left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}}\right )}{b \sqrt {{\mathrm e}^{3 x} b +2 a \,{\mathrm e}^{2 x}+{\mathrm e}^{x} b}}+2 B \left (-\frac {2 \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}+b \right )}{b \sqrt {\left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}+b \right ) {\mathrm e}^{x}}}+\frac {2 \left (a +\sqrt {a^{2}-b^{2}}\right ) \sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}\, \sqrt {\frac {{\mathrm e}^{x}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}}{-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}}}\, \sqrt {-\frac {{\mathrm e}^{x} b}{a +\sqrt {a^{2}-b^{2}}}}\, \left (\left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right ) \operatorname {EllipticE}\left (\sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}}}{b \left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}}\right )+\frac {\left (-a +\sqrt {a^{2}-b^{2}}\right ) \operatorname {EllipticF}\left (\sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right ) b}{a +\sqrt {a^{2}-b^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}}}{b \left (-\frac {a +\sqrt {a^{2}-b^{2}}}{b}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}}\right )}{b}\right )}{b \sqrt {{\mathrm e}^{3 x} b +2 a \,{\mathrm e}^{2 x}+{\mathrm e}^{x} b}}\right )\right ) \sqrt {2}\, \sqrt {\left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}+b \right ) {\mathrm e}^{x}}\, {\mathrm e}^{-x}}{2 \sqrt {\left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}+b \right ) {\mathrm e}^{-x}}}\) | \(831\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.69 \[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=-\frac {2 \, {\left (3 \, \sqrt {2} B b^{\frac {3}{2}} {\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 ) + \sqrt {2} {\left (2 \, B a - 3 \, A b\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 \, \sqrt {b \cosh \left (x\right ) + a} B b\right )}}{3 \, b^{2}} \]
[In]
[Out]
\[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=\int \frac {A + B \cosh {\left (x \right )}}{\sqrt {a + b \cosh {\left (x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=\int { \frac {B \cosh \left (x\right ) + A}{\sqrt {b \cosh \left (x\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=\int { \frac {B \cosh \left (x\right ) + A}{\sqrt {b \cosh \left (x\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \cosh (x)}{\sqrt {a+b \cosh (x)}} \, dx=\int \frac {A+B\,\mathrm {cosh}\left (x\right )}{\sqrt {a+b\,\mathrm {cosh}\left (x\right )}} \,d x \]
[In]
[Out]