Integrand size = 12, antiderivative size = 101 \[ \int (a+b \coth (c+d x))^4 \, 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} \]
(a^4+6*a^2*b^2+b^4)*x-b^2*(3*a^2+b^2)*coth(d*x+c)/d-a*b*(a+b*coth(d*x+c))^ 2/d-1/3*b*(a+b*coth(d*x+c))^3/d+4*a*b*(a^2+b^2)*ln(sinh(d*x+c))/d
Time = 0.95 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.08 \[ \int (a+b \coth (c+d x))^4 \, dx=-\frac {6 b^2 \left (6 a^2+b^2\right ) \coth (c+d x)+12 a b^3 \coth ^2(c+d x)+2 b^4 \coth ^3(c+d x)+3 (a+b)^4 \log (1-\tanh (c+d x))-24 a b \left (a^2+b^2\right ) \log (\tanh (c+d x))-3 (a-b)^4 \log (1+\tanh (c+d x))}{6 d} \]
-1/6*(6*b^2*(6*a^2 + b^2)*Coth[c + d*x] + 12*a*b^3*Coth[c + d*x]^2 + 2*b^4 *Coth[c + d*x]^3 + 3*(a + b)^4*Log[1 - Tanh[c + d*x]] - 24*a*b*(a^2 + b^2) *Log[Tanh[c + d*x]] - 3*(a - b)^4*Log[1 + Tanh[c + d*x]])/d
Result contains complex when optimal does not.
Time = 0.54 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.04, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {3042, 3963, 3042, 4011, 3042, 4008, 26, 3042, 26, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \coth (c+d x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a-i b \tan \left (i c+i d x+\frac {\pi }{2}\right )\right )^4dx\) |
\(\Big \downarrow \) 3963 |
\(\displaystyle \int (a+b \coth (c+d x))^2 \left (a^2+2 b \coth (c+d x) a+b^2\right )dx-\frac {b (a+b \coth (c+d x))^3}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {b (a+b \coth (c+d x))^3}{3 d}+\int \left (a-i b \tan \left (i c+i d x+\frac {\pi }{2}\right )\right )^2 \left (a^2-2 i b \tan \left (i c+i d x+\frac {\pi }{2}\right ) a+b^2\right )dx\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \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-\frac {b (a+b \coth (c+d x))^3}{3 d}-\frac {a b (a+b \coth (c+d x))^2}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a-i b \tan \left (i c+i d x+\frac {\pi }{2}\right )\right ) \left (a \left (a^2+3 b^2\right )-i b \left (3 a^2+b^2\right ) \tan \left (i c+i d x+\frac {\pi }{2}\right )\right )dx-\frac {b (a+b \coth (c+d x))^3}{3 d}-\frac {a b (a+b \coth (c+d x))^2}{d}\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle -4 i a b \left (a^2+b^2\right ) \int i \coth (c+d x)dx-\frac {b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}+x \left (a^4+6 a^2 b^2+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}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle 4 a b \left (a^2+b^2\right ) \int \coth (c+d x)dx-\frac {b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}+x \left (a^4+6 a^2 b^2+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}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 a b \left (a^2+b^2\right ) \int -i \tan \left (i c+i d x+\frac {\pi }{2}\right )dx-\frac {b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}+x \left (a^4+6 a^2 b^2+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}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -4 i a b \left (a^2+b^2\right ) \int \tan \left (\frac {1}{2} (2 i c+\pi )+i d x\right )dx-\frac {b^2 \left (3 a^2+b^2\right ) \coth (c+d x)}{d}+x \left (a^4+6 a^2 b^2+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}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle -\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 (-i \sinh (c+d x))}{d}+x \left (a^4+6 a^2 b^2+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}\) |
(a^4 + 6*a^2*b^2 + b^4)*x - (b^2*(3*a^2 + b^2)*Coth[c + d*x])/d - (a*b*(a + b*Coth[c + d*x])^2)/d - (b*(a + b*Coth[c + d*x])^3)/(3*d) + (4*a*b*(a^2 + b^2)*Log[(-I)*Sinh[c + d*x]])/d
3.1.78.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((a + b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] + Int[(a^2 - b^2 + 2*a*b*Tan[c + d *x])*(a + b*Tan[c + d*x])^(n - 2), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && GtQ[n, 1]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), x] + Simp[(b*c + a*d) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Time = 0.19 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.12
method | result | size |
parallelrisch | \(\frac {12 \left (-a^{3} b -a \,b^{3}\right ) \ln \left (1-\tanh \left (d x +c \right )\right )+12 \left (a^{3} b +a \,b^{3}\right ) \ln \left (\tanh \left (d x +c \right )\right )-b^{4} \coth \left (d x +c \right )^{3}-6 a \,b^{3} \coth \left (d x +c \right )^{2}+3 \left (-6 a^{2} b^{2}-b^{4}\right ) \coth \left (d x +c \right )+3 d x \left (a -b \right )^{4}}{3 d}\) | \(113\) |
derivativedivides | \(\frac {-\frac {b^{4} \coth \left (d x +c \right )^{3}}{3}-2 a \,b^{3} \coth \left (d x +c \right )^{2}-6 a^{2} b^{2} \coth \left (d x +c \right )-b^{4} \coth \left (d x +c \right )-\frac {\left (a^{4}+4 a^{3} b +6 a^{2} b^{2}+4 a \,b^{3}+b^{4}\right ) \ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\left (a^{4}-4 a^{3} b +6 a^{2} b^{2}-4 a \,b^{3}+b^{4}\right ) \ln \left (\coth \left (d x +c \right )+1\right )}{2}}{d}\) | \(134\) |
default | \(\frac {-\frac {b^{4} \coth \left (d x +c \right )^{3}}{3}-2 a \,b^{3} \coth \left (d x +c \right )^{2}-6 a^{2} b^{2} \coth \left (d x +c \right )-b^{4} \coth \left (d x +c \right )-\frac {\left (a^{4}+4 a^{3} b +6 a^{2} b^{2}+4 a \,b^{3}+b^{4}\right ) \ln \left (\coth \left (d x +c \right )-1\right )}{2}+\frac {\left (a^{4}-4 a^{3} b +6 a^{2} b^{2}-4 a \,b^{3}+b^{4}\right ) \ln \left (\coth \left (d x +c \right )+1\right )}{2}}{d}\) | \(134\) |
parts | \(x \,a^{4}+\frac {b^{4} \left (-\frac {\coth \left (d x +c \right )^{3}}{3}-\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}+\frac {4 a^{3} b \ln \left (\sinh \left (d x +c \right )\right )}{d}+\frac {6 a^{2} 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}+\frac {4 a \,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}\) | \(155\) |
risch | \(x \,a^{4}-4 b \,a^{3} x +6 a^{2} b^{2} x -4 a \,b^{3} x +b^{4} x -\frac {8 a^{3} b c}{d}-\frac {8 a \,b^{3} c}{d}-\frac {4 b^{2} \left (9 a^{2} {\mathrm e}^{4 d x +4 c}+6 a b \,{\mathrm e}^{4 d x +4 c}+3 \,{\mathrm e}^{4 d x +4 c} b^{2}-18 a^{2} {\mathrm e}^{2 d x +2 c}-6 a b \,{\mathrm e}^{2 d x +2 c}-3 \,{\mathrm e}^{2 d x +2 c} b^{2}+9 a^{2}+2 b^{2}\right )}{3 d \left ({\mathrm e}^{2 d x +2 c}-1\right )^{3}}+\frac {4 b \,a^{3} \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d}+\frac {4 b^{3} a \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d}\) | \(211\) |
1/3*(12*(-a^3*b-a*b^3)*ln(1-tanh(d*x+c))+12*(a^3*b+a*b^3)*ln(tanh(d*x+c))- b^4*coth(d*x+c)^3-6*a*b^3*coth(d*x+c)^2+3*(-6*a^2*b^2-b^4)*coth(d*x+c)+3*d *x*(a-b)^4)/d
Leaf count of result is larger than twice the leaf count of optimal. 1396 vs. \(2 (99) = 198\).
Time = 0.27 (sec) , antiderivative size = 1396, normalized size of antiderivative = 13.82 \[ \int (a+b \coth (c+d x))^4 \, dx=\text {Too large to display} \]
1/3*(3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x*cosh(d*x + c)^6 + 1 8*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x*cosh(d*x + c)*sinh(d*x + c)^5 + 3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x*sinh(d*x + c)^6 - 3*(12*a^2*b^2 + 8*a*b^3 + 4*b^4 + 3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x)*cosh(d*x + c)^4 + 3*(15*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x*cosh(d*x + c)^2 - 12*a^2*b^2 - 8*a*b^3 - 4*b^4 - 3*(a^4 - 4*a^3 *b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x)*sinh(d*x + c)^4 - 36*a^2*b^2 - 8*b^4 + 12*(5*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x*cosh(d*x + c)^3 - (12*a^2*b^2 + 8*a*b^3 + 4*b^4 + 3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b ^4)*d*x)*cosh(d*x + c))*sinh(d*x + c)^3 - 3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4 *a*b^3 + b^4)*d*x + 3*(24*a^2*b^2 + 8*a*b^3 + 4*b^4 + 3*(a^4 - 4*a^3*b + 6 *a^2*b^2 - 4*a*b^3 + b^4)*d*x)*cosh(d*x + c)^2 + 3*(15*(a^4 - 4*a^3*b + 6* a^2*b^2 - 4*a*b^3 + b^4)*d*x*cosh(d*x + c)^4 + 24*a^2*b^2 + 8*a*b^3 + 4*b^ 4 + 3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x - 6*(12*a^2*b^2 + 8* a*b^3 + 4*b^4 + 3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*d*x)*cosh(d* x + c)^2)*sinh(d*x + c)^2 + 12*((a^3*b + a*b^3)*cosh(d*x + c)^6 + 6*(a^3*b + a*b^3)*cosh(d*x + c)*sinh(d*x + c)^5 + (a^3*b + a*b^3)*sinh(d*x + c)^6 - 3*(a^3*b + a*b^3)*cosh(d*x + c)^4 - 3*(a^3*b + a*b^3 - 5*(a^3*b + a*b^3) *cosh(d*x + c)^2)*sinh(d*x + c)^4 - a^3*b - a*b^3 + 4*(5*(a^3*b + a*b^3)*c osh(d*x + c)^3 - 3*(a^3*b + a*b^3)*cosh(d*x + c))*sinh(d*x + c)^3 + 3*(...
Leaf count of result is larger than twice the leaf count of optimal. 444 vs. \(2 (92) = 184\).
Time = 1.20 (sec) , antiderivative size = 444, normalized size of antiderivative = 4.40 \[ \int (a+b \coth (c+d x))^4 \, dx=\begin {cases} x \left (a + b \coth {\left (c \right )}\right )^{4} & \text {for}\: d = 0 \\- \frac {a^{4} \log {\left (- e^{- d x} \right )}}{d} - \frac {4 a^{3} b \log {\left (- e^{- d x} \right )} \coth {\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {6 a^{2} b^{2} \log {\left (- e^{- d x} \right )} \coth ^{2}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {4 a b^{3} \log {\left (- e^{- d x} \right )} \coth ^{3}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} - \frac {b^{4} \log {\left (- e^{- d x} \right )} \coth ^{4}{\left (d x + \log {\left (- e^{- d x} \right )} \right )}}{d} & \text {for}\: c = \log {\left (- e^{- d x} \right )} \\a^{4} x + 4 a^{3} b x \coth {\left (d x + \log {\left (e^{- d x} \right )} \right )} + 6 a^{2} b^{2} x \coth ^{2}{\left (d x + \log {\left (e^{- d x} \right )} \right )} + 4 a b^{3} x \coth ^{3}{\left (d x + \log {\left (e^{- d x} \right )} \right )} + b^{4} x \coth ^{4}{\left (d x + \log {\left (e^{- d x} \right )} \right )} & \text {for}\: 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} \]
Piecewise((x*(a + b*coth(c))**4, Eq(d, 0)), (-a**4*log(-exp(-d*x))/d - 4*a **3*b*log(-exp(-d*x))*coth(d*x + log(-exp(-d*x)))/d - 6*a**2*b**2*log(-exp (-d*x))*coth(d*x + log(-exp(-d*x)))**2/d - 4*a*b**3*log(-exp(-d*x))*coth(d *x + log(-exp(-d*x)))**3/d - b**4*log(-exp(-d*x))*coth(d*x + log(-exp(-d*x )))**4/d, Eq(c, log(-exp(-d*x)))), (a**4*x + 4*a**3*b*x*coth(d*x + log(exp (-d*x))) + 6*a**2*b**2*x*coth(d*x + log(exp(-d*x)))**2 + 4*a*b**3*x*coth(d *x + log(exp(-d*x)))**3 + b**4*x*coth(d*x + log(exp(-d*x)))**4, Eq(c, log( exp(-d*x)))), (a**4*x + 4*a**3*b*x - 4*a**3*b*log(tanh(c + d*x) + 1)/d + 4 *a**3*b*log(tanh(c + d*x))/d + 6*a**2*b**2*x - 6*a**2*b**2/(d*tanh(c + d*x )) + 4*a*b**3*x - 4*a*b**3*log(tanh(c + d*x) + 1)/d + 4*a*b**3*log(tanh(c + d*x))/d - 2*a*b**3/(d*tanh(c + d*x)**2) + b**4*x - b**4/(d*tanh(c + d*x) ) - b**4/(3*d*tanh(c + d*x)**3), True))
Leaf count of result is larger than twice the leaf count of optimal. 219 vs. \(2 (99) = 198\).
Time = 0.19 (sec) , antiderivative size = 219, normalized size of antiderivative = 2.17 \[ \int (a+b \coth (c+d x))^4 \, dx=\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} \]
1/3*b^4*(3*x + 3*c/d - 4*(3*e^(-2*d*x - 2*c) - 3*e^(-4*d*x - 4*c) - 2)/(d* (3*e^(-2*d*x - 2*c) - 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) - 1))) + 4*a*b ^3*(x + c/d + log(e^(-d*x - c) + 1)/d + log(e^(-d*x - c) - 1)/d + 2*e^(-2* d*x - 2*c)/(d*(2*e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c) - 1))) + 6*a^2*b^2*(x + c/d + 2/(d*(e^(-2*d*x - 2*c) - 1))) + a^4*x + 4*a^3*b*log(sinh(d*x + c) )/d
Time = 0.29 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.51 \[ \int (a+b \coth (c+d x))^4 \, dx=\frac {3 \, {\left (a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} {\left (d x + c\right )} + 12 \, {\left (a^{3} b + a b^{3}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right ) - \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 )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{3}}}{3 \, d} \]
1/3*(3*(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*(d*x + c) + 12*(a^3*b + a*b^3)*log(abs(e^(2*d*x + 2*c) - 1)) - 4*(9*a^2*b^2 + 2*b^4 + 3*(3*a^2*b^ 2 + 2*a*b^3 + b^4)*e^(4*d*x + 4*c) - 3*(6*a^2*b^2 + 2*a*b^3 + b^4)*e^(2*d* x + 2*c))/(e^(2*d*x + 2*c) - 1)^3)/d
Time = 1.94 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.56 \[ \int (a+b \coth (c+d x))^4 \, dx=x\,{\left (a-b\right )}^4-\frac {4\,\left (3\,a^2\,b^2+2\,a\,b^3+b^4\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {4\,\left (b^4+2\,a\,b^3\right )}{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 (4\,a^3\,b+4\,a\,b^3\right )}{d}-\frac {8\,b^4}{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 )} \]