Optimal. Leaf size=159 \[ \frac {x}{a^4}-\frac {b \left (3 a^2-2 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{3/2} (a+b)^{3/2}}-\frac {\left (2 \left (a^2-b^2\right )-a b \cosh (x)\right ) \sinh (x)}{2 a^3 \left (a^2-b^2\right ) (b+a \cosh (x))}-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (b+a \cosh (x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {4477, 2772,
2943, 2942, 2814, 2738, 211} \begin {gather*} \frac {x}{a^4}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (a \cosh (x)+b)^2}-\frac {b \left (3 a^2-2 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{3/2} (a+b)^{3/2}}-\frac {\sinh (x) \left (2 \left (a^2-b^2\right )-a b \cosh (x)\right )}{2 a^3 \left (a^2-b^2\right ) (a \cosh (x)+b)}-\frac {\sinh ^3(x)}{3 a (a \cosh (x)+b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 2738
Rule 2772
Rule 2814
Rule 2942
Rule 2943
Rule 4477
Rubi steps
\begin {align*} \int \frac {1}{(a \coth (x)+b \text {csch}(x))^4} \, dx &=\int \frac {\sinh ^4(x)}{(i b+i a \cosh (x))^4} \, dx\\ &=-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {i \int \frac {\cosh (x) \sinh ^2(x)}{(i b+i a \cosh (x))^3} \, dx}{a}\\ &=-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (b+a \cosh (x))^2}+\frac {i \int \frac {(2 i a+i b \cosh (x)) \sinh ^2(x)}{(i b+i a \cosh (x))^2} \, dx}{2 a \left (a^2-b^2\right )}\\ &=-\frac {\left (2 \left (a^2-b^2\right )-a b \cosh (x)\right ) \sinh (x)}{2 a^3 \left (a^2-b^2\right ) (b+a \cosh (x))}-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (b+a \cosh (x))^2}-\frac {i \int \frac {a b-2 \left (a^2-b^2\right ) \cosh (x)}{i b+i a \cosh (x)} \, dx}{2 a^3 \left (a^2-b^2\right )}\\ &=\frac {x}{a^4}-\frac {\left (2 \left (a^2-b^2\right )-a b \cosh (x)\right ) \sinh (x)}{2 a^3 \left (a^2-b^2\right ) (b+a \cosh (x))}-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (b+a \cosh (x))^2}-\frac {\left (i b \left (3 a^2-2 b^2\right )\right ) \int \frac {1}{i b+i a \cosh (x)} \, dx}{2 a^4 \left (a^2-b^2\right )}\\ &=\frac {x}{a^4}-\frac {\left (2 \left (a^2-b^2\right )-a b \cosh (x)\right ) \sinh (x)}{2 a^3 \left (a^2-b^2\right ) (b+a \cosh (x))}-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (b+a \cosh (x))^2}-\frac {\left (i b \left (3 a^2-2 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{i a+i b-(-i a+i b) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a^4 \left (a^2-b^2\right )}\\ &=\frac {x}{a^4}-\frac {b \left (3 a^2-2 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{3/2} (a+b)^{3/2}}-\frac {\left (2 \left (a^2-b^2\right )-a b \cosh (x)\right ) \sinh (x)}{2 a^3 \left (a^2-b^2\right ) (b+a \cosh (x))}-\frac {\sinh ^3(x)}{3 a (b+a \cosh (x))^3}-\frac {b \sinh ^3(x)}{2 a \left (a^2-b^2\right ) (b+a \cosh (x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.32, size = 150, normalized size = 0.94 \begin {gather*} \frac {\left (2 a \left (a^2-b^2\right )+7 a b (b+a \cosh (x))-\frac {a \left (8 a^2-11 b^2\right ) (b+a \cosh (x))^2}{(a-b) (a+b)}+6 x (b+a \cosh (x))^3 \text {csch}(x)-\frac {6 b \left (-3 a^2+2 b^2\right ) \text {ArcTan}\left (\frac {(-a+b) \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right ) (b+a \cosh (x))^3 \text {csch}(x)}{\left (a^2-b^2\right )^{3/2}}\right ) \sinh (x)}{6 a^4 (b+a \cosh (x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.13, size = 206, normalized size = 1.30
method | result | size |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a^{4}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a^{4}}+\frac {\frac {2 \left (-\frac {\left (2 a^{3}-a^{2} b -3 a \,b^{2}+2 b^{3}\right ) a \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )}{2 \left (a +b \right )}-\frac {2 a \left (5 a^{2}-3 b^{2}\right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3}-\frac {\left (2 a^{3}+a^{2} b -3 a \,b^{2}-2 b^{3}\right ) a \tanh \left (\frac {x}{2}\right )}{2 \left (a -b \right )}\right )}{\left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )^{3}}-\frac {b \left (3 a^{2}-2 b^{2}\right ) \arctan \left (\frac {\tanh \left (\frac {x}{2}\right ) \left (a -b \right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a^{2}-b^{2}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{a^{4}}\) | \(206\) |
risch | \(\frac {x}{a^{4}}+\frac {15 \,{\mathrm e}^{5 x} a^{4} b -18 a^{2} b^{3} {\mathrm e}^{5 x}+12 a^{5} {\mathrm e}^{4 x}+27 a^{3} b^{2} {\mathrm e}^{4 x}-54 a \,b^{4} {\mathrm e}^{4 x}+48 \,{\mathrm e}^{3 x} a^{4} b -34 a^{2} b^{3} {\mathrm e}^{3 x}-44 \,{\mathrm e}^{3 x} b^{5}+12 a^{5} {\mathrm e}^{2 x}+36 a^{3} b^{2} {\mathrm e}^{2 x}-78 a \,b^{4} {\mathrm e}^{2 x}+33 a^{4} b \,{\mathrm e}^{x}-48 a^{2} b^{3} {\mathrm e}^{x}+8 a^{5}-11 a^{3} b^{2}}{3 a^{4} \left (a^{2}-b^{2}\right ) \left ({\mathrm e}^{2 x} a +2 \,{\mathrm e}^{x} b +a \right )^{3}}-\frac {3 b \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) a^{2}}+\frac {b^{3} \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) a^{4}}+\frac {3 b \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) a^{2}}-\frac {b^{3} \ln \left ({\mathrm e}^{x}+\frac {b \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) a^{4}}\) | \(468\) |
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. 2875 vs.
\(2 (141) = 282\).
time = 0.43, size = 5830, normalized size = 36.67 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a \coth {\left (x \right )} + b \operatorname {csch}{\left (x \right )}\right )^{4}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 242, normalized size = 1.52 \begin {gather*} -\frac {{\left (3 \, a^{2} b - 2 \, b^{3}\right )} \arctan \left (\frac {a e^{x} + b}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{6} - a^{4} b^{2}\right )} \sqrt {a^{2} - b^{2}}} + \frac {15 \, a^{4} b e^{\left (5 \, x\right )} - 18 \, a^{2} b^{3} e^{\left (5 \, x\right )} + 12 \, a^{5} e^{\left (4 \, x\right )} + 27 \, a^{3} b^{2} e^{\left (4 \, x\right )} - 54 \, a b^{4} e^{\left (4 \, x\right )} + 48 \, a^{4} b e^{\left (3 \, x\right )} - 34 \, a^{2} b^{3} e^{\left (3 \, x\right )} - 44 \, b^{5} e^{\left (3 \, x\right )} + 12 \, a^{5} e^{\left (2 \, x\right )} + 36 \, a^{3} b^{2} e^{\left (2 \, x\right )} - 78 \, a b^{4} e^{\left (2 \, x\right )} + 33 \, a^{4} b e^{x} - 48 \, a^{2} b^{3} e^{x} + 8 \, a^{5} - 11 \, a^{3} b^{2}}{3 \, {\left (a^{6} - a^{4} b^{2}\right )} {\left (a e^{\left (2 \, x\right )} + 2 \, b e^{x} + a\right )}^{3}} + \frac {x}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\left (\frac {b}{\mathrm {sinh}\left (x\right )}+a\,\mathrm {coth}\left (x\right )\right )}^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________