Optimal. Leaf size=102 \[ -\frac {2 i E\left (\frac {1}{2} \left (i x-\tan ^{-1}(b,-i c)\right )|\frac {2 \sqrt {b^2-c^2}}{a+\sqrt {b^2-c^2}}\right ) \sqrt {a+b \cosh (x)+c \sinh (x)}}{\sqrt {\frac {a+b \cosh (x)+c \sinh (x)}{a+\sqrt {b^2-c^2}}}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3198, 2732}
\begin {gather*} -\frac {2 i \sqrt {a+b \cosh (x)+c \sinh (x)} E\left (\frac {1}{2} \left (i x-\tan ^{-1}(b,-i c)\right )|\frac {2 \sqrt {b^2-c^2}}{a+\sqrt {b^2-c^2}}\right )}{\sqrt {\frac {a+b \cosh (x)+c \sinh (x)}{a+\sqrt {b^2-c^2}}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 3198
Rubi steps
\begin {align*} \int \sqrt {a+b \cosh (x)+c \sinh (x)} \, dx &=\frac {\sqrt {a+b \cosh (x)+c \sinh (x)} \int \sqrt {\frac {a}{a+\sqrt {b^2-c^2}}+\frac {\sqrt {b^2-c^2} \cosh \left (x+i \tan ^{-1}(b,-i c)\right )}{a+\sqrt {b^2-c^2}}} \, dx}{\sqrt {\frac {a+b \cosh (x)+c \sinh (x)}{a+\sqrt {b^2-c^2}}}}\\ &=-\frac {2 i E\left (\frac {1}{2} \left (i x-\tan ^{-1}(b,-i c)\right )|\frac {2 \sqrt {b^2-c^2}}{a+\sqrt {b^2-c^2}}\right ) \sqrt {a+b \cosh (x)+c \sinh (x)}}{\sqrt {\frac {a+b \cosh (x)+c \sinh (x)}{a+\sqrt {b^2-c^2}}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 4 in
optimal.
time = 5.84, size = 549, normalized size = 5.38 \begin {gather*} \frac {2 b^2 \cosh (x)+2 b c \sinh (x)-2 b (b \cosh (x)+c \sinh (x))+\frac {2 a F_1\left (\frac {1}{2};\frac {1}{2},\frac {1}{2};\frac {3}{2};\frac {a+b \cosh (x)+c \sinh (x)}{a+i \sqrt {1-\frac {b^2}{c^2}} c},\frac {a+b \cosh (x)+c \sinh (x)}{a-i \sqrt {1-\frac {b^2}{c^2}} c}\right ) \text {sech}\left (x+\tanh ^{-1}\left (\frac {b}{c}\right )\right ) (a+b \cosh (x)+c \sinh (x)) \sqrt {-\frac {-i \sqrt {1-\frac {b^2}{c^2}} c+b \cosh (x)+c \sinh (x)}{a+i \sqrt {1-\frac {b^2}{c^2}} c}} \sqrt {-\frac {i \sqrt {1-\frac {b^2}{c^2}} c+b \cosh (x)+c \sinh (x)}{a-i \sqrt {1-\frac {b^2}{c^2}} c}}}{\sqrt {1-\frac {b^2}{c^2}}}+\frac {b c \sinh \left (x+\tanh ^{-1}\left (\frac {c}{b}\right )\right )}{\sqrt {1-\frac {c^2}{b^2}}}-\frac {c^3 \sinh \left (x+\tanh ^{-1}\left (\frac {c}{b}\right )\right )}{b \sqrt {1-\frac {c^2}{b^2}}}+\frac {c \left (-b^2+c^2\right ) F_1\left (-\frac {1}{2};-\frac {1}{2},-\frac {1}{2};\frac {1}{2};\frac {a+b \cosh (x)+c \sinh (x)}{a+b \sqrt {1-\frac {c^2}{b^2}}},\frac {a+b \cosh (x)+c \sinh (x)}{a-b \sqrt {1-\frac {c^2}{b^2}}}\right ) \sinh \left (x+\tanh ^{-1}\left (\frac {c}{b}\right )\right )}{b \sqrt {1-\frac {c^2}{b^2}} \sqrt {\frac {b \sqrt {1-\frac {c^2}{b^2}}-b \cosh (x)-c \sinh (x)}{a+b \sqrt {1-\frac {c^2}{b^2}}}} \sqrt {\frac {b \sqrt {1-\frac {c^2}{b^2}}+b \cosh (x)+c \sinh (x)}{-a+b \sqrt {1-\frac {c^2}{b^2}}}}}}{c \sqrt {a+b \cosh (x)+c \sinh (x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(316\) vs.
\(2(125)=250\).
time = 2.73, size = 317, normalized size = 3.11
method | result | size |
default | \(\frac {\cosh \left (x \right ) \left (-b^{2}+c^{2}\right )}{\sqrt {b^{2}-c^{2}}\, \sqrt {\frac {-\sinh \left (x \right ) b^{2}+\sinh \left (x \right ) c^{2}+a \sqrt {b^{2}-c^{2}}}{\sqrt {b^{2}-c^{2}}}}}+\frac {\sqrt {\frac {\left (-\sinh \left (x \right ) b^{2}+\sinh \left (x \right ) c^{2}+a \sqrt {b^{2}-c^{2}}\right ) \left (\sinh ^{2}\left (x \right )\right )}{\sqrt {b^{2}-c^{2}}}}\, a \ln \left (\frac {-\cosh \left (x \right ) \sinh \left (x \right ) b^{2}+\cosh \left (x \right ) \sinh \left (x \right ) c^{2}+\cosh \left (x \right ) \sqrt {b^{2}-c^{2}}\, a +\sqrt {\frac {\left (-b^{2}+c^{2}\right ) \left (\sinh ^{3}\left (x \right )\right )}{\sqrt {b^{2}-c^{2}}}+a \left (\sinh ^{2}\left (x \right )\right )}\, \sqrt {b^{2}-c^{2}}\, \sqrt {\frac {\left (-b^{2}+c^{2}\right ) \sinh \left (x \right )}{\sqrt {b^{2}-c^{2}}}+a}}{\sqrt {b^{2}-c^{2}}\, \sqrt {\frac {-\sinh \left (x \right ) b^{2}+\sinh \left (x \right ) c^{2}+a \sqrt {b^{2}-c^{2}}}{\sqrt {b^{2}-c^{2}}}}}\right ) \sqrt {b^{2}-c^{2}}}{\left (-\sinh \left (x \right ) b^{2}+\sinh \left (x \right ) c^{2}+a \sqrt {b^{2}-c^{2}}\right ) \sinh \left (x \right )}\) | \(317\) |
risch | \(\sqrt {2}\, \sqrt {\left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +2 a \,{\mathrm e}^{x}+b -c \right ) {\mathrm e}^{-x}}+\frac {\left (\frac {4 a \left (a +\sqrt {a^{2}-b^{2}+c^{2}}\right ) \sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right ) \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}\, \sqrt {\frac {{\mathrm e}^{x}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}}{-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}}}\, \sqrt {-\frac {{\mathrm e}^{x} \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}\, \EllipticF \left (\sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right ) \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{\left (b +c \right ) \left (-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right )}}\right )}{\left (b +c \right ) \sqrt {b \,{\mathrm e}^{3 x}+{\mathrm e}^{3 x} c +2 \,{\mathrm e}^{2 x} a +{\mathrm e}^{x} b -c \,{\mathrm e}^{x}}}+2 \left (b -c \right ) \left (-\frac {2 \left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +2 a \,{\mathrm e}^{x}+b -c \right )}{\left (b -c \right ) \sqrt {\left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +2 a \,{\mathrm e}^{x}+b -c \right ) {\mathrm e}^{x}}}+\frac {2 \left (-\frac {b +c}{b -c}+\frac {2 b +2 c}{b -c}\right ) \left (a +\sqrt {a^{2}-b^{2}+c^{2}}\right ) \sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right ) \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}\, \sqrt {\frac {{\mathrm e}^{x}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}}{-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}}}\, \sqrt {-\frac {{\mathrm e}^{x} \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}\, \left (\left (-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right ) \EllipticE \left (\sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right ) \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{\left (b +c \right ) \left (-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right )}}\right )+\frac {\left (-a +\sqrt {a^{2}-b^{2}+c^{2}}\right ) \EllipticF \left (\sqrt {\frac {\left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right ) \left (b +c \right )}{a +\sqrt {a^{2}-b^{2}+c^{2}}}}, \sqrt {-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{\left (b +c \right ) \left (-\frac {a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}-\frac {-a +\sqrt {a^{2}-b^{2}+c^{2}}}{b +c}\right )}}\right )}{b +c}\right )}{\left (b +c \right ) \sqrt {b \,{\mathrm e}^{3 x}+{\mathrm e}^{3 x} c +2 \,{\mathrm e}^{2 x} a +{\mathrm e}^{x} b -c \,{\mathrm e}^{x}}}\right )\right ) \sqrt {2}\, \sqrt {\left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +2 a \,{\mathrm e}^{x}+b -c \right ) {\mathrm e}^{-x}}\, \sqrt {\left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +2 a \,{\mathrm e}^{x}+b -c \right ) {\mathrm e}^{x}}}{2 b \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{2 x} c +4 a \,{\mathrm e}^{x}+2 b -2 c}\) | \(1093\) |
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.13, size = 314, normalized size = 3.08 \begin {gather*} \frac {2 \, {\left (\sqrt {2} a \sqrt {b + c} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2} + 3 \, c^{2}\right )}}{3 \, {\left (b^{2} + 2 \, b c + c^{2}\right )}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2} + 9 \, a c^{2}\right )}}{27 \, {\left (b^{3} + 3 \, b^{2} c + 3 \, b c^{2} + c^{3}\right )}}, \frac {3 \, {\left (b + c\right )} \cosh \left (x\right ) + 3 \, {\left (b + c\right )} \sinh \left (x\right ) + 2 \, a}{3 \, {\left (b + c\right )}}\right ) - 3 \, \sqrt {2} {\left (b + c\right )}^{\frac {3}{2}} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2} + 3 \, c^{2}\right )}}{3 \, {\left (b^{2} + 2 \, b c + c^{2}\right )}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2} + 9 \, a c^{2}\right )}}{27 \, {\left (b^{3} + 3 \, b^{2} c + 3 \, b c^{2} + c^{3}\right )}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2} + 3 \, c^{2}\right )}}{3 \, {\left (b^{2} + 2 \, b c + c^{2}\right )}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2} + 9 \, a c^{2}\right )}}{27 \, {\left (b^{3} + 3 \, b^{2} c + 3 \, b c^{2} + c^{3}\right )}}, \frac {3 \, {\left (b + c\right )} \cosh \left (x\right ) + 3 \, {\left (b + c\right )} \sinh \left (x\right ) + 2 \, a}{3 \, {\left (b + c\right )}}\right )\right ) - 3 \, \sqrt {b \cosh \left (x\right ) + c \sinh \left (x\right ) + a} {\left (b + c\right )}\right )}}{3 \, {\left (b + c\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 \sqrt {a + b \cosh {\left (x \right )} + c \sinh {\left (x \right )}}\, dx \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 \sqrt {a+b\,\mathrm {cosh}\left (x\right )+c\,\mathrm {sinh}\left (x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________