Integrand size = 15, antiderivative size = 59 \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=\frac {2 (b+c) \text {arctanh}\left (\frac {\sqrt {a+b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b}}\right )}{\sqrt {a-b} \sqrt {a+b}}-\frac {\log (a-b \cosh (x))}{b} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4486, 2738, 214, 2747, 31} \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=\frac {2 (b+c) \text {arctanh}\left (\frac {\sqrt {a+b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b}}\right )}{\sqrt {a-b} \sqrt {a+b}}-\frac {\log (a-b \cosh (x))}{b} \]
[In]
[Out]
Rule 31
Rule 214
Rule 2738
Rule 2747
Rule 4486
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {-b-c}{-a+b \cosh (x)}+\frac {\sinh (x)}{a-b \cosh (x)}\right ) \, dx \\ & = (-b-c) \int \frac {1}{-a+b \cosh (x)} \, dx+\int \frac {\sinh (x)}{a-b \cosh (x)} \, dx \\ & = -\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,-b \cosh (x)\right )}{b}-(2 (b+c)) \text {Subst}\left (\int \frac {1}{-a+b-(-a-b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right ) \\ & = \frac {2 (b+c) \text {arctanh}\left (\frac {\sqrt {a+b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a-b}}\right )}{\sqrt {a-b} \sqrt {a+b}}-\frac {\log (a-b \cosh (x))}{b} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.95 \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=-\frac {2 (b+c) \arctan \left (\frac {(a+b) \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}-\frac {\log (a-b \cosh (x))}{b} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(108\) vs. \(2(49)=98\).
Time = 0.41 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.85
method | result | size |
default | \(\frac {\frac {2 \left (-a -b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )^{2} a +\tanh \left (\frac {x}{2}\right )^{2} b -a +b \right )}{2 a +2 b}-\frac {2 \left (-b^{2}-c b \right ) \operatorname {arctanh}\left (\frac {\left (a +b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}}{b}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b}\) | \(109\) |
risch | \(-\frac {x}{b}-\frac {2 x \,a^{2} b}{-a^{2} b^{2}+b^{4}}+\frac {2 x \,b^{3}}{-a^{2} b^{2}+b^{4}}-\frac {\ln \left ({\mathrm e}^{x}+\frac {-a \,b^{2}-c a b +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) a^{2}}{\left (a^{2}-b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{x}+\frac {-a \,b^{2}-c a b +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right )}{a^{2}-b^{2}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {-a \,b^{2}-c a b +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) \sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{\left (a^{2}-b^{2}\right ) b}-\frac {\ln \left ({\mathrm e}^{x}-\frac {a \,b^{2}+c a b +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) a^{2}}{\left (a^{2}-b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{x}-\frac {a \,b^{2}+c a b +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right )}{a^{2}-b^{2}}-\frac {\ln \left ({\mathrm e}^{x}-\frac {a \,b^{2}+c a b +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) \sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}-b^{6}-2 b^{5} c -b^{4} c^{2}}}{\left (a^{2}-b^{2}\right ) b}\) | \(675\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 114 vs. \(2 (49) = 98\).
Time = 0.28 (sec) , antiderivative size = 299, normalized size of antiderivative = 5.07 \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=\left [\frac {\sqrt {a^{2} - b^{2}} {\left (b^{2} + b c\right )} \log \left (\frac {b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} - 2 \, a b \cosh \left (x\right ) + 2 \, a^{2} - b^{2} + 2 \, {\left (b^{2} \cosh \left (x\right ) - a b\right )} \sinh \left (x\right ) + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) - a\right )}}{b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} - 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) - a\right )} \sinh \left (x\right ) + b}\right ) + {\left (a^{2} - b^{2}\right )} x - {\left (a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) - a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b - b^{3}}, \frac {2 \, \sqrt {-a^{2} + b^{2}} {\left (b^{2} + b c\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) - a\right )}}{a^{2} - b^{2}}\right ) + {\left (a^{2} - b^{2}\right )} x - {\left (a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) - a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b - b^{3}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 840 vs. \(2 (49) = 98\).
Time = 15.82 (sec) , antiderivative size = 840, normalized size of antiderivative = 14.24 \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=\text {Too large to display} \]
[In]
[Out]
Exception generated. \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.05 \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=-\frac {2 \, {\left (b + c\right )} \arctan \left (\frac {b e^{x} - a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}}} + \frac {x}{b} - \frac {\log \left (b e^{\left (2 \, x\right )} - 2 \, a e^{x} + b\right )}{b} \]
[In]
[Out]
Time = 2.49 (sec) , antiderivative size = 199, normalized size of antiderivative = 3.37 \[ \int \frac {b+c+\sinh (x)}{a-b \cosh (x)} \, dx=\frac {x}{b}-\frac {\ln \left (b\,\sqrt {\left (a+b\right )\,\left (a-b\right )}+a^2\,{\mathrm {e}}^x-b^2\,{\mathrm {e}}^x-a\,{\mathrm {e}}^x\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )\,\left (b^2\,\sqrt {\left (a+b\right )\,\left (a-b\right )}+a^2-b^2+b\,c\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )}{a^2\,b-b^3}+\frac {\ln \left (b\,\sqrt {\left (a+b\right )\,\left (a-b\right )}-a^2\,{\mathrm {e}}^x+b^2\,{\mathrm {e}}^x-a\,{\mathrm {e}}^x\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )\,\left (b^2\,\sqrt {\left (a+b\right )\,\left (a-b\right )}-a^2+b^2+b\,c\,\sqrt {\left (a+b\right )\,\left (a-b\right )}\right )}{a^2\,b-b^3} \]
[In]
[Out]