Integrand size = 12, antiderivative size = 69 \[ \int (a+b \coth (c+d x))^3 \, dx=a \left (a^2+3 b^2\right ) x-\frac {2 a b^2 \coth (c+d x)}{d}-\frac {b (a+b \coth (c+d x))^2}{2 d}+\frac {b \left (3 a^2+b^2\right ) \log (\sinh (c+d x))}{d} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3563, 3606, 3556} \[ \int (a+b \coth (c+d x))^3 \, dx=\frac {b \left (3 a^2+b^2\right ) \log (\sinh (c+d x))}{d}+a x \left (a^2+3 b^2\right )-\frac {2 a b^2 \coth (c+d x)}{d}-\frac {b (a+b \coth (c+d x))^2}{2 d} \]
[In]
[Out]
Rule 3556
Rule 3563
Rule 3606
Rubi steps \begin{align*} \text {integral}& = -\frac {b (a+b \coth (c+d x))^2}{2 d}+\int (a+b \coth (c+d x)) \left (a^2+b^2+2 a b \coth (c+d x)\right ) \, dx \\ & = a \left (a^2+3 b^2\right ) x-\frac {2 a b^2 \coth (c+d x)}{d}-\frac {b (a+b \coth (c+d x))^2}{2 d}+\left (b \left (3 a^2+b^2\right )\right ) \int \coth (c+d x) \, dx \\ & = a \left (a^2+3 b^2\right ) x-\frac {2 a b^2 \coth (c+d x)}{d}-\frac {b (a+b \coth (c+d x))^2}{2 d}+\frac {b \left (3 a^2+b^2\right ) \log (\sinh (c+d x))}{d} \\ \end{align*}
Time = 0.42 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.25 \[ \int (a+b \coth (c+d x))^3 \, dx=-\frac {6 a b^2 \coth (c+d x)+b^3 \coth ^2(c+d x)+(a+b)^3 \log (1-\tanh (c+d x))-2 b \left (3 a^2+b^2\right ) \log (\tanh (c+d x))-(a-b)^3 \log (1+\tanh (c+d x))}{2 d} \]
[In]
[Out]
Time = 0.15 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.26
method | result | size |
parallelrisch | \(\frac {\left (-6 a^{2} b -2 b^{3}\right ) \ln \left (1-\tanh \left (d x +c \right )\right )+\left (6 a^{2} b +2 b^{3}\right ) \ln \left (\tanh \left (d x +c \right )\right )-b^{3} \coth \left (d x +c \right )^{2}-6 \coth \left (d x +c \right ) a \,b^{2}+2 d x \left (a -b \right )^{3}}{2 d}\) | \(87\) |
derivativedivides | \(\frac {-\frac {b^{3} \coth \left (d x +c \right )^{2}}{2}-3 \coth \left (d x +c \right ) a \,b^{2}-\frac {\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \ln \left (\coth \left (d x +c \right )+1\right )}{2}}{d}\) | \(93\) |
default | \(\frac {-\frac {b^{3} \coth \left (d x +c \right )^{2}}{2}-3 \coth \left (d x +c \right ) a \,b^{2}-\frac {\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \ln \left (\coth \left (d x +c \right )+1\right )}{2}}{d}\) | \(93\) |
parts | \(a^{3} x +\frac {b^{3} \left (-\frac {\coth \left (d x +c \right )^{2}}{2}-\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{2}\right )}{d}+\frac {3 a^{2} b \ln \left (\sinh \left (d x +c \right )\right )}{d}+\frac {3 a \,b^{2} \left (-\coth \left (d x +c \right )-\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{2}\right )}{d}\) | \(103\) |
risch | \(a^{3} x -3 b \,a^{2} x +3 a \,b^{2} x -b^{3} x -\frac {6 b c \,a^{2}}{d}-\frac {2 b^{3} c}{d}-\frac {2 b^{2} \left (3 \,{\mathrm e}^{2 d x +2 c} a +b \,{\mathrm e}^{2 d x +2 c}-3 a \right )}{d \left ({\mathrm e}^{2 d x +2 c}-1\right )^{2}}+\frac {3 b \ln \left ({\mathrm e}^{2 d x +2 c}-1\right ) a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d}\) | \(134\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 654 vs. \(2 (67) = 134\).
Time = 0.26 (sec) , antiderivative size = 654, normalized size of antiderivative = 9.48 \[ \int (a+b \coth (c+d x))^3 \, dx=\frac {{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \sinh \left (d x + c\right )^{4} + 6 \, a b^{2} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x - 2 \, {\left (3 \, a b^{2} + b^{3} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right )^{2} - 3 \, a b^{2} - b^{3} - {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x\right )} \sinh \left (d x + c\right )^{2} + {\left ({\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (3 \, a^{2} b + b^{3}\right )} \sinh \left (d x + c\right )^{4} + 3 \, a^{2} b + b^{3} - 2 \, {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2} - 2 \, {\left (3 \, a^{2} b + b^{3} - 3 \, {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2}\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{3} - {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \log \left (\frac {2 \, \sinh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 4 \, {\left ({\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right )^{3} - {\left (3 \, a b^{2} + b^{3} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} - 2 \, d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, d \cosh \left (d x + c\right )^{2} - d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} - d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (63) = 126\).
Time = 0.83 (sec) , antiderivative size = 333, normalized size of antiderivative = 4.83 \[ \int (a+b \coth (c+d x))^3 \, dx=\begin {cases} x \left (a + b \coth {\left (c \right )}\right )^{3} & \text {for}\: d = 0 \\- \frac {a^{3} \log {\left (- e^{- d x} \right )}}{d} - \frac {3 a^{2} b \log {\left (- e^{- d x} \right )} \coth {\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {3 a b^{2} \log {\left (- e^{- d x} \right )} \coth ^{2}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {b^{3} \log {\left (- e^{- d x} \right )} \coth ^{3}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} & \text {for}\: c = \log {\left (- e^{- d x} \right )} \\a^{3} x + 3 a^{2} b x \coth {\left (d x + \log {\left (e^{- d x} \right )} \right )} + 3 a b^{2} x \coth ^{2}{\left (d x + \log {\left (e^{- d x} \right )} \right )} + b^{3} x \coth ^{3}{\left (d x + \log {\left (e^{- d x} \right )} \right )} & \text {for}\: c = \log {\left (e^{- d x} \right )} \\a^{3} x + 3 a^{2} b x - \frac {3 a^{2} b \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + \frac {3 a^{2} b \log {\left (\tanh {\left (c + d x \right )} \right )}}{d} + 3 a b^{2} x - \frac {3 a b^{2}}{d \tanh {\left (c + d x \right )}} + b^{3} x - \frac {b^{3} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + \frac {b^{3} \log {\left (\tanh {\left (c + d x \right )} \right )}}{d} - \frac {b^{3}}{2 d \tanh ^{2}{\left (c + d x \right )}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (67) = 134\).
Time = 0.19 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.97 \[ \int (a+b \coth (c+d x))^3 \, dx=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 )} + 3 \, a b^{2} {\left (x + \frac {c}{d} + \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} + a^{3} x + \frac {3 \, a^{2} b \log \left (\sinh \left (d x + c\right )\right )}{d} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.43 \[ \int (a+b \coth (c+d x))^3 \, dx=\frac {{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (d x + c\right )} + {\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right ) + \frac {2 \, {\left (3 \, a b^{2} - {\left (3 \, a b^{2} + b^{3}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{2}}}{d} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.41 \[ \int (a+b \coth (c+d x))^3 \, dx=x\,{\left (a-b\right )}^3-\frac {2\,\left (b^3+3\,a\,b^2\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {2\,b^3}{d\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}+\frac {\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-1\right )\,\left (3\,a^2\,b+b^3\right )}{d} \]
[In]
[Out]