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

Optimal. Leaf size=56 \[ \frac {\sqrt {2} (A-B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a \cosh (x)+a}}\right )}{\sqrt {a}}+\frac {2 B \sinh (x)}{\sqrt {a \cosh (x)+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 = 56, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2751, 2649, 206} \[ \frac {\sqrt {2} (A-B) \tan ^{-1}\left (\frac {\sqrt {a} \sinh (x)}{\sqrt {2} \sqrt {a \cosh (x)+a}}\right )}{\sqrt {a}}+\frac {2 B \sinh (x)}{\sqrt {a \cosh (x)+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*C
osh[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.04, size = 41, normalized size = 0.73 \[ \frac {2 \cosh \left (\frac {x}{2}\right ) \left ((A-B) \tan ^{-1}\left (\sinh \left (\frac {x}{2}\right )\right )+2 B \sinh \left (\frac {x}{2}\right )\right )}{\sqrt {a (\cosh (x)+1)}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 3.97, size = 72, normalized size = 1.29 \[ \frac {2 \, {\left (\sqrt {2} {\left (A - B\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {1}{2}} \sqrt {\frac {a}{\cosh \relax (x) + \sinh \relax (x)}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )}}{\sqrt {a}}\right ) + \sqrt {\frac {1}{2}} {\left (B \cosh \relax (x) + B \sinh \relax (x) - B\right )} \sqrt {\frac {a}{\cosh \relax (x) + \sinh \relax (x)}}\right )}}{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]

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

________________________________________________________________________________________

giac [C]  time = 0.15, size = 61, normalized size = 1.09 \[ \frac {1}{4} \, \sqrt {2} {\left (\frac {8 \, {\left (A - B\right )} \arctan \left (e^{\left (\frac {1}{2} \, x\right )}\right )}{\sqrt {a}} + \frac {4 \, B e^{\left (\frac {1}{2} \, x\right )}}{\sqrt {a}} - \frac {4 \, B e^{\left (-\frac {1}{2} \, x\right )}}{\sqrt {a}} + \frac {-8 i \, A \arctan \left (-i\right ) + 8 i \, B \arctan \left (-i\right ) - 8 \, B}{\sqrt {-a}}\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*(A - B)*arctan(e^(1/2*x))/sqrt(a) + 4*B*e^(1/2*x)/sqrt(a) - 4*B*e^(-1/2*x)/sqrt(a) + (-8*I*A*ar
ctan(-I) + 8*I*B*arctan(-I) - 8*B)/sqrt(-a))

________________________________________________________________________________________

maple [B]  time = 0.32, size = 128, normalized size = 2.29 \[ -\frac {\cosh \left (\frac {x}{2}\right ) \sqrt {a \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \left (\ln \left (\frac {2 \sqrt {a \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {-a}-2 a}{\cosh \left (\frac {x}{2}\right )}\right ) a A -2 B \sqrt {a \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {-a}-\ln \left (\frac {2 \sqrt {a \left (\sinh ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {-a}-2 a}{\cosh \left (\frac {x}{2}\right )}\right ) a B \right ) \sqrt {2}}{a \sqrt {-a}\, \sinh \left (\frac {x}{2}\right ) \sqrt {a \left (\cosh ^{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]

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

________________________________________________________________________________________

maxima [B]  time = 0.62, size = 174, normalized size = 3.11 \[ 2 \, {\left (\sqrt {2} {\left (\frac {\arctan \left (e^{\left (\frac {1}{2} \, x\right )}\right )}{\sqrt {a}} + \frac {e^{\left (\frac {1}{2} \, x\right )}}{\sqrt {a} e^{x} + \sqrt {a}}\right )} - \frac {\sqrt {2} e^{\left (\frac {1}{2} \, x\right )}}{\sqrt {a} e^{x} + \sqrt {a}}\right )} A - \frac {1}{3} \, {\left (3 \, \sqrt {2} {\left (\frac {\arctan \left (e^{\left (\frac {1}{2} \, x\right )}\right )}{\sqrt {a}} - \frac {e^{\left (\frac {1}{2} \, x\right )}}{\sqrt {a} e^{x} + \sqrt {a}}\right )} - \sqrt {2} {\left (\frac {3 \, \arctan \left (e^{\left (-\frac {1}{2} \, x\right )}\right )}{\sqrt {a}} - \frac {2 \, e^{\left (-\frac {1}{2} \, x\right )}}{\sqrt {a}} - \frac {e^{\left (-\frac {1}{2} \, x\right )}}{\sqrt {a} e^{\left (-x\right )} + \sqrt {a}}\right )} - \frac {3 \, \sqrt {2} \sqrt {a} e^{\left (\frac {3}{2} \, x\right )} - \sqrt {2} \sqrt {a} e^{\left (-\frac {1}{2} \, x\right )}}{a e^{x} + a}\right )} B \]

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]

2*(sqrt(2)*(arctan(e^(1/2*x))/sqrt(a) + e^(1/2*x)/(sqrt(a)*e^x + sqrt(a))) - sqrt(2)*e^(1/2*x)/(sqrt(a)*e^x +
sqrt(a)))*A - 1/3*(3*sqrt(2)*(arctan(e^(1/2*x))/sqrt(a) - e^(1/2*x)/(sqrt(a)*e^x + sqrt(a))) - sqrt(2)*(3*arct
an(e^(-1/2*x))/sqrt(a) - 2*e^(-1/2*x)/sqrt(a) - e^(-1/2*x)/(sqrt(a)*e^(-x) + sqrt(a))) - (3*sqrt(2)*sqrt(a)*e^
(3/2*x) - sqrt(2)*sqrt(a)*e^(-1/2*x))/(a*e^x + a))*B

________________________________________________________________________________________

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)

________________________________________________________________________________________