3.8.63 \(\int \sqrt {a+b \cosh (x)+c \sinh (x)} \, dx\) [763]

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]

-2*I*(cos(1/2*I*x-1/2*arctan(b,-I*c))^2)^(1/2)/cos(1/2*I*x-1/2*arctan(b,-I*c))*EllipticE(sin(1/2*I*x-1/2*arcta
n(b,-I*c)),2^(1/2)*((b^2-c^2)^(1/2)/(a+(b^2-c^2)^(1/2)))^(1/2))*(a+b*cosh(x)+c*sinh(x))^(1/2)/((a+b*cosh(x)+c*
sinh(x))/(a+(b^2-c^2)^(1/2)))^(1/2)

________________________________________________________________________________________

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]

Int[Sqrt[a + b*Cosh[x] + c*Sinh[x]],x]

[Out]

((-2*I)*EllipticE[(I*x - ArcTan[b, (-I)*c])/2, (2*Sqrt[b^2 - c^2])/(a + Sqrt[b^2 - c^2])]*Sqrt[a + b*Cosh[x] +
 c*Sinh[x]])/Sqrt[(a + b*Cosh[x] + c*Sinh[x])/(a + Sqrt[b^2 - c^2])]

Rule 2732

Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2
+ d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]

Rule 3198

Int[Sqrt[cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)]], x_Symbol] :> Dist[Sqrt[a + b*C
os[d + e*x] + c*Sin[d + e*x]]/Sqrt[(a + b*Cos[d + e*x] + c*Sin[d + e*x])/(a + Sqrt[b^2 + c^2])], Int[Sqrt[a/(a
 + Sqrt[b^2 + c^2]) + (Sqrt[b^2 + c^2]/(a + Sqrt[b^2 + c^2]))*Cos[d + e*x - ArcTan[b, c]]], x], x] /; FreeQ[{a
, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0] && NeQ[b^2 + c^2, 0] &&  !GtQ[a + Sqrt[b^2 + c^2], 0]

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]

Integrate[Sqrt[a + b*Cosh[x] + c*Sinh[x]],x]

[Out]

(2*b^2*Cosh[x] + 2*b*c*Sinh[x] - 2*b*(b*Cosh[x] + c*Sinh[x]) + (2*a*AppellF1[1/2, 1/2, 1/2, 3/2, (a + b*Cosh[x
] + c*Sinh[x])/(a + I*Sqrt[1 - b^2/c^2]*c), (a + b*Cosh[x] + c*Sinh[x])/(a - I*Sqrt[1 - b^2/c^2]*c)]*Sech[x +
ArcTanh[b/c]]*(a + b*Cosh[x] + c*Sinh[x])*Sqrt[-(((-I)*Sqrt[1 - b^2/c^2]*c + b*Cosh[x] + c*Sinh[x])/(a + I*Sqr
t[1 - b^2/c^2]*c))]*Sqrt[-((I*Sqrt[1 - b^2/c^2]*c + b*Cosh[x] + c*Sinh[x])/(a - I*Sqrt[1 - b^2/c^2]*c))])/Sqrt
[1 - b^2/c^2] + (b*c*Sinh[x + ArcTanh[c/b]])/Sqrt[1 - c^2/b^2] - (c^3*Sinh[x + ArcTanh[c/b]])/(b*Sqrt[1 - c^2/
b^2]) + (c*(-b^2 + c^2)*AppellF1[-1/2, -1/2, -1/2, 1/2, (a + b*Cosh[x] + c*Sinh[x])/(a + b*Sqrt[1 - c^2/b^2]),
 (a + b*Cosh[x] + c*Sinh[x])/(a - b*Sqrt[1 - c^2/b^2])]*Sinh[x + ArcTanh[c/b]])/(b*Sqrt[1 - c^2/b^2]*Sqrt[(b*S
qrt[1 - c^2/b^2] - b*Cosh[x] - c*Sinh[x])/(a + b*Sqrt[1 - c^2/b^2])]*Sqrt[(b*Sqrt[1 - c^2/b^2] + b*Cosh[x] + c
*Sinh[x])/(-a + b*Sqrt[1 - c^2/b^2])]))/(c*Sqrt[a + b*Cosh[x] + c*Sinh[x]])

________________________________________________________________________________________

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]

int((a+b*cosh(x)+c*sinh(x))^(1/2),x,method=_RETURNVERBOSE)

[Out]

cosh(x)*(-b^2+c^2)/(b^2-c^2)^(1/2)/((-sinh(x)*b^2+sinh(x)*c^2+a*(b^2-c^2)^(1/2))/(b^2-c^2)^(1/2))^(1/2)+((-sin
h(x)*b^2+sinh(x)*c^2+a*(b^2-c^2)^(1/2))/(b^2-c^2)^(1/2)*sinh(x)^2)^(1/2)*a*ln((-cosh(x)*sinh(x)*b^2+cosh(x)*si
nh(x)*c^2+cosh(x)*(b^2-c^2)^(1/2)*a+((-b^2+c^2)/(b^2-c^2)^(1/2)*sinh(x)^3+a*sinh(x)^2)^(1/2)*(b^2-c^2)^(1/2)*(
(-b^2+c^2)/(b^2-c^2)^(1/2)*sinh(x)+a)^(1/2))/(b^2-c^2)^(1/2)/((-sinh(x)*b^2+sinh(x)*c^2+a*(b^2-c^2)^(1/2))/(b^
2-c^2)^(1/2))^(1/2))/(-sinh(x)*b^2+sinh(x)*c^2+a*(b^2-c^2)^(1/2))*(b^2-c^2)^(1/2)/sinh(x)

________________________________________________________________________________________

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]

integrate((a+b*cosh(x)+c*sinh(x))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(b*cosh(x) + c*sinh(x) + a), x)

________________________________________________________________________________________

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]

integrate((a+b*cosh(x)+c*sinh(x))^(1/2),x, algorithm="fricas")

[Out]

2/3*(sqrt(2)*a*sqrt(b + c)*weierstrassPInverse(4/3*(4*a^2 - 3*b^2 + 3*c^2)/(b^2 + 2*b*c + c^2), -8/27*(8*a^3 -
 9*a*b^2 + 9*a*c^2)/(b^3 + 3*b^2*c + 3*b*c^2 + c^3), 1/3*(3*(b + c)*cosh(x) + 3*(b + c)*sinh(x) + 2*a)/(b + c)
) - 3*sqrt(2)*(b + c)^(3/2)*weierstrassZeta(4/3*(4*a^2 - 3*b^2 + 3*c^2)/(b^2 + 2*b*c + c^2), -8/27*(8*a^3 - 9*
a*b^2 + 9*a*c^2)/(b^3 + 3*b^2*c + 3*b*c^2 + c^3), weierstrassPInverse(4/3*(4*a^2 - 3*b^2 + 3*c^2)/(b^2 + 2*b*c
 + c^2), -8/27*(8*a^3 - 9*a*b^2 + 9*a*c^2)/(b^3 + 3*b^2*c + 3*b*c^2 + c^3), 1/3*(3*(b + c)*cosh(x) + 3*(b + c)
*sinh(x) + 2*a)/(b + c))) - 3*sqrt(b*cosh(x) + c*sinh(x) + a)*(b + c))/(b + c)

________________________________________________________________________________________

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]

integrate((a+b*cosh(x)+c*sinh(x))**(1/2),x)

[Out]

Integral(sqrt(a + b*cosh(x) + c*sinh(x)), x)

________________________________________________________________________________________

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]

integrate((a+b*cosh(x)+c*sinh(x))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(b*cosh(x) + c*sinh(x) + a), x)

________________________________________________________________________________________

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]

int((a + b*cosh(x) + c*sinh(x))^(1/2),x)

[Out]

int((a + b*cosh(x) + c*sinh(x))^(1/2), x)

________________________________________________________________________________________