Optimal. Leaf size=78 \[ \frac {b B \text {ArcTan}\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+A c \cosh (x)+A b \sinh (x)}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 78, 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 = {3234, 3153,
212} \begin {gather*} \frac {A b \sinh (x)+A c \cosh (x)+B c}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {b B \text {ArcTan}\left (\frac {b \sinh (x)+c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3153
Rule 3234
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx &=\frac {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) \int \frac {1}{b \cosh (x)+c \sinh (x)} \, dx}{b^2-c^2}\\ &=\frac {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) \text {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 \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+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.20, size = 151, normalized size = 1.94 \begin {gather*} \frac {b B \sqrt {b-c} c (b+c)+2 b^3 B \sqrt {b+c} \text {ArcTan}\left (\frac {c+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-c} \sqrt {b+c}}\right ) \cosh (x)+\left (A (b-c)^{3/2} (b+c)^2+2 b^2 B c \sqrt {b+c} \text {ArcTan}\left (\frac {c+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-c} \sqrt {b+c}}\right )\right ) \sinh (x)}{b (b-c)^{3/2} (b+c)^2 (b \cosh (x)+c \sinh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.40, size = 116, normalized size = 1.49
method | result | size |
default | \(-\frac {2 \left (-\frac {\left (A \,b^{2}-A \,c^{2}+B \,c^{2}\right ) \tanh \left (\frac {x}{2}\right )}{b \left (b^{2}-c^{2}\right )}-\frac {B c}{b^{2}-c^{2}}\right )}{b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 c \tanh \left (\frac {x}{2}\right )+b}+\frac {2 b B \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (b^{2}-c^{2}\right )^{\frac {3}{2}}}\) | \(116\) |
risch | \(-\frac {2 \left (-B c \,{\mathrm e}^{x}+A b -A c \right )}{\left (b -c \right ) \left (b +c \right ) \left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +b -c \right )}-\frac {b B \ln \left ({\mathrm e}^{x}-\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{\sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}+\frac {b B \ln \left ({\mathrm e}^{x}+\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{\sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}\) | \(145\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 311 vs.
\(2 (74) = 148\).
time = 0.39, size = 680, normalized size = 8.72 \begin {gather*} \left [-\frac {2 \, A b^{3} - 2 \, A b^{2} c - 2 \, A b c^{2} + 2 \, A c^{3} - {\left (B b^{2} - B b c + {\left (B b^{2} + B b c\right )} \cosh \left (x\right )^{2} + 2 \, {\left (B b^{2} + B b c\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (B b^{2} + B b c\right )} \sinh \left (x\right )^{2}\right )} \sqrt {-b^{2} + c^{2}} \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 ) - 2 \, {\left (B b^{2} c - B c^{3}\right )} \cosh \left (x\right ) - 2 \, {\left (B b^{2} c - B c^{3}\right )} \sinh \left (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 \left (x\right )^{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 \left (x\right ) \sinh \left (x\right ) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \left (x\right )^{2}}, -\frac {2 \, {\left (A b^{3} - A b^{2} c - A b c^{2} + A c^{3} + {\left (B b^{2} - B b c + {\left (B b^{2} + B b c\right )} \cosh \left (x\right )^{2} + 2 \, {\left (B b^{2} + B b c\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (B b^{2} + B b c\right )} \sinh \left (x\right )^{2}\right )} \sqrt {b^{2} - c^{2}} \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 (B b^{2} c - B c^{3}\right )} \cosh \left (x\right ) - {\left (B b^{2} c - B c^{3}\right )} \sinh \left (x\right )\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 \left (x\right )^{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 \left (x\right ) \sinh \left (x\right ) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \left (x\right )^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 83, normalized size = 1.06 \begin {gather*} \frac {2 \, B b \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 (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 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.79, size = 168, normalized size = 2.15 \begin {gather*} \frac {B\,b\,\ln \left (\frac {2\,B\,b}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}+\frac {2\,B\,b\,{\mathrm {e}}^x}{-b^3-b^2\,c+b\,c^2+c^3}\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {B\,b\,\ln \left (\frac {2\,B\,b\,{\mathrm {e}}^x}{-b^3-b^2\,c+b\,c^2+c^3}-\frac {2\,B\,b}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {\frac {2\,A}{b+c}-\frac {2\,B\,c\,{\mathrm {e}}^x}{\left (b+c\right )\,\left (b-c\right )}}{b-c+{\mathrm {e}}^{2\,x}\,\left (b+c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________