Optimal. Leaf size=88 \[ \frac {A b \sinh (x)+A c \cosh (x)-b C+B c}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {(b B-c C) \tan ^{-1}\left (\frac {b \sinh (x)+c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 88, normalized size of antiderivative = 1.00, 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 = {3153, 3074, 206} \[ \frac {A b \sinh (x)+A c \cosh (x)-b C+B c}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {(b B-c C) \tan ^{-1}\left (\frac {b \sinh (x)+c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rule 3153
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx &=\frac {B c-b C+A c \cosh (x)+A b \sinh (x)}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {(b B-c C) \int \frac {1}{b \cosh (x)+c \sinh (x)} \, dx}{b^2-c^2}\\ &=\frac {B c-b C+A c \cosh (x)+A b \sinh (x)}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {(i (b B-c C)) \operatorname {Subst}\left (\int \frac {1}{b^2-c^2-x^2} \, dx,x,-i c \cosh (x)-i b \sinh (x)\right )}{b^2-c^2}\\ &=\frac {(b B-c C) \tan ^{-1}\left (\frac {c \cosh (x)+b \sinh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}}+\frac {B c-b C+A c \cosh (x)+A b \sinh (x)}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 106, normalized size = 1.20 \[ \frac {A \left (b^2-c^2\right ) \sinh (x)+b (B c-b C)}{b (b-c) (b+c) (b \cosh (x)+c \sinh (x))}+\frac {2 (b B-c C) \tan ^{-1}\left (\frac {b \tanh \left (\frac {x}{2}\right )+c}{\sqrt {b-c} \sqrt {b+c}}\right )}{(b-c)^{3/2} (b+c)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.53, size = 799, normalized size = 9.08 \[ \left [-\frac {2 \, A b^{3} - 2 \, A b^{2} c - 2 \, A b c^{2} + 2 \, A c^{3} + {\left (B b^{2} - {\left (B + C\right )} b c + C c^{2} + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \relax (x)^{2} + 2 \, {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \sinh \relax (x)^{2}\right )} \sqrt {-b^{2} + c^{2}} \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 ) + 2 \, {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \cosh \relax (x) + 2 \, {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \sinh \relax (x)}{b^{5} - b^{4} c - 2 \, b^{3} c^{2} + 2 \, b^{2} c^{3} + b c^{4} - c^{5} + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x)^{2} + 2 \, {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \relax (x)^{2}}, -\frac {2 \, {\left (A b^{3} - A b^{2} c - A b c^{2} + A c^{3} + {\left (B b^{2} - {\left (B + C\right )} b c + C c^{2} + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \relax (x)^{2} + 2 \, {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \sinh \relax (x)^{2}\right )} \sqrt {b^{2} - c^{2}} \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^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \cosh \relax (x) + {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \sinh \relax (x)\right )}}{b^{5} - b^{4} c - 2 \, b^{3} c^{2} + 2 \, b^{2} c^{3} + b c^{4} - c^{5} + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x)^{2} + 2 \, {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \relax (x)^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 95, normalized size = 1.08 \[ \frac {2 \, {\left (B b - C c\right )} \arctan \left (\frac {b e^{x} + c e^{x}}{\sqrt {b^{2} - c^{2}}}\right )}{{\left (b^{2} - c^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (C b e^{x} - B c e^{x} + A b - A c\right )}}{{\left (b^{2} - c^{2}\right )} {\left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.27, size = 167, normalized size = 1.90 \[ -\frac {2 \left (-\frac {\left (A \,b^{2}-A \,c^{2}+B \,c^{2}-C c b \right ) \tanh \left (\frac {x}{2}\right )}{b \left (b^{2}-c^{2}\right )}-\frac {B c -b C}{b^{2}-c^{2}}\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +2 c \tanh \left (\frac {x}{2}\right )+b}+\frac {2 b B \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (b^{2}-c^{2}\right )^{\frac {3}{2}}}-\frac {2 C c \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (b^{2}-c^{2}\right )^{\frac {3}{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 = 1.75, size = 210, normalized size = 2.39 \[ \frac {\ln \left (\frac {2\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}+\frac {2\,{\mathrm {e}}^x\,\left (B\,b-C\,c\right )}{-b^3-b^2\,c+b\,c^2+c^3}\right )\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {\ln \left (\frac {2\,{\mathrm {e}}^x\,\left (B\,b-C\,c\right )}{-b^3-b^2\,c+b\,c^2+c^3}-\frac {2\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}\right )\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {\frac {2\,A}{b+c}-\frac {2\,{\mathrm {e}}^x\,\left (B\,c-C\,b\right )}{\left (b+c\right )\,\left (b-c\right )}}{b-c+{\mathrm {e}}^{2\,x}\,\left (b+c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________