3.1.92 \(\int \sqrt {a-a \cosh (x)} (A+B \cosh (x)) \, dx\) [92]

Optimal. Leaf size=44 \[ -\frac {2 a (3 A-B) \sinh (x)}{3 \sqrt {a-a \cosh (x)}}+\frac {2}{3} B \sqrt {a-a \cosh (x)} \sinh (x) \]

[Out]

-2/3*a*(3*A-B)*sinh(x)/(a-a*cosh(x))^(1/2)+2/3*B*sinh(x)*(a-a*cosh(x))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2830, 2725} \begin {gather*} \frac {2}{3} B \sinh (x) \sqrt {a-a \cosh (x)}-\frac {2 a (3 A-B) \sinh (x)}{3 \sqrt {a-a \cosh (x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a - a*Cosh[x]]*(A + B*Cosh[x]),x]

[Out]

(-2*a*(3*A - B)*Sinh[x])/(3*Sqrt[a - a*Cosh[x]]) + (2*B*Sqrt[a - a*Cosh[x]]*Sinh[x])/3

Rule 2725

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

Rule 2830

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d
)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(f*(m + 1))), x] + Dist[(a*d*m + b*c*(m + 1))/(b*(m + 1)), Int[(a + b*S
in[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&  !LtQ[m
, -2^(-1)]

Rubi steps

\begin {align*} \int \sqrt {a-a \cosh (x)} (A+B \cosh (x)) \, dx &=\frac {2}{3} B \sqrt {a-a \cosh (x)} \sinh (x)-\frac {1}{3} (-3 A+B) \int \sqrt {a-a \cosh (x)} \, dx\\ &=-\frac {2 a (3 A-B) \sinh (x)}{3 \sqrt {a-a \cosh (x)}}+\frac {2}{3} B \sqrt {a-a \cosh (x)} \sinh (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 32, normalized size = 0.73 \begin {gather*} \frac {2}{3} \sqrt {a-a \cosh (x)} (3 A-2 B+B \cosh (x)) \coth \left (\frac {x}{2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a - a*Cosh[x]]*(A + B*Cosh[x]),x]

[Out]

(2*Sqrt[a - a*Cosh[x]]*(3*A - 2*B + B*Cosh[x])*Coth[x/2])/3

________________________________________________________________________________________

Maple [A]
time = 1.02, size = 39, normalized size = 0.89

method result size
default \(-\frac {4 \sinh \left (\frac {x}{2}\right ) a \cosh \left (\frac {x}{2}\right ) \left (2 B \left (\cosh ^{2}\left (\frac {x}{2}\right )\right )+3 A -3 B \right )}{3 \sqrt {-2 \left (\sinh ^{2}\left (\frac {x}{2}\right )\right ) a}}\) \(39\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a-a*cosh(x))^(1/2)*(A+B*cosh(x)),x,method=_RETURNVERBOSE)

[Out]

-4/3*sinh(1/2*x)*a*cosh(1/2*x)*(2*B*cosh(1/2*x)^2+3*A-3*B)/(-2*sinh(1/2*x)^2*a)^(1/2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (36) = 72\).
time = 0.50, size = 109, normalized size = 2.48 \begin {gather*} -{\left (\frac {\sqrt {2} \sqrt {a} e^{\left (-x\right )}}{\sqrt {-e^{\left (-x\right )}}} + \frac {\sqrt {2} \sqrt {a}}{\sqrt {-e^{\left (-x\right )}}}\right )} A + \frac {1}{6} \, {\left (\frac {{\left (3 \, \sqrt {2} \sqrt {a} e^{\left (-x\right )} - \sqrt {2} \sqrt {a}\right )} e^{x}}{\sqrt {-e^{\left (-x\right )}}} + \frac {3 \, \sqrt {2} \sqrt {a} e^{\left (-x\right )} - \sqrt {2} \sqrt {a} e^{\left (-2 \, x\right )}}{\sqrt {-e^{\left (-x\right )}}}\right )} B \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*cosh(x))^(1/2)*(A+B*cosh(x)),x, algorithm="maxima")

[Out]

-(sqrt(2)*sqrt(a)*e^(-x)/sqrt(-e^(-x)) + sqrt(2)*sqrt(a)/sqrt(-e^(-x)))*A + 1/6*((3*sqrt(2)*sqrt(a)*e^(-x) - s
qrt(2)*sqrt(a))*e^x/sqrt(-e^(-x)) + (3*sqrt(2)*sqrt(a)*e^(-x) - sqrt(2)*sqrt(a)*e^(-2*x))/sqrt(-e^(-x)))*B

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (36) = 72\).
time = 0.40, size = 107, normalized size = 2.43 \begin {gather*} \frac {\sqrt {\frac {1}{2}} {\left (B \cosh \left (x\right )^{3} + B \sinh \left (x\right )^{3} + 3 \, {\left (2 \, A - B\right )} \cosh \left (x\right )^{2} + 3 \, {\left (B \cosh \left (x\right ) + 2 \, A - B\right )} \sinh \left (x\right )^{2} + 3 \, {\left (2 \, A - B\right )} \cosh \left (x\right ) + 3 \, {\left (B \cosh \left (x\right )^{2} + 2 \, {\left (2 \, A - B\right )} \cosh \left (x\right ) + 2 \, A - B\right )} \sinh \left (x\right ) + B\right )} \sqrt {-\frac {a}{\cosh \left (x\right ) + \sinh \left (x\right )}}}{3 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*cosh(x))^(1/2)*(A+B*cosh(x)),x, algorithm="fricas")

[Out]

1/3*sqrt(1/2)*(B*cosh(x)^3 + B*sinh(x)^3 + 3*(2*A - B)*cosh(x)^2 + 3*(B*cosh(x) + 2*A - B)*sinh(x)^2 + 3*(2*A
- B)*cosh(x) + 3*(B*cosh(x)^2 + 2*(2*A - B)*cosh(x) + 2*A - B)*sinh(x) + B)*sqrt(-a/(cosh(x) + sinh(x)))/(cosh
(x) + sinh(x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {- a \left (\cosh {\left (x \right )} - 1\right )} \left (A + B \cosh {\left (x \right )}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*cosh(x))**(1/2)*(A+B*cosh(x)),x)

[Out]

Integral(sqrt(-a*(cosh(x) - 1))*(A + B*cosh(x)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 131 vs. \(2 (36) = 72\).
time = 0.41, size = 131, normalized size = 2.98 \begin {gather*} \frac {1}{6} \, \sqrt {2} {\left (\frac {{\left (6 \, A a^{2} e^{x} \mathrm {sgn}\left (-e^{x} + 1\right ) - 3 \, B a^{2} e^{x} \mathrm {sgn}\left (-e^{x} + 1\right ) + B a^{2} \mathrm {sgn}\left (-e^{x} + 1\right )\right )} e^{\left (-x\right )}}{\sqrt {-a e^{x}} a} - \frac {\sqrt {-a e^{x}} B a^{3} e^{x} \mathrm {sgn}\left (-e^{x} + 1\right ) + 6 \, \sqrt {-a e^{x}} A a^{3} \mathrm {sgn}\left (-e^{x} + 1\right ) - 3 \, \sqrt {-a e^{x}} B a^{3} \mathrm {sgn}\left (-e^{x} + 1\right )}{a^{3}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*cosh(x))^(1/2)*(A+B*cosh(x)),x, algorithm="giac")

[Out]

1/6*sqrt(2)*((6*A*a^2*e^x*sgn(-e^x + 1) - 3*B*a^2*e^x*sgn(-e^x + 1) + B*a^2*sgn(-e^x + 1))*e^(-x)/(sqrt(-a*e^x
)*a) - (sqrt(-a*e^x)*B*a^3*e^x*sgn(-e^x + 1) + 6*sqrt(-a*e^x)*A*a^3*sgn(-e^x + 1) - 3*sqrt(-a*e^x)*B*a^3*sgn(-
e^x + 1))/a^3)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \left (A+B\,\mathrm {cosh}\left (x\right )\right )\,\sqrt {a-a\,\mathrm {cosh}\left (x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*cosh(x))*(a - a*cosh(x))^(1/2),x)

[Out]

int((A + B*cosh(x))*(a - a*cosh(x))^(1/2), x)

________________________________________________________________________________________