Optimal. Leaf size=38 \[ \frac{\tan ^{-1}\left (\frac{a \sinh (x)+b \cosh (x)}{\sqrt{a^2-b^2}}\right )}{\sqrt{a^2-b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0292113, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3074, 206} \[ \frac{\tan ^{-1}\left (\frac{a \sinh (x)+b \cosh (x)}{\sqrt{a^2-b^2}}\right )}{\sqrt{a^2-b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3074
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{a \cosh (x)+b \sinh (x)} \, dx &=i \operatorname{Subst}\left (\int \frac{1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )\\ &=\frac{\tan ^{-1}\left (\frac{b \cosh (x)+a \sinh (x)}{\sqrt{a^2-b^2}}\right )}{\sqrt{a^2-b^2}}\\ \end{align*}
Mathematica [A] time = 0.0436594, size = 46, normalized size = 1.21 \[ \frac{2 \tan ^{-1}\left (\frac{a \tanh \left (\frac{x}{2}\right )+b}{\sqrt{a-b} \sqrt{a+b}}\right )}{\sqrt{a-b} \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.036, size = 39, normalized size = 1. \begin{align*} 2\,{\frac{1}{\sqrt{{a}^{2}-{b}^{2}}}\arctan \left ( 1/2\,{\frac{2\,a\tanh \left ( x/2 \right ) +2\,b}{\sqrt{{a}^{2}-{b}^{2}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.38284, size = 423, normalized size = 11.13 \begin{align*} \left [-\frac{\sqrt{-a^{2} + b^{2}} \log \left (\frac{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt{-a^{2} + b^{2}}{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - a + b}{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )^{2} + a - b}\right )}{a^{2} - b^{2}}, -\frac{2 \, \arctan \left (\frac{\sqrt{a^{2} - b^{2}}}{{\left (a + b\right )} \cosh \left (x\right ) +{\left (a + b\right )} \sinh \left (x\right )}\right )}{\sqrt{a^{2} - b^{2}}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 6.54172, size = 119, normalized size = 3.13 \begin{align*} \begin{cases} \tilde{\infty } \log{\left (\tanh{\left (\frac{x}{2} \right )} \right )} & \text{for}\: a = 0 \wedge b = 0 \\\frac{\log{\left (\tanh{\left (\frac{x}{2} \right )} \right )}}{b} & \text{for}\: a = 0 \\- \frac{1}{- b \sinh{\left (x \right )} + b \cosh{\left (x \right )}} & \text{for}\: a = - b \\- \frac{1}{b \sinh{\left (x \right )} + b \cosh{\left (x \right )}} & \text{for}\: a = b \\- \frac{\sqrt{- a^{2} + b^{2}} \log{\left (\tanh{\left (\frac{x}{2} \right )} + \frac{b}{a} - \frac{\sqrt{- a^{2} + b^{2}}}{a} \right )}}{a^{2} - b^{2}} + \frac{\sqrt{- a^{2} + b^{2}} \log{\left (\tanh{\left (\frac{x}{2} \right )} + \frac{b}{a} + \frac{\sqrt{- a^{2} + b^{2}}}{a} \right )}}{a^{2} - b^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18965, size = 47, normalized size = 1.24 \begin{align*} \frac{2 \, \arctan \left (\frac{a e^{x} + b e^{x}}{\sqrt{a^{2} - b^{2}}}\right )}{\sqrt{a^{2} - b^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]