Integrand size = 6, antiderivative size = 31 \[ \int (1+\coth (x))^4 \, dx=8 x-4 \coth (x)-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+8 \log (\sinh (x)) \]
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.20 (sec) , antiderivative size = 84, normalized size of antiderivative = 2.71 \[ \int (1+\coth (x))^4 \, dx=\frac {(1+\coth (x))^4 \sinh (x) \left (-\cosh ^3(x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\tanh ^2(x)\right )+3 \sinh (x) \left (-2 \cosh ^2(x)-6 \cosh (x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\tanh ^2(x)\right ) \sinh (x)+(x+8 \log (\cosh (x))+8 \log (\tanh (x))) \sinh ^2(x)\right )\right )}{3 (\cosh (x)+\sinh (x))^4} \]
((1 + Coth[x])^4*Sinh[x]*(-(Cosh[x]^3*Hypergeometric2F1[-3/2, 1, -1/2, Tan h[x]^2]) + 3*Sinh[x]*(-2*Cosh[x]^2 - 6*Cosh[x]*Hypergeometric2F1[-1/2, 1, 1/2, Tanh[x]^2]*Sinh[x] + (x + 8*Log[Cosh[x]] + 8*Log[Tanh[x]])*Sinh[x]^2) ))/(3*(Cosh[x] + Sinh[x])^4)
Time = 0.35 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.26, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.667, Rules used = {3042, 3959, 3042, 3959, 3042, 3958, 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 (\coth (x)+1)^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (1-i \tan \left (\frac {\pi }{2}+i x\right )\right )^4dx\) |
\(\Big \downarrow \) 3959 |
\(\displaystyle 2 \int (\coth (x)+1)^3dx-\frac {1}{3} (\coth (x)+1)^3\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{3} (\coth (x)+1)^3+2 \int \left (1-i \tan \left (i x+\frac {\pi }{2}\right )\right )^3dx\) |
\(\Big \downarrow \) 3959 |
\(\displaystyle 2 \left (2 \int (\coth (x)+1)^2dx-\frac {1}{2} (\coth (x)+1)^2\right )-\frac {1}{3} (\coth (x)+1)^3\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{3} (\coth (x)+1)^3+2 \left (-\frac {1}{2} (\coth (x)+1)^2+2 \int \left (1-i \tan \left (i x+\frac {\pi }{2}\right )\right )^2dx\right )\) |
\(\Big \downarrow \) 3958 |
\(\displaystyle -\frac {1}{3} (\coth (x)+1)^3+2 \left (-\frac {1}{2} (\coth (x)+1)^2+2 (-2 i \int i \coth (x)dx+2 x-\coth (x))\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle 2 \left (2 (2 \int \coth (x)dx+2 x-\coth (x))-\frac {1}{2} (\coth (x)+1)^2\right )-\frac {1}{3} (\coth (x)+1)^3\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{3} (\coth (x)+1)^3+2 \left (-\frac {1}{2} (\coth (x)+1)^2+2 \left (2 \int -i \tan \left (i x+\frac {\pi }{2}\right )dx+2 x-\coth (x)\right )\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\frac {1}{3} (\coth (x)+1)^3+2 \left (-\frac {1}{2} (\coth (x)+1)^2+2 \left (-2 i \int \tan \left (i x+\frac {\pi }{2}\right )dx+2 x-\coth (x)\right )\right )\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle 2 \left (2 (2 x-\coth (x)+2 \log (\sinh (x)))-\frac {1}{2} (\coth (x)+1)^2\right )-\frac {1}{3} (\coth (x)+1)^3\) |
3.1.62.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_)])^2, x_Symbol] :> Simp[(a^2 - b^2) *x, x] + (Simp[b^2*(Tan[c + d*x]/d), x] + Simp[2*a*b Int[Tan[c + d*x], x] , x]) /; FreeQ[{a, b, 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] + Simp[2*a Int[(a + b*Tan[c + d* x])^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && GtQ[n , 1]
Time = 0.08 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.81
method | result | size |
derivativedivides | \(-\frac {\coth \left (x \right )^{3}}{3}-2 \coth \left (x \right )^{2}-7 \coth \left (x \right )-8 \ln \left (\coth \left (x \right )-1\right )\) | \(25\) |
default | \(-\frac {\coth \left (x \right )^{3}}{3}-2 \coth \left (x \right )^{2}-7 \coth \left (x \right )-8 \ln \left (\coth \left (x \right )-1\right )\) | \(25\) |
parallelrisch | \(-\frac {\coth \left (x \right )^{3}}{3}+8 \ln \left (\tanh \left (x \right )\right )-8 \ln \left (1-\tanh \left (x \right )\right )-7 \coth \left (x \right )-2 \coth \left (x \right )^{2}\) | \(32\) |
risch | \(-\frac {4 \left (18 \,{\mathrm e}^{4 x}-27 \,{\mathrm e}^{2 x}+11\right )}{3 \left ({\mathrm e}^{2 x}-1\right )^{3}}+8 \ln \left ({\mathrm e}^{2 x}-1\right )\) | \(35\) |
parts | \(x -\frac {\coth \left (x \right )^{3}}{3}-7 \coth \left (x \right )-\frac {11 \ln \left (\coth \left (x \right )-1\right )}{2}+\frac {3 \ln \left (1+\coth \left (x \right )\right )}{2}-2 \coth \left (x \right )^{2}+4 \ln \left (\sinh \left (x \right )\right )\) | \(38\) |
Leaf count of result is larger than twice the leaf count of optimal. 273 vs. \(2 (29) = 58\).
Time = 0.24 (sec) , antiderivative size = 273, normalized size of antiderivative = 8.81 \[ \int (1+\coth (x))^4 \, dx=-\frac {4 \, {\left (18 \, \cosh \left (x\right )^{4} + 72 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + 18 \, \sinh \left (x\right )^{4} + 27 \, {\left (4 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{2} - 27 \, \cosh \left (x\right )^{2} - 6 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + 3 \, {\left (5 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{4} - 3 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 3 \, {\left (5 \, \cosh \left (x\right )^{4} - 6 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + 3 \, \cosh \left (x\right )^{2} + 6 \, {\left (\cosh \left (x\right )^{5} - 2 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right ) - 1\right )} \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 18 \, {\left (4 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right ) + 11\right )}}{3 \, {\left (\cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right ) \sinh \left (x\right )^{5} + \sinh \left (x\right )^{6} + 3 \, {\left (5 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{4} - 3 \, \cosh \left (x\right )^{4} + 4 \, {\left (5 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 3 \, {\left (5 \, \cosh \left (x\right )^{4} - 6 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right )^{2} + 3 \, \cosh \left (x\right )^{2} + 6 \, {\left (\cosh \left (x\right )^{5} - 2 \, \cosh \left (x\right )^{3} + \cosh \left (x\right )\right )} \sinh \left (x\right ) - 1\right )}} \]
-4/3*(18*cosh(x)^4 + 72*cosh(x)*sinh(x)^3 + 18*sinh(x)^4 + 27*(4*cosh(x)^2 - 1)*sinh(x)^2 - 27*cosh(x)^2 - 6*(cosh(x)^6 + 6*cosh(x)*sinh(x)^5 + sinh (x)^6 + 3*(5*cosh(x)^2 - 1)*sinh(x)^4 - 3*cosh(x)^4 + 4*(5*cosh(x)^3 - 3*c osh(x))*sinh(x)^3 + 3*(5*cosh(x)^4 - 6*cosh(x)^2 + 1)*sinh(x)^2 + 3*cosh(x )^2 + 6*(cosh(x)^5 - 2*cosh(x)^3 + cosh(x))*sinh(x) - 1)*log(2*sinh(x)/(co sh(x) - sinh(x))) + 18*(4*cosh(x)^3 - 3*cosh(x))*sinh(x) + 11)/(cosh(x)^6 + 6*cosh(x)*sinh(x)^5 + sinh(x)^6 + 3*(5*cosh(x)^2 - 1)*sinh(x)^4 - 3*cosh (x)^4 + 4*(5*cosh(x)^3 - 3*cosh(x))*sinh(x)^3 + 3*(5*cosh(x)^4 - 6*cosh(x) ^2 + 1)*sinh(x)^2 + 3*cosh(x)^2 + 6*(cosh(x)^5 - 2*cosh(x)^3 + cosh(x))*si nh(x) - 1)
Time = 0.45 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.19 \[ \int (1+\coth (x))^4 \, dx=16 x - 8 \log {\left (\tanh {\left (x \right )} + 1 \right )} + 8 \log {\left (\tanh {\left (x \right )} \right )} - \frac {7}{\tanh {\left (x \right )}} - \frac {2}{\tanh ^{2}{\left (x \right )}} - \frac {1}{3 \tanh ^{3}{\left (x \right )}} \]
Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (29) = 58\).
Time = 0.20 (sec) , antiderivative size = 95, normalized size of antiderivative = 3.06 \[ \int (1+\coth (x))^4 \, dx=12 \, x - \frac {4 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} - 2\right )}}{3 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1\right )}} + \frac {8 \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )} - 1} + \frac {12}{e^{\left (-2 \, x\right )} - 1} + 4 \, \log \left (e^{\left (-x\right )} + 1\right ) + 4 \, \log \left (e^{\left (-x\right )} - 1\right ) + 4 \, \log \left (\sinh \left (x\right )\right ) \]
12*x - 4/3*(3*e^(-2*x) - 3*e^(-4*x) - 2)/(3*e^(-2*x) - 3*e^(-4*x) + e^(-6* x) - 1) + 8*e^(-2*x)/(2*e^(-2*x) - e^(-4*x) - 1) + 12/(e^(-2*x) - 1) + 4*l og(e^(-x) + 1) + 4*log(e^(-x) - 1) + 4*log(sinh(x))
Time = 0.28 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.13 \[ \int (1+\coth (x))^4 \, dx=-\frac {4 \, {\left (18 \, e^{\left (4 \, x\right )} - 27 \, e^{\left (2 \, x\right )} + 11\right )}}{3 \, {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} + 8 \, \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right ) \]
Time = 1.90 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.94 \[ \int (1+\coth (x))^4 \, dx=8\,\ln \left ({\mathrm {e}}^{2\,x}-1\right )-\frac {8}{3\,\left (3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1\right )}-\frac {12}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {24}{{\mathrm {e}}^{2\,x}-1} \]