Integrand size = 15, antiderivative size = 53 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=\frac {2 (b+c) \text {arctanh}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}-\frac {\log (a-b \sinh (x))}{b} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4486, 2739, 632, 212, 2747, 31} \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=\frac {2 (b+c) \text {arctanh}\left (\frac {a \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}-\frac {\log (a-b \sinh (x))}{b} \]
[In]
[Out]
Rule 31
Rule 212
Rule 632
Rule 2739
Rule 2747
Rule 4486
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\left (1+\frac {b}{c}\right ) c}{a-b \sinh (x)}+\frac {\cosh (x)}{a-b \sinh (x)}\right ) \, dx \\ & = (b+c) \int \frac {1}{a-b \sinh (x)} \, dx+\int \frac {\cosh (x)}{a-b \sinh (x)} \, dx \\ & = -\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,-b \sinh (x)\right )}{b}+(2 (b+c)) \text {Subst}\left (\int \frac {1}{a-2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right ) \\ & = -\frac {\log (a-b \sinh (x))}{b}-(4 (b+c)) \text {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 b-2 a \tanh \left (\frac {x}{2}\right )\right ) \\ & = \frac {2 (b+c) \text {arctanh}\left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}-\frac {\log (a-b \sinh (x))}{b} \\ \end{align*}
Time = 0.23 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.17 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=-\frac {2 (b+c) \arctan \left (\frac {b+a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}-\frac {\log (-a+b \sinh (x))}{b} \]
[In]
[Out]
Time = 0.71 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98
method | result | size |
parts | \(-\frac {\ln \left (a -b \sinh \left (x \right )\right )}{b}+\frac {2 \left (b +c \right ) \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}\) | \(52\) |
default | \(\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}+\frac {-\ln \left (\tanh \left (\frac {x}{2}\right )^{2} a +2 b \tanh \left (\frac {x}{2}\right )-a \right )-\frac {2 \left (-b^{2}-c b \right ) \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}}{b}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b}\) | \(96\) |
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}\) | \(639\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 174 vs. \(2 (47) = 94\).
Time = 0.26 (sec) , antiderivative size = 174, normalized size of antiderivative = 3.28 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=\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 \sinh \left (x\right ) - a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b + b^{3}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 30.30 (sec) , antiderivative size = 586, normalized size of antiderivative = 11.06 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=\text {Too large to display} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (47) = 94\).
Time = 0.30 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.25 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=-\frac {b \log \left (\frac {b e^{\left (-x\right )} + a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} + a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} - \frac {c \log \left (\frac {b e^{\left (-x\right )} + a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} + a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} - \frac {\log \left (b \sinh \left (x\right ) - a\right )}{b} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.66 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=-\frac {{\left (b + c\right )} \log \left (\frac {{\left | 2 \, b e^{x} - 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} - 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}}} + \frac {x}{b} - \frac {\log \left ({\left | b e^{\left (2 \, x\right )} - 2 \, a e^{x} - b \right |}\right )}{b} \]
[In]
[Out]
Time = 0.34 (sec) , antiderivative size = 177, normalized size of antiderivative = 3.34 \[ \int \frac {b+c+\cosh (x)}{a-b \sinh (x)} \, dx=\frac {x}{b}+\frac {\ln \left (b\,\sqrt {a^2+b^2}+a^2\,{\mathrm {e}}^x+b^2\,{\mathrm {e}}^x+a\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\left (b^2\,\sqrt {a^2+b^2}-a^2-b^2+b\,c\,\sqrt {a^2+b^2}\right )}{a^2\,b+b^3}-\frac {\ln \left (b\,\sqrt {a^2+b^2}-a^2\,{\mathrm {e}}^x-b^2\,{\mathrm {e}}^x+a\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\left (b^2\,\sqrt {a^2+b^2}+a^2+b^2+b\,c\,\sqrt {a^2+b^2}\right )}{a^2\,b+b^3} \]
[In]
[Out]