Optimal. Leaf size=142 \[ a \left (a^4+10 a^2 b^2+5 b^4\right ) x-\frac {4 a b^2 \left (a^2+b^2\right ) \coth (c+d x)}{d}-\frac {b \left (3 a^2+b^2\right ) (a+b \coth (c+d x))^2}{2 d}-\frac {2 a b (a+b \coth (c+d x))^3}{3 d}-\frac {b (a+b \coth (c+d x))^4}{4 d}+\frac {b \left (5 a^4+10 a^2 b^2+b^4\right ) \log (\sinh (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3563, 3609,
3606, 3556} \begin {gather*} -\frac {b \left (3 a^2+b^2\right ) (a+b \coth (c+d x))^2}{2 d}-\frac {4 a b^2 \left (a^2+b^2\right ) \coth (c+d x)}{d}+\frac {b \left (5 a^4+10 a^2 b^2+b^4\right ) \log (\sinh (c+d x))}{d}+a x \left (a^4+10 a^2 b^2+5 b^4\right )-\frac {b (a+b \coth (c+d x))^4}{4 d}-\frac {2 a b (a+b \coth (c+d x))^3}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3563
Rule 3606
Rule 3609
Rubi steps
\begin {align*} \int (a+b \coth (c+d x))^5 \, dx &=-\frac {b (a+b \coth (c+d x))^4}{4 d}+\int (a+b \coth (c+d x))^3 \left (a^2+b^2+2 a b \coth (c+d x)\right ) \, dx\\ &=-\frac {2 a b (a+b \coth (c+d x))^3}{3 d}-\frac {b (a+b \coth (c+d x))^4}{4 d}+\int (a+b \coth (c+d x))^2 \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \coth (c+d x)\right ) \, dx\\ &=-\frac {b \left (3 a^2+b^2\right ) (a+b \coth (c+d x))^2}{2 d}-\frac {2 a b (a+b \coth (c+d x))^3}{3 d}-\frac {b (a+b \coth (c+d x))^4}{4 d}+\int (a+b \coth (c+d x)) \left (a^4+6 a^2 b^2+b^4+4 a b \left (a^2+b^2\right ) \coth (c+d x)\right ) \, dx\\ &=a \left (a^4+10 a^2 b^2+5 b^4\right ) x-\frac {4 a b^2 \left (a^2+b^2\right ) \coth (c+d x)}{d}-\frac {b \left (3 a^2+b^2\right ) (a+b \coth (c+d x))^2}{2 d}-\frac {2 a b (a+b \coth (c+d x))^3}{3 d}-\frac {b (a+b \coth (c+d x))^4}{4 d}+\left (b \left (5 a^4+10 a^2 b^2+b^4\right )\right ) \int \coth (c+d x) \, dx\\ &=a \left (a^4+10 a^2 b^2+5 b^4\right ) x-\frac {4 a b^2 \left (a^2+b^2\right ) \coth (c+d x)}{d}-\frac {b \left (3 a^2+b^2\right ) (a+b \coth (c+d x))^2}{2 d}-\frac {2 a b (a+b \coth (c+d x))^3}{3 d}-\frac {b (a+b \coth (c+d x))^4}{4 d}+\frac {b \left (5 a^4+10 a^2 b^2+b^4\right ) \log (\sinh (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.54, size = 141, normalized size = 0.99 \begin {gather*} -\frac {60 a b^2 \left (2 a^2+b^2\right ) \coth (c+d x)+6 b^3 \left (10 a^2+b^2\right ) \coth ^2(c+d x)+20 a b^4 \coth ^3(c+d x)+3 b^5 \coth ^4(c+d x)+6 (a+b)^5 \log (1-\tanh (c+d x))-12 b \left (5 a^4+10 a^2 b^2+b^4\right ) \log (\tanh (c+d x))-6 (a-b)^5 \log (1+\tanh (c+d x))}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.32, size = 182, normalized size = 1.28
method | result | size |
derivativedivides | \(\frac {-10 a^{3} b^{2} \coth \left (d x +c \right )-5 a \,b^{4} \coth \left (d x +c \right )-5 a^{2} b^{3} \left (\coth ^{2}\left (d x +c \right )\right )-\frac {5 a \,b^{4} \left (\coth ^{3}\left (d x +c \right )\right )}{3}-\frac {b^{5} \left (\coth ^{2}\left (d x +c \right )\right )}{2}-\frac {b^{5} \left (\coth ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (a^{5}+5 a^{4} b +10 a^{3} b^{2}+10 a^{2} b^{3}+5 a \,b^{4}+b^{5}\right ) \ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\left (a^{5}-5 a^{4} b +10 a^{3} b^{2}-10 a^{2} b^{3}+5 a \,b^{4}-b^{5}\right ) \ln \left (\coth \left (d x +c \right )+1\right )}{2}}{d}\) | \(182\) |
default | \(\frac {-10 a^{3} b^{2} \coth \left (d x +c \right )-5 a \,b^{4} \coth \left (d x +c \right )-5 a^{2} b^{3} \left (\coth ^{2}\left (d x +c \right )\right )-\frac {5 a \,b^{4} \left (\coth ^{3}\left (d x +c \right )\right )}{3}-\frac {b^{5} \left (\coth ^{2}\left (d x +c \right )\right )}{2}-\frac {b^{5} \left (\coth ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (a^{5}+5 a^{4} b +10 a^{3} b^{2}+10 a^{2} b^{3}+5 a \,b^{4}+b^{5}\right ) \ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\left (a^{5}-5 a^{4} b +10 a^{3} b^{2}-10 a^{2} b^{3}+5 a \,b^{4}-b^{5}\right ) \ln \left (\coth \left (d x +c \right )+1\right )}{2}}{d}\) | \(182\) |
risch | \(a^{5} x -5 a^{4} x b +10 a^{3} b^{2} x -10 a^{2} b^{3} x +5 a \,b^{4} x -b^{5} x -\frac {10 b \,a^{4} c}{d}-\frac {20 b^{3} a^{2} c}{d}-\frac {2 b^{5} c}{d}-\frac {4 b^{2} \left (15 a^{3} {\mathrm e}^{6 d x +6 c}+15 a^{2} b \,{\mathrm e}^{6 d x +6 c}+15 a \,b^{2} {\mathrm e}^{6 d x +6 c}+3 b^{3} {\mathrm e}^{6 d x +6 c}-45 a^{3} {\mathrm e}^{4 d x +4 c}-30 a^{2} b \,{\mathrm e}^{4 d x +4 c}-30 a \,b^{2} {\mathrm e}^{4 d x +4 c}-3 b^{3} {\mathrm e}^{4 d x +4 c}+45 a^{3} {\mathrm e}^{2 d x +2 c}+15 a^{2} b \,{\mathrm e}^{2 d x +2 c}+25 a \,b^{2} {\mathrm e}^{2 d x +2 c}+3 b^{3} {\mathrm e}^{2 d x +2 c}-15 a^{3}-10 a \,b^{2}\right )}{3 d \left ({\mathrm e}^{2 d x +2 c}-1\right )^{4}}+\frac {5 b \ln \left ({\mathrm e}^{2 d x +2 c}-1\right ) a^{4}}{d}+\frac {10 b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-1\right ) a^{2}}{d}+\frac {b^{5} \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d}\) | \(346\) |
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. 348 vs.
\(2 (136) = 272\).
time = 0.28, size = 348, normalized size = 2.45 \begin {gather*} \frac {5}{3} \, a b^{4} {\left (3 \, x + \frac {3 \, c}{d} - \frac {4 \, {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, e^{\left (-4 \, d x - 4 \, c\right )} - 2\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} - 1\right )}}\right )} + b^{5} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac {4 \, {\left (e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} - 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} - e^{\left (-8 \, d x - 8 \, c\right )} - 1\right )}}\right )} + 10 \, a^{2} b^{3} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac {2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )}}\right )} + 10 \, a^{3} b^{2} {\left (x + \frac {c}{d} + \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} + a^{5} x + \frac {5 \, a^{4} b \log \left (\sinh \left (d x + c\right )\right )}{d} \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. 2748 vs.
\(2 (136) = 272\).
time = 0.41, size = 2748, normalized size = 19.35 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 641 vs.
\(2 (133) = 266\).
time = 2.36, size = 641, normalized size = 4.51 \begin {gather*} \begin {cases} - \frac {a^{5} \log {\left (- e^{- d x} \right )}}{d} - \frac {5 a^{4} b \log {\left (- e^{- d x} \right )} \coth {\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {10 a^{3} b^{2} \log {\left (- e^{- d x} \right )} \coth ^{2}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {10 a^{2} b^{3} \log {\left (- e^{- d x} \right )} \coth ^{3}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {5 a b^{4} \log {\left (- e^{- d x} \right )} \coth ^{4}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {b^{5} \log {\left (- e^{- d x} \right )} \coth ^{5}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} & \text {for}\: c = \log {\left (- e^{- d x} \right )} \\- \frac {a^{5} \log {\left (e^{- d x} \right )}}{d} - \frac {5 a^{4} b \log {\left (e^{- d x} \right )} \coth {\left (d x + \log {\left (e^{- d x} \right )} \right )}}{d} - \frac {10 a^{3} b^{2} \log {\left (e^{- d x} \right )} \coth ^{2}{\left (d x + \log {\left (e^{- d x} \right )} \right )}}{d} - \frac {10 a^{2} b^{3} \log {\left (e^{- d x} \right )} \coth ^{3}{\left (d x + \log {\left (e^{- d x} \right )} \right )}}{d} - \frac {5 a b^{4} \log {\left (e^{- d x} \right )} \coth ^{4}{\left (d x + \log {\left (e^{- d x} \right )} \right )}}{d} - \frac {b^{5} \log {\left (e^{- d x} \right )} \coth ^{5}{\left (d x + \log {\left (e^{- d x} \right )} \right )}}{d} & \text {for}\: c = \log {\left (e^{- d x} \right )} \\x \left (a + b \coth {\left (c \right )}\right )^{5} & \text {for}\: d = 0 \\a^{5} x + 5 a^{4} b x - \frac {5 a^{4} b \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + \frac {5 a^{4} b \log {\left (\tanh {\left (c + d x \right )} \right )}}{d} + 10 a^{3} b^{2} x - \frac {10 a^{3} b^{2}}{d \tanh {\left (c + d x \right )}} + 10 a^{2} b^{3} x - \frac {10 a^{2} b^{3} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + \frac {10 a^{2} b^{3} \log {\left (\tanh {\left (c + d x \right )} \right )}}{d} - \frac {5 a^{2} b^{3}}{d \tanh ^{2}{\left (c + d x \right )}} + 5 a b^{4} x - \frac {5 a b^{4}}{d \tanh {\left (c + d x \right )}} - \frac {5 a b^{4}}{3 d \tanh ^{3}{\left (c + d x \right )}} + b^{5} x - \frac {b^{5} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + \frac {b^{5} \log {\left (\tanh {\left (c + d x \right )} \right )}}{d} - \frac {b^{5}}{2 d \tanh ^{2}{\left (c + d x \right )}} - \frac {b^{5}}{4 d \tanh ^{4}{\left (c + d x \right )}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 226, normalized size = 1.59 \begin {gather*} \frac {3 \, {\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} {\left (d x + c\right )} + 3 \, {\left (5 \, a^{4} b + 10 \, a^{2} b^{3} + b^{5}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right ) + \frac {4 \, {\left (15 \, a^{3} b^{2} + 10 \, a b^{4} - 3 \, {\left (5 \, a^{3} b^{2} + 5 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} e^{\left (6 \, d x + 6 \, c\right )} + 3 \, {\left (15 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 10 \, a b^{4} + b^{5}\right )} e^{\left (4 \, d x + 4 \, c\right )} - {\left (45 \, a^{3} b^{2} + 15 \, a^{2} b^{3} + 25 \, a b^{4} + 3 \, b^{5}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{4}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.28, size = 244, normalized size = 1.72 \begin {gather*} x\,{\left (a-b\right )}^5-\frac {4\,\left (5\,a^3\,b^2+5\,a^2\,b^3+5\,a\,b^4+b^5\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}+\frac {\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-1\right )\,\left (5\,a^4\,b+10\,a^2\,b^3+b^5\right )}{d}-\frac {4\,\left (5\,a^2\,b^3+5\,a\,b^4+2\,b^5\right )}{d\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {4\,b^5}{d\,\left (6\,{\mathrm {e}}^{4\,c+4\,d\,x}-4\,{\mathrm {e}}^{2\,c+2\,d\,x}-4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}-\frac {8\,\left (3\,b^5+5\,a\,b^4\right )}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}-3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________