Integrand size = 11, antiderivative size = 101 \[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=a^4 x-\frac {1}{3} (b+a \cosh (x))^2 \left (a b+\left (3 a^2-2 b^2\right ) \cosh (x)\right ) \text {csch}(x)-\frac {1}{3} (b+a \cosh (x))^3 (a+b \cosh (x)) \text {csch}^3(x)+\frac {4}{3} a b \left (2 a^2-b^2\right ) \sinh (x)+\frac {1}{3} a^2 \left (3 a^2-2 b^2\right ) \cosh (x) \sinh (x) \]
a^4*x-1/3*(b+a*cosh(x))^2*(a*b+(3*a^2-2*b^2)*cosh(x))*csch(x)-1/3*(b+a*cos h(x))^3*(a+b*cosh(x))*csch(x)^3+4/3*a*b*(2*a^2-b^2)*sinh(x)+1/3*a^2*(3*a^2 -2*b^2)*cosh(x)*sinh(x)
Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.94 \[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=-\frac {1}{12} \text {csch}^3(x) \left (-8 a^3 b+16 a b^3+6 b^2 \left (3 a^2+b^2\right ) \cosh (x)+24 a^3 b \cosh (2 x)+4 a^4 \cosh (3 x)+6 a^2 b^2 \cosh (3 x)-2 b^4 \cosh (3 x)+9 a^4 x \sinh (x)-3 a^4 x \sinh (3 x)\right ) \]
-1/12*(Csch[x]^3*(-8*a^3*b + 16*a*b^3 + 6*b^2*(3*a^2 + b^2)*Cosh[x] + 24*a ^3*b*Cosh[2*x] + 4*a^4*Cosh[3*x] + 6*a^2*b^2*Cosh[3*x] - 2*b^4*Cosh[3*x] + 9*a^4*x*Sinh[x] - 3*a^4*x*Sinh[3*x]))
Time = 0.61 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {3042, 4892, 3042, 3170, 25, 3042, 25, 3340, 27, 3042, 3213}
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 \coth (x)+b \text {csch}(x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (i a \cot (i x)+i b \csc (i x))^4dx\) |
\(\Big \downarrow \) 4892 |
\(\displaystyle \int \text {csch}^4(x) (i a \cosh (x)+i b)^4dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (i b-i a \sin \left (-\frac {\pi }{2}+i x\right )\right )^4}{\cos \left (-\frac {\pi }{2}+i x\right )^4}dx\) |
\(\Big \downarrow \) 3170 |
\(\displaystyle -\frac {1}{3} \int -(b+a \cosh (x))^2 \left (3 a^2+b \cosh (x) a-2 b^2\right ) \text {csch}^2(x)dx-\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{3} \int (b+a \cosh (x))^2 \left (3 a^2+b \cosh (x) a-2 b^2\right ) \text {csch}^2(x)dx-\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))+\frac {1}{3} \int -\frac {\left (b-a \sin \left (i x-\frac {\pi }{2}\right )\right )^2 \left (3 a^2-b \sin \left (i x-\frac {\pi }{2}\right ) a-2 b^2\right )}{\cos \left (i x-\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))-\frac {1}{3} \int \frac {\left (b-a \sin \left (i x-\frac {\pi }{2}\right )\right )^2 \left (3 a^2-b \sin \left (i x-\frac {\pi }{2}\right ) a-2 b^2\right )}{\cos \left (i x-\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 3340 |
\(\displaystyle \frac {1}{3} \left (\int 2 (b+a \cosh (x)) \left (b a^2+\left (3 a^2-2 b^2\right ) \cosh (x) a\right )dx-\text {csch}(x) (a \cosh (x)+b)^2 \left (\left (3 a^2-2 b^2\right ) \cosh (x)+a b\right )\right )-\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} \left (2 \int (b+a \cosh (x)) \left (b a^2+\left (3 a^2-2 b^2\right ) \cosh (x) a\right )dx-\text {csch}(x) (a \cosh (x)+b)^2 \left (\left (3 a^2-2 b^2\right ) \cosh (x)+a b\right )\right )-\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))+\frac {1}{3} \left (-\text {csch}(x) (a \cosh (x)+b)^2 \left (\left (3 a^2-2 b^2\right ) \cosh (x)+a b\right )+2 \int \left (b+a \sin \left (i x+\frac {\pi }{2}\right )\right ) \left (b a^2+\left (3 a^2-2 b^2\right ) \sin \left (i x+\frac {\pi }{2}\right ) a\right )dx\right )\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {1}{3} \left (2 \left (\frac {3 a^4 x}{2}+2 a b \left (2 a^2-b^2\right ) \sinh (x)+\frac {1}{2} a^2 \left (3 a^2-2 b^2\right ) \sinh (x) \cosh (x)\right )-\text {csch}(x) (a \cosh (x)+b)^2 \left (\left (3 a^2-2 b^2\right ) \cosh (x)+a b\right )\right )-\frac {1}{3} \text {csch}^3(x) (a \cosh (x)+b)^3 (a+b \cosh (x))\) |
-1/3*((b + a*Cosh[x])^3*(a + b*Cosh[x])*Csch[x]^3) + (-((b + a*Cosh[x])^2* (a*b + (3*a^2 - 2*b^2)*Cosh[x])*Csch[x]) + 2*((3*a^4*x)/2 + 2*a*b*(2*a^2 - b^2)*Sinh[x] + (a^2*(3*a^2 - 2*b^2)*Cosh[x]*Sinh[x])/2))/3
3.7.45.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-(g*Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x ])^(m - 1)*((b + a*Sin[e + f*x])/(f*g*(p + 1))), x] + Simp[1/(g^2*(p + 1)) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(p + 2) + a*b*(m + p + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g }, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && (IntegersQ[2*m, 2* p] || IntegerQ[m])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(g* Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x])^m*((d + c*Sin[e + f*x])/(f*g*(p + 1))), x] + Simp[1/(g^2*(p + 1)) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Si n[e + f*x])^(m - 1)*Simp[a*c*(p + 2) + b*d*m + b*c*(m + p + 2)*Sin[e + f*x] , x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[a^2 - b^2, 0] && GtQ [m, 0] && LtQ[p, -1] && IntegerQ[2*m] && !(EqQ[m, 1] && NeQ[c^2 - d^2, 0] && SimplerQ[c + d*x, a + b*x])
Int[(cot[(c_.) + (d_.)*(x_)]^(n_.)*(a_.) + csc[(c_.) + (d_.)*(x_)]^(n_.)*(b _.))^(p_)*(u_.), x_Symbol] :> Int[ActivateTrig[u]*Csc[c + d*x]^(n*p)*(b + a *Cos[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Time = 20.29 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.83
method | result | size |
parts | \(a^{4} \left (-\frac {\coth \left (x \right )^{3}}{3}-\coth \left (x \right )-\frac {\ln \left (\coth \left (x \right )-1\right )}{2}+\frac {\ln \left (1+\coth \left (x \right )\right )}{2}\right )+b^{4} \left (\frac {2}{3}-\frac {\operatorname {csch}\left (x \right )^{2}}{3}\right ) \coth \left (x \right )-2 a^{2} b^{2} \coth \left (x \right )^{3}-\frac {4 b^{3} \operatorname {csch}\left (x \right )^{3} a}{3}+4 a^{3} b \left (-\frac {\operatorname {csch}\left (x \right )^{3}}{3}-\operatorname {csch}\left (x \right )\right )\) | \(84\) |
default | \(a^{4} \left (x -\coth \left (x \right )-\frac {\coth \left (x \right )^{3}}{3}\right )+4 a^{3} b \left (-\frac {\cosh \left (x \right )^{2}}{\sinh \left (x \right )^{3}}+\frac {2}{3 \sinh \left (x \right )^{3}}\right )+6 a^{2} b^{2} \left (-\frac {\cosh \left (x \right )}{2 \sinh \left (x \right )^{3}}-\frac {\left (\frac {2}{3}-\frac {\operatorname {csch}\left (x \right )^{2}}{3}\right ) \coth \left (x \right )}{2}\right )-\frac {4 a \,b^{3}}{3 \sinh \left (x \right )^{3}}+b^{4} \left (\frac {2}{3}-\frac {\operatorname {csch}\left (x \right )^{2}}{3}\right ) \coth \left (x \right )\) | \(94\) |
risch | \(x \,a^{4}-\frac {4 \left (6 a^{3} b \,{\mathrm e}^{5 x}+3 \,{\mathrm e}^{4 x} a^{4}+9 \,{\mathrm e}^{4 x} a^{2} b^{2}-4 a^{3} b \,{\mathrm e}^{3 x}+8 a \,b^{3} {\mathrm e}^{3 x}-3 \,{\mathrm e}^{2 x} a^{4}+3 \,{\mathrm e}^{2 x} b^{4}+6 a^{3} b \,{\mathrm e}^{x}+2 a^{4}+3 a^{2} b^{2}-b^{4}\right )}{3 \left ({\mathrm e}^{2 x}-1\right )^{3}}\) | \(113\) |
a^4*(-1/3*coth(x)^3-coth(x)-1/2*ln(coth(x)-1)+1/2*ln(1+coth(x)))+b^4*(2/3- 1/3*csch(x)^2)*coth(x)-2*a^2*b^2*coth(x)^3-4/3*b^3*csch(x)^3*a+4*a^3*b*(-1 /3*csch(x)^3-csch(x))
Leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (93) = 186\).
Time = 0.26 (sec) , antiderivative size = 209, normalized size of antiderivative = 2.07 \[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=-\frac {24 \, a^{3} b \cosh \left (x\right )^{2} - 8 \, a^{3} b + 16 \, a b^{3} + 2 \, {\left (2 \, a^{4} + 3 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{3} - {\left (3 \, a^{4} x + 4 \, a^{4} + 6 \, a^{2} b^{2} - 2 \, b^{4}\right )} \sinh \left (x\right )^{3} + 6 \, {\left (4 \, a^{3} b + {\left (2 \, a^{4} + 3 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + 6 \, {\left (3 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) + 3 \, {\left (3 \, a^{4} x + 4 \, a^{4} + 6 \, a^{2} b^{2} - 2 \, b^{4} - {\left (3 \, a^{4} x + 4 \, a^{4} + 6 \, a^{2} b^{2} - 2 \, b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )}{3 \, {\left (\sinh \left (x\right )^{3} + 3 \, {\left (\cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )\right )}} \]
-1/3*(24*a^3*b*cosh(x)^2 - 8*a^3*b + 16*a*b^3 + 2*(2*a^4 + 3*a^2*b^2 - b^4 )*cosh(x)^3 - (3*a^4*x + 4*a^4 + 6*a^2*b^2 - 2*b^4)*sinh(x)^3 + 6*(4*a^3*b + (2*a^4 + 3*a^2*b^2 - b^4)*cosh(x))*sinh(x)^2 + 6*(3*a^2*b^2 + b^4)*cosh (x) + 3*(3*a^4*x + 4*a^4 + 6*a^2*b^2 - 2*b^4 - (3*a^4*x + 4*a^4 + 6*a^2*b^ 2 - 2*b^4)*cosh(x)^2)*sinh(x))/(sinh(x)^3 + 3*(cosh(x)^2 - 1)*sinh(x))
\[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=\int \left (a \coth {\left (x \right )} + b \operatorname {csch}{\left (x \right )}\right )^{4}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 214 vs. \(2 (93) = 186\).
Time = 0.19 (sec) , antiderivative size = 214, normalized size of antiderivative = 2.12 \[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=-2 \, a^{2} b^{2} \coth \left (x\right )^{3} + \frac {1}{3} \, a^{4} {\left (3 \, x - \frac {4 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} - 2\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1}\right )} + \frac {8}{3} \, a^{3} b {\left (\frac {3 \, e^{\left (-x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1} - \frac {2 \, e^{\left (-3 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1} + \frac {3 \, e^{\left (-5 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1}\right )} + \frac {4}{3} \, b^{4} {\left (\frac {3 \, e^{\left (-2 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1} - \frac {1}{3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1}\right )} + \frac {32 \, a b^{3}}{3 \, {\left (e^{\left (-x\right )} - e^{x}\right )}^{3}} \]
-2*a^2*b^2*coth(x)^3 + 1/3*a^4*(3*x - 4*(3*e^(-2*x) - 3*e^(-4*x) - 2)/(3*e ^(-2*x) - 3*e^(-4*x) + e^(-6*x) - 1)) + 8/3*a^3*b*(3*e^(-x)/(3*e^(-2*x) - 3*e^(-4*x) + e^(-6*x) - 1) - 2*e^(-3*x)/(3*e^(-2*x) - 3*e^(-4*x) + e^(-6*x ) - 1) + 3*e^(-5*x)/(3*e^(-2*x) - 3*e^(-4*x) + e^(-6*x) - 1)) + 4/3*b^4*(3 *e^(-2*x)/(3*e^(-2*x) - 3*e^(-4*x) + e^(-6*x) - 1) - 1/(3*e^(-2*x) - 3*e^( -4*x) + e^(-6*x) - 1)) + 32/3*a*b^3/(e^(-x) - e^x)^3
Time = 0.26 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.11 \[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=a^{4} x - \frac {4 \, {\left (6 \, a^{3} b e^{\left (5 \, x\right )} + 3 \, a^{4} e^{\left (4 \, x\right )} + 9 \, a^{2} b^{2} e^{\left (4 \, x\right )} - 4 \, a^{3} b e^{\left (3 \, x\right )} + 8 \, a b^{3} e^{\left (3 \, x\right )} - 3 \, a^{4} e^{\left (2 \, x\right )} + 3 \, b^{4} e^{\left (2 \, x\right )} + 6 \, a^{3} b e^{x} + 2 \, a^{4} + 3 \, a^{2} b^{2} - b^{4}\right )}}{3 \, {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} \]
a^4*x - 4/3*(6*a^3*b*e^(5*x) + 3*a^4*e^(4*x) + 9*a^2*b^2*e^(4*x) - 4*a^3*b *e^(3*x) + 8*a*b^3*e^(3*x) - 3*a^4*e^(2*x) + 3*b^4*e^(2*x) + 6*a^3*b*e^x + 2*a^4 + 3*a^2*b^2 - b^4)/(e^(2*x) - 1)^3
Time = 2.42 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.45 \[ \int (a \coth (x)+b \text {csch}(x))^4 \, dx=a^4\,x-\frac {4\,a^4+8\,{\mathrm {e}}^x\,a^3\,b+12\,a^2\,b^2}{{\mathrm {e}}^{2\,x}-1}-\frac {{\mathrm {e}}^x\,\left (\frac {32\,a^3\,b}{3}+\frac {32\,a\,b^3}{3}\right )+4\,a^4+4\,b^4+24\,a^2\,b^2}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {{\mathrm {e}}^x\,\left (\frac {32\,a^3\,b}{3}+\frac {32\,a\,b^3}{3}\right )+\frac {8\,a^4}{3}+\frac {8\,b^4}{3}+16\,a^2\,b^2}{3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1} \]