Optimal. Leaf size=80 \[ \frac {A \tan ^{-1}\left (\frac {b \sinh (x)+c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\sqrt {b^2-c^2}}-\frac {c C x}{b^2-c^2}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3137, 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 {c C x}{b^2-c^2}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rule 3137
Rubi steps
\begin {align*} \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx &=-\frac {c C x}{b^2-c^2}+\frac {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 {c C x}{b^2-c^2}+\frac {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 {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 \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 78, normalized size = 0.98 \[ \frac {2 A \tan ^{-1}\left (\frac {b \tanh \left (\frac {x}{2}\right )+c}{\sqrt {b-c} \sqrt {b+c}}\right )}{\sqrt {b-c} \sqrt {b+c}}+\frac {C (b \log (b \cosh (x)+c \sinh (x))-c x)}{b^2-c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 233, normalized size = 2.91 \[ \left [\frac {C b \log \left (\frac {2 \, {\left (b \cosh \relax (x) + c \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - \sqrt {-b^{2} + c^{2}} A \log \left (\frac {{\left (b + c\right )} \cosh \relax (x)^{2} + 2 \, {\left (b + c\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b + c\right )} \sinh \relax (x)^{2} - 2 \, \sqrt {-b^{2} + c^{2}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )} - b + c}{{\left (b + c\right )} \cosh \relax (x)^{2} + 2 \, {\left (b + c\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b + c\right )} \sinh \relax (x)^{2} + b - c}\right ) - {\left (C b + C c\right )} x}{b^{2} - c^{2}}, \frac {C b \log \left (\frac {2 \, {\left (b \cosh \relax (x) + c \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - 2 \, \sqrt {b^{2} - c^{2}} A \arctan \left (\frac {\sqrt {b^{2} - c^{2}}}{{\left (b + c\right )} \cosh \relax (x) + {\left (b + c\right )} \sinh \relax (x)}\right ) - {\left (C b + C c\right )} x}{b^{2} - c^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 80, normalized size = 1.00 \[ \frac {C b \log \left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}{b^{2} - c^{2}} + \frac {2 \, A \arctan \left (\frac {b e^{x} + c e^{x}}{\sqrt {b^{2} - c^{2}}}\right )}{\sqrt {b^{2} - c^{2}}} - \frac {C x}{b - c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.21, size = 181, normalized size = 2.26 \[ -\frac {2 C \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b +2 c}-\frac {2 C \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 b -2 c}+\frac {b C \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +2 c \tanh \left (\frac {x}{2}\right )+b \right )}{\left (b -c \right ) \left (b +c \right )}+\frac {2 \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 c}{2 \sqrt {b^{2}-c^{2}}}\right ) A \,b^{2}}{\left (b -c \right ) \left (b +c \right ) \sqrt {b^{2}-c^{2}}}-\frac {2 \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 c}{2 \sqrt {b^{2}-c^{2}}}\right ) A \,c^{2}}{\left (b -c \right ) \left (b +c \right ) \sqrt {b^{2}-c^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.78, size = 178, normalized size = 2.22 \[ \frac {2\,\mathrm {atan}\left (\frac {A\,{\mathrm {e}}^x\,\sqrt {b^2-c^2}}{b\,\sqrt {A^2}-c\,\sqrt {A^2}}\right )\,\sqrt {A^2}}{\sqrt {b^2-c^2}}-\frac {C\,x}{b-c}+\frac {C\,b^3\,\ln \left (4\,A^2\,b-4\,A^2\,c+4\,A^2\,b\,{\mathrm {e}}^{2\,x}+4\,A^2\,c\,{\mathrm {e}}^{2\,x}\right )}{b^4-2\,b^2\,c^2+c^4}-\frac {C\,b\,c^2\,\ln \left (4\,A^2\,b-4\,A^2\,c+4\,A^2\,b\,{\mathrm {e}}^{2\,x}+4\,A^2\,c\,{\mathrm {e}}^{2\,x}\right )}{b^4-2\,b^2\,c^2+c^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 53.14, size = 367, normalized size = 4.59 \[ \begin {cases} \tilde {\infty } \left (A \log {\left (\tanh {\left (\frac {x}{2} \right )} \right )} + C x\right ) & \text {for}\: b = 0 \wedge c = 0 \\- \frac {2 A}{- 2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} - \frac {C x \sinh {\relax (x )}}{- 2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} + \frac {C x \cosh {\relax (x )}}{- 2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} - \frac {C \cosh {\relax (x )}}{- 2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} & \text {for}\: b = - c \\- \frac {2 A}{2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} + \frac {C x \sinh {\relax (x )}}{2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} + \frac {C x \cosh {\relax (x )}}{2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} + \frac {C \cosh {\relax (x )}}{2 c \sinh {\relax (x )} + 2 c \cosh {\relax (x )}} & \text {for}\: b = c \\\frac {A \log {\left (\tanh {\left (\frac {x}{2} \right )} \right )} + C x}{c} & \text {for}\: b = 0 \\- \frac {A \sqrt {- b^{2} + c^{2}} \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} - \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} + \frac {A \sqrt {- b^{2} + c^{2}} \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} + \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} + \frac {C b x}{b^{2} - c^{2}} - \frac {2 C b \log {\left (\tanh {\left (\frac {x}{2} \right )} + 1 \right )}}{b^{2} - c^{2}} + \frac {C b \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} - \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} + \frac {C b \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} + \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} - \frac {C c x}{b^{2} - c^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________