Optimal. Leaf size=86 \[ -\frac{\left (a^2 (-(B+C))+2 a A b-b^2 (B-C)\right ) \log (a+b \sinh (x)+b \cosh (x))}{2 a^2 b}+\frac{x (2 a A-b (B-C))}{2 a^2}-\frac{(B-C) (\cosh (x)-\sinh (x))}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0830199, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.043, Rules used = {3130} \[ -\frac{\left (a^2 (-(B+C))+2 a A b-b^2 (B-C)\right ) \log (a+b \sinh (x)+b \cosh (x))}{2 a^2 b}+\frac{x (2 a A-b (B-C))}{2 a^2}-\frac{(B-C) (\cosh (x)-\sinh (x))}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3130
Rubi steps
\begin{align*} \int \frac{A+B \cosh (x)+C \sinh (x)}{a+b \cosh (x)+b \sinh (x)} \, dx &=\frac{(2 a A-b (B-C)) x}{2 a^2}-\frac{\left (2 a A b-b^2 (B-C)-a^2 (B+C)\right ) \log (a+b \cosh (x)+b \sinh (x))}{2 a^2 b}-\frac{(B-C) (\cosh (x)-\sinh (x))}{2 a}\\ \end{align*}
Mathematica [A] time = 0.283727, size = 103, normalized size = 1.2 \[ \frac{\frac{2 \left (a^2 (B+C)-2 a A b+b^2 (B-C)\right ) \log \left ((b-a) \sinh \left (\frac{x}{2}\right )+(a+b) \cosh \left (\frac{x}{2}\right )\right )}{b}+x \left (\frac{a^2 (B+C)}{b}+2 a A+b (C-B)\right )+2 a (B-C) \sinh (x)-2 a (B-C) \cosh (x)}{4 a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.055, size = 232, normalized size = 2.7 \begin{align*} -{\frac{B}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}+{\frac{C}{a} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}+{\frac{A}{a}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{Bb}{2\,{a}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{bC}{2\,{a}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{B}{2\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) }-{\frac{C}{2\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) }-{\frac{A}{a}\ln \left ( a\tanh \left ({\frac{x}{2}} \right ) -\tanh \left ({\frac{x}{2}} \right ) b-a-b \right ) }+{\frac{B}{2\,b}\ln \left ( a\tanh \left ({\frac{x}{2}} \right ) -\tanh \left ({\frac{x}{2}} \right ) b-a-b \right ) }+{\frac{Bb}{2\,{a}^{2}}\ln \left ( a\tanh \left ({\frac{x}{2}} \right ) -\tanh \left ({\frac{x}{2}} \right ) b-a-b \right ) }+{\frac{C}{2\,b}\ln \left ( a\tanh \left ({\frac{x}{2}} \right ) -\tanh \left ({\frac{x}{2}} \right ) b-a-b \right ) }-{\frac{bC}{2\,{a}^{2}}\ln \left ( a\tanh \left ({\frac{x}{2}} \right ) -\tanh \left ({\frac{x}{2}} \right ) b-a-b \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.26165, size = 134, normalized size = 1.56 \begin{align*} \frac{1}{2} \, C{\left (\frac{x}{b} + \frac{e^{\left (-x\right )}}{a} + \frac{{\left (a^{2} - b^{2}\right )} \log \left (a e^{\left (-x\right )} + b\right )}{a^{2} b}\right )} + \frac{1}{2} \, B{\left (\frac{x}{b} - \frac{e^{\left (-x\right )}}{a} + \frac{{\left (a^{2} + b^{2}\right )} \log \left (a e^{\left (-x\right )} + b\right )}{a^{2} b}\right )} - \frac{A \log \left (a e^{\left (-x\right )} + b\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.46166, size = 342, normalized size = 3.98 \begin{align*} -\frac{{\left (B - C\right )} a b -{\left (2 \, A a b -{\left (B - C\right )} b^{2}\right )} x \cosh \left (x\right ) -{\left (2 \, A a b -{\left (B - C\right )} b^{2}\right )} x \sinh \left (x\right ) -{\left ({\left ({\left (B + C\right )} a^{2} - 2 \, A a b +{\left (B - C\right )} b^{2}\right )} \cosh \left (x\right ) +{\left ({\left (B + C\right )} a^{2} - 2 \, A a b +{\left (B - C\right )} b^{2}\right )} \sinh \left (x\right )\right )} \log \left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}{2 \,{\left (a^{2} b \cosh \left (x\right ) + a^{2} b \sinh \left (x\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11438, size = 107, normalized size = 1.24 \begin{align*} \frac{{\left (2 \, A a - B b + C b\right )} x}{2 \, a^{2}} - \frac{{\left (B a - C a\right )} e^{\left (-x\right )}}{2 \, a^{2}} + \frac{{\left (B a^{2} + C a^{2} - 2 \, A a b + B b^{2} - C b^{2}\right )} \log \left ({\left | b e^{x} + a \right |}\right )}{2 \, a^{2} b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]