Optimal. Leaf size=92 \[ \frac{A \tan ^{-1}\left (\frac{b \sinh (x)+c \cosh (x)}{\sqrt{b^2-c^2}}\right )}{\sqrt{b^2-c^2}}+\frac{x (b B-c C)}{b^2-c^2}-\frac{(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0696699, antiderivative size = 92, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {3136, 3074, 206} \[ \frac{A \tan ^{-1}\left (\frac{b \sinh (x)+c \cosh (x)}{\sqrt{b^2-c^2}}\right )}{\sqrt{b^2-c^2}}+\frac{x (b B-c C)}{b^2-c^2}-\frac{(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3136
Rule 3074
Rule 206
Rubi steps
\begin{align*} \int \frac{A+B \cosh (x)+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx &=\frac{(b B-c C) x}{b^2-c^2}-\frac{(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}+A \int \frac{1}{b \cosh (x)+c \sinh (x)} \, dx\\ &=\frac{(b B-c C) x}{b^2-c^2}-\frac{(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}+(i A) \operatorname{Subst}\left (\int \frac{1}{b^2-c^2-x^2} \, dx,x,-i c \cosh (x)-i b \sinh (x)\right )\\ &=\frac{(b B-c C) x}{b^2-c^2}+\frac{A \tan ^{-1}\left (\frac{c \cosh (x)+b \sinh (x)}{\sqrt{b^2-c^2}}\right )}{\sqrt{b^2-c^2}}-\frac{(B c-b C) \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\\ \end{align*}
Mathematica [A] time = 0.255864, size = 90, normalized size = 0.98 \[ \frac{2 A \sqrt{b-c} \sqrt{b+c} \tan ^{-1}\left (\frac{b \tanh \left (\frac{x}{2}\right )+c}{\sqrt{b-c} \sqrt{b+c}}\right )+x (b B-c C)+(b C-B c) \log (b \cosh (x)+c \sinh (x))}{(b-c) (b+c)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.058, size = 253, normalized size = 2.8 \begin{align*} 2\,{\frac{B\ln \left ( \tanh \left ( x/2 \right ) +1 \right ) }{2\,b-2\,c}}-2\,{\frac{C\ln \left ( \tanh \left ( x/2 \right ) +1 \right ) }{2\,b-2\,c}}-{\frac{Bc}{ \left ( b-c \right ) \left ( b+c \right ) }\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b+2\,c\tanh \left ( x/2 \right ) +b \right ) }+{\frac{bC}{ \left ( b-c \right ) \left ( b+c \right ) }\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b+2\,c\tanh \left ( x/2 \right ) +b \right ) }+2\,{\frac{A{b}^{2}}{ \left ( b-c \right ) \left ( b+c \right ) \sqrt{{b}^{2}-{c}^{2}}}\arctan \left ( 1/2\,{\frac{2\,\tanh \left ( x/2 \right ) b+2\,c}{\sqrt{{b}^{2}-{c}^{2}}}} \right ) }-2\,{\frac{A{c}^{2}}{ \left ( b-c \right ) \left ( b+c \right ) \sqrt{{b}^{2}-{c}^{2}}}\arctan \left ( 1/2\,{\frac{2\,\tanh \left ( x/2 \right ) b+2\,c}{\sqrt{{b}^{2}-{c}^{2}}}} \right ) }-2\,{\frac{B\ln \left ( \tanh \left ( x/2 \right ) -1 \right ) }{2\,b+2\,c}}-2\,{\frac{C\ln \left ( \tanh \left ( x/2 \right ) -1 \right ) }{2\,b+2\,c}} \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.22185, size = 701, normalized size = 7.62 \begin{align*} \left [-\frac{\sqrt{-b^{2} + c^{2}} A \log \left (\frac{{\left (b + c\right )} \cosh \left (x\right )^{2} + 2 \,{\left (b + c\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (b + c\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt{-b^{2} + c^{2}}{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - b + c}{{\left (b + c\right )} \cosh \left (x\right )^{2} + 2 \,{\left (b + c\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (b + c\right )} \sinh \left (x\right )^{2} + b - c}\right ) -{\left ({\left (B - C\right )} b +{\left (B - C\right )} c\right )} x -{\left (C b - B c\right )} \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + c \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{b^{2} - c^{2}}, -\frac{2 \, \sqrt{b^{2} - c^{2}} A \arctan \left (\frac{\sqrt{b^{2} - c^{2}}}{{\left (b + c\right )} \cosh \left (x\right ) +{\left (b + c\right )} \sinh \left (x\right )}\right ) -{\left ({\left (B - C\right )} b +{\left (B - C\right )} c\right )} x -{\left (C b - B c\right )} \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + c \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{b^{2} - c^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 80.0006, size = 643, normalized size = 6.99 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13483, size = 120, normalized size = 1.3 \begin{align*} \frac{2 \, A \arctan \left (\frac{b e^{x} + c e^{x}}{\sqrt{b^{2} - c^{2}}}\right )}{\sqrt{b^{2} - c^{2}}} + \frac{{\left (B - C\right )} x}{b - c} + \frac{{\left (C b - B c\right )} \log \left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}{b^{2} - c^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]