Optimal. Leaf size=39 \[ \frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (x)+b \sinh (x))}{a^2-b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 39, normalized size of antiderivative = 1.00, 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 = {3098, 3133} \[ \frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (x)+b \sinh (x))}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3098
Rule 3133
Rubi steps
\begin {align*} \int \frac {\cosh (x)}{a \cosh (x)+b \sinh (x)} \, dx &=\frac {a x}{a^2-b^2}-\frac {(i b) \int \frac {-i b \cosh (x)-i a \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=\frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 29, normalized size = 0.74 \[ \frac {a x-b \log (a \cosh (x)+b \sinh (x))}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 42, normalized size = 1.08 \[ \frac {{\left (a + b\right )} x - b \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} - b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 43, normalized size = 1.10 \[ -\frac {b \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 71, normalized size = 1.82 \[ -\frac {2 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b +2 a}-\frac {b \ln \left (a +2 \tanh \left (\frac {x}{2}\right ) b +a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )\right )}{\left (a -b \right ) \left (a +b \right )}+\frac {2 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 a -2 b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 41, normalized size = 1.05 \[ -\frac {b \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{2} - b^{2}} + \frac {x}{a + b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.52, size = 29, normalized size = 0.74 \[ \frac {a\,x-b\,\ln \left (a\,\mathrm {cosh}\relax (x)+b\,\mathrm {sinh}\relax (x)\right )}{a^2-b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.58, size = 150, normalized size = 3.85 \[ \begin {cases} \tilde {\infty } \log {\left (\sinh {\relax (x )} \right )} & \text {for}\: a = 0 \wedge b = 0 \\\frac {\log {\left (\sinh {\relax (x )} \right )}}{b} & \text {for}\: a = 0 \\\frac {x \sinh {\relax (x )}}{- 2 b \sinh {\relax (x )} + 2 b \cosh {\relax (x )}} - \frac {x \cosh {\relax (x )}}{- 2 b \sinh {\relax (x )} + 2 b \cosh {\relax (x )}} - \frac {\cosh {\relax (x )}}{- 2 b \sinh {\relax (x )} + 2 b \cosh {\relax (x )}} & \text {for}\: a = - b \\\frac {x \sinh {\relax (x )}}{2 b \sinh {\relax (x )} + 2 b \cosh {\relax (x )}} + \frac {x \cosh {\relax (x )}}{2 b \sinh {\relax (x )} + 2 b \cosh {\relax (x )}} - \frac {\cosh {\relax (x )}}{2 b \sinh {\relax (x )} + 2 b \cosh {\relax (x )}} & \text {for}\: a = b \\\frac {a x}{a^{2} - b^{2}} - \frac {b \log {\left (\cosh {\relax (x )} + \frac {b \sinh {\relax (x )}}{a} \right )}}{a^{2} - b^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________