Integrand size = 14, antiderivative size = 57 \[ \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.11 (sec) , antiderivative size = 57, 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.357, 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.09 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.98 \[ \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. \(103\) vs. \(2(47)=94\).
Time = 0.37 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.82
method | result | size |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )^{2} a -\tanh \left (\frac {x}{2}\right )^{2} b -a -b \right )-\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}\) | \(104\) |
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}\) | \(674\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 111 vs. \(2 (47) = 94\).
Time = 0.26 (sec) , antiderivative size = 289, 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 = 16.66 (sec) , antiderivative size = 840, normalized size of antiderivative = 14.74 \[ \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 = 60, 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.51 (sec) , antiderivative size = 198, normalized size of antiderivative = 3.47 \[ \int \frac {b+c+\sinh (x)}{a+b \cosh (x)} \, dx=\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 {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} \]
[In]
[Out]