Optimal. Leaf size=86 \[ \frac{2 (A b-a B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a+b}}\right )}{b e \sqrt{a-b} \sqrt{a+b}}+\frac{C \log (a+b \cosh (d+e x))}{b e}+\frac{B x}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.153965, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {4377, 2735, 2659, 205, 2668, 31} \[ \frac{2 (A b-a B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a+b}}\right )}{b e \sqrt{a-b} \sqrt{a+b}}+\frac{C \log (a+b \cosh (d+e x))}{b e}+\frac{B x}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4377
Rule 2735
Rule 2659
Rule 205
Rule 2668
Rule 31
Rubi steps
\begin{align*} \int \frac{A+B \cosh (d+e x)+C \sinh (d+e x)}{a+b \cosh (d+e x)} \, dx &=C \int \frac{\sinh (d+e x)}{a+b \cosh (d+e x)} \, dx+\int \frac{A+B \cosh (d+e x)}{a+b \cosh (d+e x)} \, dx\\ &=\frac{B x}{b}-\frac{(-A b+a B) \int \frac{1}{a+b \cosh (d+e x)} \, dx}{b}+\frac{C \operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,b \cosh (d+e x)\right )}{b e}\\ &=\frac{B x}{b}+\frac{C \log (a+b \cosh (d+e x))}{b e}-\frac{(2 i (A b-a B)) \operatorname{Subst}\left (\int \frac{1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac{1}{2} (i d+i e x)\right )\right )}{b e}\\ &=\frac{B x}{b}+\frac{2 (A b-a B) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{a+b}}\right )}{\sqrt{a-b} b \sqrt{a+b} e}+\frac{C \log (a+b \cosh (d+e x))}{b e}\\ \end{align*}
Mathematica [A] time = 0.234088, size = 81, normalized size = 0.94 \[ \frac{\frac{2 (a B-A b) \tan ^{-1}\left (\frac{(a-b) \tanh \left (\frac{1}{2} (d+e x)\right )}{\sqrt{b^2-a^2}}\right )}{\sqrt{b^2-a^2}}+C \log (a+b \cosh (d+e x))+B (d+e x)}{b e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.036, size = 276, normalized size = 3.2 \begin{align*}{\frac{aC}{eb \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}b-a-b \right ) }-{\frac{C}{e \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) \right ) ^{2}b-a-b \right ) }+2\,{\frac{A}{e\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}{\it Artanh} \left ({\frac{ \left ( a-b \right ) \tanh \left ( 1/2\,ex+d/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}} \right ) }-2\,{\frac{aB}{eb\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}{\it Artanh} \left ({\frac{ \left ( a-b \right ) \tanh \left ( 1/2\,ex+d/2 \right ) }{\sqrt{ \left ( a+b \right ) \left ( a-b \right ) }}} \right ) }+{\frac{B}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) +1 \right ) }-{\frac{C}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) +1 \right ) }-{\frac{B}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) -1 \right ) }-{\frac{C}{eb}\ln \left ( \tanh \left ({\frac{ex}{2}}+{\frac{d}{2}} \right ) -1 \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.0403, size = 948, normalized size = 11.02 \begin{align*} \left [\frac{{\left ({\left (B - C\right )} a^{2} -{\left (B - C\right )} b^{2}\right )} e x -{\left (B a - A b\right )} \sqrt{a^{2} - b^{2}} \log \left (\frac{b^{2} \cosh \left (e x + d\right )^{2} + b^{2} \sinh \left (e x + d\right )^{2} + 2 \, a b \cosh \left (e x + d\right ) + 2 \, a^{2} - b^{2} + 2 \,{\left (b^{2} \cosh \left (e x + d\right ) + a b\right )} \sinh \left (e x + d\right ) - 2 \, \sqrt{a^{2} - b^{2}}{\left (b \cosh \left (e x + d\right ) + b \sinh \left (e x + d\right ) + a\right )}}{b \cosh \left (e x + d\right )^{2} + b \sinh \left (e x + d\right )^{2} + 2 \, a \cosh \left (e x + d\right ) + 2 \,{\left (b \cosh \left (e x + d\right ) + a\right )} \sinh \left (e x + d\right ) + b}\right ) +{\left (C a^{2} - C b^{2}\right )} \log \left (\frac{2 \,{\left (b \cosh \left (e x + d\right ) + a\right )}}{\cosh \left (e x + d\right ) - \sinh \left (e x + d\right )}\right )}{{\left (a^{2} b - b^{3}\right )} e}, \frac{{\left ({\left (B - C\right )} a^{2} -{\left (B - C\right )} b^{2}\right )} e x + 2 \,{\left (B a - A b\right )} \sqrt{-a^{2} + b^{2}} \arctan \left (-\frac{\sqrt{-a^{2} + b^{2}}{\left (b \cosh \left (e x + d\right ) + b \sinh \left (e x + d\right ) + a\right )}}{a^{2} - b^{2}}\right ) +{\left (C a^{2} - C b^{2}\right )} \log \left (\frac{2 \,{\left (b \cosh \left (e x + d\right ) + a\right )}}{\cosh \left (e x + d\right ) - \sinh \left (e x + d\right )}\right )}{{\left (a^{2} b - b^{3}\right )} e}\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.22631, size = 135, normalized size = 1.57 \begin{align*} \frac{{\left (x e + d\right )}{\left (B - C\right )} e^{\left (-1\right )}}{b} + \frac{C e^{\left (-1\right )} \log \left (b e^{\left (2 \, x e + 2 \, d\right )} + 2 \, a e^{\left (x e + d\right )} + b\right )}{b} - \frac{2 \,{\left (B a - A b\right )} \arctan \left (\frac{b e^{\left (x e + d\right )} + a}{\sqrt{-a^{2} + b^{2}}}\right ) e^{\left (-1\right )}}{\sqrt{-a^{2} + b^{2}} b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]