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]
________________________________________________________________________________________
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]
[Out]
Rule 206
Rule 2649
Rule 2751
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________