3.104 \(\int \frac {A+B \cosh (x)}{\sqrt {a-a \cosh (x)}} \, dx\)

Optimal. Leaf size=57 \[ \frac {2 B \sinh (x)}{\sqrt {a-a \cosh (x)}}-\frac {\sqrt {2} (A+B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{\sqrt {a}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2751, 2649, 206} \[ \frac {2 B \sinh (x)}{\sqrt {a-a \cosh (x)}}-\frac {\sqrt {2} (A+B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{\sqrt {a}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2649

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

Rule 2751

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*Sin
[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 \frac {A+B \cosh (x)}{\sqrt {a-a \cosh (x)}} \, dx &=\frac {2 B \sinh (x)}{\sqrt {a-a \cosh (x)}}+(A+B) \int \frac {1}{\sqrt {a-a \cosh (x)}} \, dx\\ &=\frac {2 B \sinh (x)}{\sqrt {a-a \cosh (x)}}+(2 i (A+B)) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {i a \sinh (x)}{\sqrt {a-a \cosh (x)}}\right )\\ &=-\frac {\sqrt {2} (A+B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a-a \cosh (x)}}\right )}{\sqrt {a}}+\frac {2 B \sinh (x)}{\sqrt {a-a \cosh (x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 40, normalized size = 0.70 \[ \frac {2 \sinh \left (\frac {x}{2}\right ) \left ((A+B) \log \left (\tanh \left (\frac {x}{4}\right )\right )+2 B \cosh \left (\frac {x}{2}\right )\right )}{\sqrt {a-a \cosh (x)}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.86, size = 99, normalized size = 1.74 \[ \frac {\sqrt {2} {\left (A + B\right )} a \sqrt {-\frac {1}{a}} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {1}{2}} \sqrt {-\frac {a}{\cosh \relax (x) + \sinh \relax (x)}} \sqrt {-\frac {1}{a}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )} - \cosh \relax (x) - \sinh \relax (x) - 1}{\cosh \relax (x) + \sinh \relax (x) - 1}\right ) - 2 \, \sqrt {\frac {1}{2}} {\left (B \cosh \relax (x) + B \sinh \relax (x) + B\right )} \sqrt {-\frac {a}{\cosh \relax (x) + \sinh \relax (x)}}}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [C]  time = 0.16, size = 103, normalized size = 1.81 \[ \frac {1}{4} \, \sqrt {2} {\left (\frac {{\left (-8 i \, A \arctan \left (-i\right ) - 8 i \, B \arctan \left (-i\right ) + 8 \, B\right )} \mathrm {sgn}\left (-e^{x} + 1\right )}{\sqrt {-a}} - \frac {8 \, {\left (A + B\right )} \arctan \left (\frac {\sqrt {-a e^{x}}}{\sqrt {a}}\right )}{\sqrt {a} \mathrm {sgn}\left (-e^{x} + 1\right )} - \frac {4 \, B}{\sqrt {-a e^{x}} \mathrm {sgn}\left (-e^{x} + 1\right )} + \frac {4 \, \sqrt {-a e^{x}} B}{a \mathrm {sgn}\left (-e^{x} + 1\right )}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*sqrt(2)*((-8*I*A*arctan(-I) - 8*I*B*arctan(-I) + 8*B)*sgn(-e^x + 1)/sqrt(-a) - 8*(A + B)*arctan(sqrt(-a*e^
x)/sqrt(a))/(sqrt(a)*sgn(-e^x + 1)) - 4*B/(sqrt(-a*e^x)*sgn(-e^x + 1)) + 4*sqrt(-a*e^x)*B/(a*sgn(-e^x + 1)))

________________________________________________________________________________________

maple [A]  time = 0.37, size = 63, normalized size = 1.11 \[ \frac {\sinh \left (\frac {x}{2}\right ) \left (\ln \left (-1+\cosh \left (\frac {x}{2}\right )\right ) A -\ln \left (\cosh \left (\frac {x}{2}\right )+1\right ) A +B \ln \left (-1+\cosh \left (\frac {x}{2}\right )\right )-B \ln \left (\cosh \left (\frac {x}{2}\right )+1\right )+4 B \cosh \left (\frac {x}{2}\right )\right )}{\sqrt {-2 a \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \cosh \relax (x) + A}{\sqrt {-a \cosh \relax (x) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {A+B\,\mathrm {cosh}\relax (x)}{\sqrt {a-a\,\mathrm {cosh}\relax (x)}} \,d x \]

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)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B \cosh {\relax (x )}}{\sqrt {- a \left (\cosh {\relax (x )} - 1\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________