Optimal. Leaf size=101 \[ a^4 x-\frac {1}{3} (b+a \cosh (x))^2 \left (a b+\left (3 a^2-2 b^2\right ) \cosh (x)\right ) \text {csch}(x)-\frac {1}{3} (b+a \cosh (x))^3 (a+b \cosh (x)) \text {csch}^3(x)+\frac {4}{3} a b \left (2 a^2-b^2\right ) \sinh (x)+\frac {1}{3} a^2 \left (3 a^2-2 b^2\right ) \cosh (x) \sinh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {4477, 2770,
2940, 2813} \begin {gather*} a^4 x+\frac {4}{3} a b \left (2 a^2-b^2\right ) \sinh (x)+\frac {1}{3} a^2 \left (3 a^2-2 b^2\right ) \sinh (x) \cosh (x)-\frac {1}{3} \text {csch}(x) (a \cosh (x)+b)^2 \left (\left (3 a^2-2 b^2\right ) \cosh (x)+a b\right )-\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2770
Rule 2813
Rule 2940
Rule 4477
Rubi steps
\begin {align*} \int (a \coth (x)+b \text {csch}(x))^4 \, dx &=\int (i b+i a \cosh (x))^4 \text {csch}^4(x) \, dx\\ &=-\frac {1}{3} (b+a \cosh (x))^3 (a+b \cosh (x)) \text {csch}^3(x)+\frac {1}{3} \int (i b+i a \cosh (x))^2 \left (-3 a^2+2 b^2-a b \cosh (x)\right ) \text {csch}^2(x) \, dx\\ &=-\frac {1}{3} (b+a \cosh (x))^2 \left (a b+\left (3 a^2-2 b^2\right ) \cosh (x)\right ) \text {csch}(x)-\frac {1}{3} (b+a \cosh (x))^3 (a+b \cosh (x)) \text {csch}^3(x)+\frac {1}{3} \int (i b+i a \cosh (x)) \left (-2 i a^2 b-2 i a \left (3 a^2-2 b^2\right ) \cosh (x)\right ) \, dx\\ &=a^4 x-\frac {1}{3} (b+a \cosh (x))^2 \left (a b+\left (3 a^2-2 b^2\right ) \cosh (x)\right ) \text {csch}(x)-\frac {1}{3} (b+a \cosh (x))^3 (a+b \cosh (x)) \text {csch}^3(x)+\frac {4}{3} a b \left (2 a^2-b^2\right ) \sinh (x)+\frac {1}{3} a^2 \left (3 a^2-2 b^2\right ) \cosh (x) \sinh (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 95, normalized size = 0.94 \begin {gather*} -\frac {1}{12} \text {csch}^3(x) \left (-8 a^3 b+16 a b^3+6 b^2 \left (3 a^2+b^2\right ) \cosh (x)+24 a^3 b \cosh (2 x)+4 a^4 \cosh (3 x)+6 a^2 b^2 \cosh (3 x)-2 b^4 \cosh (3 x)+9 a^4 x \sinh (x)-3 a^4 x \sinh (3 x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.79, size = 113, normalized size = 1.12
method | result | size |
risch | \(x \,a^{4}-\frac {4 \left (6 a^{3} b \,{\mathrm e}^{5 x}+3 a^{4} {\mathrm e}^{4 x}+9 \,{\mathrm e}^{4 x} a^{2} b^{2}-4 a^{3} b \,{\mathrm e}^{3 x}+8 a \,b^{3} {\mathrm e}^{3 x}-3 a^{4} {\mathrm e}^{2 x}+3 b^{4} {\mathrm e}^{2 x}+6 a^{3} b \,{\mathrm e}^{x}+2 a^{4}+3 a^{2} b^{2}-b^{4}\right )}{3 \left ({\mathrm e}^{2 x}-1\right )^{3}}\) | \(113\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 214 vs.
\(2 (93) = 186\).
time = 0.26, size = 214, normalized size = 2.12 \begin {gather*} -2 \, a^{2} b^{2} \coth \left (x\right )^{3} + \frac {1}{3} \, a^{4} {\left (3 \, x - \frac {4 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} - 2\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1}\right )} + \frac {8}{3} \, a^{3} b {\left (\frac {3 \, e^{\left (-x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1} - \frac {2 \, e^{\left (-3 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1} + \frac {3 \, e^{\left (-5 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1}\right )} + \frac {4}{3} \, b^{4} {\left (\frac {3 \, e^{\left (-2 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1} - \frac {1}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1}\right )} + \frac {32 \, a b^{3}}{3 \, {\left (e^{\left (-x\right )} - e^{x}\right )}^{3}} \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. 209 vs.
\(2 (93) = 186\).
time = 0.36, size = 209, normalized size = 2.07 \begin {gather*} -\frac {24 \, a^{3} b \cosh \left (x\right )^{2} - 8 \, a^{3} b + 16 \, a b^{3} + 2 \, {\left (2 \, a^{4} + 3 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{3} - {\left (3 \, a^{4} x + 4 \, a^{4} + 6 \, a^{2} b^{2} - 2 \, b^{4}\right )} \sinh \left (x\right )^{3} + 6 \, {\left (4 \, a^{3} b + {\left (2 \, a^{4} + 3 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + 6 \, {\left (3 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) + 3 \, {\left (3 \, a^{4} x + 4 \, a^{4} + 6 \, a^{2} b^{2} - 2 \, b^{4} - {\left (3 \, a^{4} x + 4 \, a^{4} + 6 \, a^{2} b^{2} - 2 \, b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )}{3 \, {\left (\sinh \left (x\right )^{3} + 3 \, {\left (\cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )\right )}} \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 \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.41, size = 112, normalized size = 1.11 \begin {gather*} a^{4} x - \frac {4 \, {\left (6 \, a^{3} b e^{\left (5 \, x\right )} + 3 \, a^{4} e^{\left (4 \, x\right )} + 9 \, a^{2} b^{2} e^{\left (4 \, x\right )} - 4 \, a^{3} b e^{\left (3 \, x\right )} + 8 \, a b^{3} e^{\left (3 \, x\right )} - 3 \, a^{4} e^{\left (2 \, x\right )} + 3 \, b^{4} e^{\left (2 \, x\right )} + 6 \, a^{3} b e^{x} + 2 \, a^{4} + 3 \, a^{2} b^{2} - b^{4}\right )}}{3 \, {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.55, size = 146, normalized size = 1.45 \begin {gather*} a^4\,x-\frac {4\,a^4+8\,{\mathrm {e}}^x\,a^3\,b+12\,a^2\,b^2}{{\mathrm {e}}^{2\,x}-1}-\frac {{\mathrm {e}}^x\,\left (\frac {32\,a^3\,b}{3}+\frac {32\,a\,b^3}{3}\right )+4\,a^4+4\,b^4+24\,a^2\,b^2}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {{\mathrm {e}}^x\,\left (\frac {32\,a^3\,b}{3}+\frac {32\,a\,b^3}{3}\right )+\frac {8\,a^4}{3}+\frac {8\,b^4}{3}+16\,a^2\,b^2}{3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________