Optimal. Leaf size=39 \[ \frac{a \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac{b x}{a^2-b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0667874, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3097, 3133} \[ \frac{a \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac{b x}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3097
Rule 3133
Rubi steps
\begin{align*} \int \frac{\sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx &=-\frac{b x}{a^2-b^2}+\frac{(i a) \int \frac{-i b \cosh (x)-i a \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=-\frac{b x}{a^2-b^2}+\frac{a \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}\\ \end{align*}
Mathematica [A] time = 0.0609465, size = 29, normalized size = 0.74 \[ \frac{a \log (a \cosh (x)+b \sinh (x))-b x}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 70, normalized size = 1.8 \begin{align*} -4\,{\frac{\ln \left ( \tanh \left ( x/2 \right ) +1 \right ) }{4\,a-4\,b}}+{\frac{a}{ \left ( a+b \right ) \left ( a-b \right ) }\ln \left ( a+2\,\tanh \left ( x/2 \right ) b+a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) }-4\,{\frac{\ln \left ( \tanh \left ( x/2 \right ) -1 \right ) }{4\,a+4\,b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.18268, size = 54, normalized size = 1.38 \begin{align*} \frac{a \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{2} - b^{2}} + \frac{x}{a + b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.77595, size = 109, normalized size = 2.79 \begin{align*} -\frac{{\left (a + b\right )} x - a \log \left (\frac{2 \,{\left (a \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} - b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.723252, size = 146, normalized size = 3.74 \begin{align*} \begin{cases} \tilde{\infty } x & \text{for}\: a = 0 \wedge b = 0 \\\frac{\log{\left (\cosh{\left (x \right )} \right )}}{a} & \text{for}\: b = 0 \\- \frac{x \sinh{\left (x \right )}}{- 2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} + \frac{x \cosh{\left (x \right )}}{- 2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} - \frac{\cosh{\left (x \right )}}{- 2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} & \text{for}\: a = - b \\\frac{x \sinh{\left (x \right )}}{2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} + \frac{x \cosh{\left (x \right )}}{2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} + \frac{\cosh{\left (x \right )}}{2 b \sinh{\left (x \right )} + 2 b \cosh{\left (x \right )}} & \text{for}\: a = b \\\frac{a \log{\left (\frac{a \cosh{\left (x \right )}}{b} + \sinh{\left (x \right )} \right )}}{a^{2} - b^{2}} - \frac{b x}{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.14103, size = 58, normalized size = 1.49 \begin{align*} \frac{a \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{2} - b^{2}} - \frac{x}{a - b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]