Integrand size = 13, antiderivative size = 94 \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\frac {3 \left (2 a^2+b^2\right ) x}{2 b^4}+\frac {6 a \sqrt {a^2+b^2} \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^4}-\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2772, 2944, 2814, 2739, 632, 212} \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\frac {6 a \sqrt {a^2+b^2} \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^4}+\frac {3 x \left (2 a^2+b^2\right )}{2 b^4}-\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))} \]
[In]
[Out]
Rule 212
Rule 632
Rule 2739
Rule 2772
Rule 2814
Rule 2944
Rubi steps \begin{align*} \text {integral}& = -\frac {\cosh ^3(x)}{b (a+b \sinh (x))}+\frac {3 \int \frac {\cosh ^2(x) \sinh (x)}{a+b \sinh (x)} \, dx}{b} \\ & = -\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))}+\frac {(3 i) \int \frac {i a b-i \left (2 a^2+b^2\right ) \sinh (x)}{a+b \sinh (x)} \, dx}{2 b^3} \\ & = \frac {3 \left (2 a^2+b^2\right ) x}{2 b^4}-\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))}-\frac {\left (3 a \left (a^2+b^2\right )\right ) \int \frac {1}{a+b \sinh (x)} \, dx}{b^4} \\ & = \frac {3 \left (2 a^2+b^2\right ) x}{2 b^4}-\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))}-\frac {\left (6 a \left (a^2+b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^4} \\ & = \frac {3 \left (2 a^2+b^2\right ) x}{2 b^4}-\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))}+\frac {\left (12 a \left (a^2+b^2\right )\right ) \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 )}{b^4} \\ & = \frac {3 \left (2 a^2+b^2\right ) x}{2 b^4}+\frac {6 a \sqrt {a^2+b^2} \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{b^4}-\frac {3 \cosh (x) (2 a-b \sinh (x))}{2 b^3}-\frac {\cosh ^3(x)}{b (a+b \sinh (x))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 3.60 (sec) , antiderivative size = 660, normalized size of antiderivative = 7.02 \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\frac {\cosh ^3(x) \left (12 a \sqrt {a-i b} (a+i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {-\frac {b (i+\sinh (x))}{a-i b}}}{\sqrt {-\frac {b (-i+\sinh (x))}{a+i b}}}\right ) \sqrt {1+i \sinh (x)} (a+b \sinh (x))-12 a \left (a^2+b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-i b} \sqrt {-\frac {b (i+\sinh (x))}{a-i b}}}{\sqrt {a+i b} \sqrt {-\frac {b (-i+\sinh (x))}{a+i b}}}\right ) \sqrt {1+i \sinh (x)} (a+b \sinh (x))+\sqrt {a+i b} \sqrt {-\frac {b (-i+\sinh (x))}{a+i b}} \left (6 (-1)^{3/4} a \sqrt {b} \left (2 a^2+i a b+b^2\right ) \arcsin \left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {a-i b} \sqrt {-\frac {b (i+\sinh (x))}{a-i b}}}{\sqrt {b}}\right )+6 (-1)^{3/4} b^{3/2} \left (2 a^2+i a b+b^2\right ) \arcsin \left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {a-i b} \sqrt {-\frac {b (i+\sinh (x))}{a-i b}}}{\sqrt {b}}\right ) \sinh (x)-2 \sqrt {a-i b} \left (3 a^3+3 i a^2 b+a b^2+i b^3\right ) \sqrt {1+i \sinh (x)} \sqrt {-\frac {b (i+\sinh (x))}{a-i b}}-3 a \sqrt {a-i b} (a+i b) b \sqrt {1+i \sinh (x)} \sinh (x) \sqrt {-\frac {b (i+\sinh (x))}{a-i b}}+\sqrt {a-i b} (a+i b) b^2 \sqrt {1+i \sinh (x)} \sinh ^2(x) \sqrt {-\frac {b (i+\sinh (x))}{a-i b}}\right )\right )}{2 (a-i b)^{3/2} (a+i b)^{5/2} b \sqrt {1+i \sinh (x)} \left (-\frac {b (-i+\sinh (x))}{a+i b}\right )^{3/2} \left (-\frac {b (i+\sinh (x))}{a-i b}\right )^{3/2} (a+b \sinh (x))} \]
[In]
[Out]
Time = 17.49 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.71
method | result | size |
risch | \(\frac {3 x \,a^{2}}{b^{4}}+\frac {3 x}{2 b^{2}}+\frac {{\mathrm e}^{2 x}}{8 b^{2}}-\frac {a \,{\mathrm e}^{x}}{b^{3}}-\frac {a \,{\mathrm e}^{-x}}{b^{3}}-\frac {{\mathrm e}^{-2 x}}{8 b^{2}}+\frac {2 \left (a^{2}+b^{2}\right ) \left ({\mathrm e}^{x} a -b \right )}{b^{4} \left (b \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} a -b \right )}+\frac {3 \sqrt {a^{2}+b^{2}}\, a \ln \left ({\mathrm e}^{x}+\frac {a +\sqrt {a^{2}+b^{2}}}{b}\right )}{b^{4}}-\frac {3 \sqrt {a^{2}+b^{2}}\, a \ln \left ({\mathrm e}^{x}-\frac {-a +\sqrt {a^{2}+b^{2}}}{b}\right )}{b^{4}}\) | \(161\) |
default | \(\frac {\frac {2 \left (\frac {b^{2} \left (a^{2}+b^{2}\right ) \tanh \left (\frac {x}{2}\right )}{a}+b \left (a^{2}+b^{2}\right )\right )}{\tanh \left (\frac {x}{2}\right )^{2} a -2 b \tanh \left (\frac {x}{2}\right )-a}-6 a \sqrt {a^{2}+b^{2}}\, \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{4}}+\frac {1}{2 b^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {-b -4 a}{2 b^{3} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (-6 a^{2}-3 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b^{4}}-\frac {1}{2 b^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {-b +4 a}{2 b^{3} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (6 a^{2}+3 b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 b^{4}}\) | \(205\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 833 vs. \(2 (85) = 170\).
Time = 0.31 (sec) , antiderivative size = 833, normalized size of antiderivative = 8.86 \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 176 vs. \(2 (85) = 170\).
Time = 0.29 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.87 \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=-\frac {6 \, a b^{2} e^{\left (-x\right )} - b^{3} + {\left (32 \, a^{2} b + 17 \, b^{3}\right )} e^{\left (-2 \, x\right )} + 8 \, {\left (2 \, a^{3} + a b^{2}\right )} e^{\left (-3 \, x\right )}}{8 \, {\left (b^{5} e^{\left (-2 \, x\right )} + 2 \, a b^{4} e^{\left (-3 \, x\right )} - b^{5} e^{\left (-4 \, x\right )}\right )}} - \frac {3 \, \sqrt {a^{2} + b^{2}} a \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 )}{b^{4}} - \frac {8 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )}}{8 \, b^{3}} + \frac {3 \, {\left (2 \, a^{2} + b^{2}\right )} x}{2 \, b^{4}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (85) = 170\).
Time = 0.29 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.89 \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\frac {3 \, {\left (2 \, a^{2} + b^{2}\right )} x}{2 \, b^{4}} - \frac {3 \, {\left (a^{3} + a b^{2}\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}} b^{4}} + \frac {b^{2} e^{\left (2 \, x\right )} - 8 \, a b e^{x}}{8 \, b^{4}} + \frac {{\left (6 \, a b^{2} e^{x} + b^{3} + 8 \, {\left (2 \, a^{3} + a b^{2}\right )} e^{\left (3 \, x\right )} - {\left (32 \, a^{2} b + 17 \, b^{3}\right )} e^{\left (2 \, x\right )}\right )} e^{\left (-2 \, x\right )}}{8 \, {\left (b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b\right )} b^{4}} \]
[In]
[Out]
Time = 1.60 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.72 \[ \int \frac {\cosh ^4(x)}{(a+b \sinh (x))^2} \, dx=\frac {{\mathrm {e}}^{2\,x}}{8\,b^2}-\frac {{\mathrm {e}}^{-2\,x}}{8\,b^2}-\frac {\frac {2\,\left (a^4\,b^2+2\,a^2\,b^4+b^6\right )}{b^4\,\left (a^2\,b+b^3\right )}-\frac {2\,{\mathrm {e}}^x\,\left (a^5\,b^2+2\,a^3\,b^4+a\,b^6\right )}{b^5\,\left (a^2\,b+b^3\right )}}{2\,a\,{\mathrm {e}}^x-b+b\,{\mathrm {e}}^{2\,x}}+\frac {x\,\left (6\,a^2+3\,b^2\right )}{2\,b^4}-\frac {a\,{\mathrm {e}}^x}{b^3}-\frac {a\,{\mathrm {e}}^{-x}}{b^3}-\frac {3\,a\,\ln \left (\frac {6\,a\,{\mathrm {e}}^x\,\left (a^2+b^2\right )}{b^5}-\frac {6\,a\,\left (b-a\,{\mathrm {e}}^x\right )\,\sqrt {a^2+b^2}}{b^5}\right )\,\sqrt {a^2+b^2}}{b^4}+\frac {3\,a\,\ln \left (\frac {6\,a\,\left (b-a\,{\mathrm {e}}^x\right )\,\sqrt {a^2+b^2}}{b^5}+\frac {6\,a\,{\mathrm {e}}^x\,\left (a^2+b^2\right )}{b^5}\right )\,\sqrt {a^2+b^2}}{b^4} \]
[In]
[Out]