Optimal. Leaf size=101 \[ -\frac{b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}+\frac{4 a b \left (a^2+b^2\right ) \log (\sinh (c+d x))}{d}+x \left (6 a^2 b^2+a^4+b^4\right )-\frac{b (a+b \coth (c+d x))^3}{3 d}-\frac{a b (a+b \coth (c+d x))^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.122539, antiderivative size = 101, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3482, 3528, 3525, 3475} \[ -\frac{b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}+\frac{4 a b \left (a^2+b^2\right ) \log (\sinh (c+d x))}{d}+x \left (6 a^2 b^2+a^4+b^4\right )-\frac{b (a+b \coth (c+d x))^3}{3 d}-\frac{a b (a+b \coth (c+d x))^2}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3482
Rule 3528
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int (a+b \coth (c+d x))^4 \, dx &=-\frac{b (a+b \coth (c+d x))^3}{3 d}+\int (a+b \coth (c+d x))^2 \left (a^2+b^2+2 a b \coth (c+d x)\right ) \, dx\\ &=-\frac{a b (a+b \coth (c+d x))^2}{d}-\frac{b (a+b \coth (c+d x))^3}{3 d}+\int (a+b \coth (c+d x)) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \coth (c+d x)\right ) \, dx\\ &=\left (a^4+6 a^2 b^2+b^4\right ) x-\frac{b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}-\frac{a b (a+b \coth (c+d x))^2}{d}-\frac{b (a+b \coth (c+d x))^3}{3 d}+\left (4 a b \left (a^2+b^2\right )\right ) \int \coth (c+d x) \, dx\\ &=\left (a^4+6 a^2 b^2+b^4\right ) x-\frac{b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}-\frac{a b (a+b \coth (c+d x))^2}{d}-\frac{b (a+b \coth (c+d x))^3}{3 d}+\frac{4 a b \left (a^2+b^2\right ) \log (\sinh (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.905219, size = 109, normalized size = 1.08 \[ -\frac{6 b^2 \left (6 a^2+b^2\right ) \coth (c+d x)-24 a b \left (a^2+b^2\right ) \log (\tanh (c+d x))+12 a b^3 \coth ^2(c+d x)-3 (a-b)^4 \log (\tanh (c+d x)+1)+3 (a+b)^4 \log (1-\tanh (c+d x))+2 b^4 \coth ^3(c+d x)}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.004, size = 246, normalized size = 2.4 \begin{align*} -{\frac{{b}^{4} \left ({\rm coth} \left (dx+c\right ) \right ) ^{3}}{3\,d}}-2\,{\frac{ \left ({\rm coth} \left (dx+c\right ) \right ) ^{2}a{b}^{3}}{d}}-6\,{\frac{{a}^{2}{\rm coth} \left (dx+c\right ){b}^{2}}{d}}-{\frac{{\rm coth} \left (dx+c\right ){b}^{4}}{d}}-{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){a}^{4}}{2\,d}}-2\,{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){a}^{3}b}{d}}-3\,{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){a}^{2}{b}^{2}}{d}}-2\,{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ) a{b}^{3}}{d}}-{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){b}^{4}}{2\,d}}+{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){a}^{4}}{2\,d}}-2\,{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){a}^{3}b}{d}}+3\,{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){a}^{2}{b}^{2}}{d}}-2\,{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ) a{b}^{3}}{d}}+{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){b}^{4}}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.11372, size = 296, normalized size = 2.93 \begin{align*} \frac{1}{3} \, 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 )} + 4 \, a 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 )} + 6 \, a^{2} b^{2}{\left (x + \frac{c}{d} + \frac{2}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} + a^{4} x + \frac{4 \, a^{3} b \log \left (\sinh \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.53483, size = 3318, normalized size = 32.85 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 10.181, size = 233, normalized size = 2.31 \begin{align*} \begin{cases} x \left (a + b \coth{\left (c \right )}\right )^{4} & \text{for}\: d = 0 \\a^{4} x + \tilde{\infty } a^{3} b x + \tilde{\infty } a^{2} b^{2} x + \tilde{\infty } a b^{3} x + \tilde{\infty } b^{4} x & \text{for}\: c = \log{\left (- e^{- d x} \right )} \vee c = \log{\left (e^{- d x} \right )} \\a^{4} x + 4 a^{3} b x - \frac{4 a^{3} b \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} + \frac{4 a^{3} b \log{\left (\tanh{\left (c + d x \right )} \right )}}{d} + 6 a^{2} b^{2} x - \frac{6 a^{2} b^{2}}{d \tanh{\left (c + d x \right )}} + 4 a b^{3} x - \frac{4 a b^{3} \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} + \frac{4 a b^{3} \log{\left (\tanh{\left (c + d x \right )} \right )}}{d} - \frac{2 a b^{3}}{d \tanh ^{2}{\left (c + d x \right )}} + b^{4} x - \frac{b^{4}}{d \tanh{\left (c + d x \right )}} - \frac{b^{4}}{3 d \tanh ^{3}{\left (c + d x \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13745, size = 211, normalized size = 2.09 \begin{align*} \frac{{\left (a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )}{\left (d x + c\right )}}{d} + \frac{4 \,{\left (a^{3} b + a b^{3}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right )}{d} - \frac{4 \,{\left (9 \, a^{2} b^{2} + 2 \, b^{4} + 3 \,{\left (3 \, a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} e^{\left (4 \, d x + 4 \, c\right )} - 3 \,{\left (6 \, a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{3 \, d{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]