Integrand size = 13, antiderivative size = 76 \[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=-\frac {b x}{a^2-b^2}+\frac {\left (a^2+b^2\right ) \log (\cosh (x))}{a^3}+\frac {b^4 \log (b \cosh (x)+a \sinh (x))}{a^3 \left (a^2-b^2\right )}+\frac {b \tanh (x)}{a^2}-\frac {\tanh ^2(x)}{2 a} \]
-b*x/(a^2-b^2)+(a^2+b^2)*ln(cosh(x))/a^3+b^4*ln(b*cosh(x)+a*sinh(x))/a^3/( a^2-b^2)+b*tanh(x)/a^2-1/2*tanh(x)^2/a
Time = 0.44 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.20 \[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=-\frac {\log (1-\coth (x))}{2 (a+b)}-\frac {\log (1+\coth (x))}{2 (a-b)}+\frac {b^4 \log (a+b \coth (x))}{a^3 \left (a^2-b^2\right )}-\frac {\left (a^2+b^2\right ) \log (\tanh (x))}{a^3}+\frac {b \tanh (x)}{a^2}-\frac {\tanh ^2(x)}{2 a} \]
-1/2*Log[1 - Coth[x]]/(a + b) - Log[1 + Coth[x]]/(2*(a - b)) + (b^4*Log[a + b*Coth[x]])/(a^3*(a^2 - b^2)) - ((a^2 + b^2)*Log[Tanh[x]])/a^3 + (b*Tanh [x])/a^2 - Tanh[x]^2/(2*a)
Result contains complex when optimal does not.
Time = 0.79 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.43, number of steps used = 16, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.231, Rules used = {3042, 26, 4052, 27, 3042, 25, 4132, 25, 3042, 26, 4135, 26, 3042, 26, 3956, 4013}
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 \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i}{\tan \left (\frac {\pi }{2}+i x\right )^3 \left (a-i b \tan \left (\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {1}{\tan \left (i x+\frac {\pi }{2}\right )^3 \left (a-i b \tan \left (i x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 4052 |
\(\displaystyle -i \left (-\frac {\int \frac {2 i \left (-b \coth ^2(x)-a \coth (x)+b\right ) \tanh ^2(x)}{a+b \coth (x)}dx}{2 a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -i \left (-\frac {i \int \frac {\left (-b \coth ^2(x)-a \coth (x)+b\right ) \tanh ^2(x)}{a+b \coth (x)}dx}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (-\frac {i \int -\frac {b \tan \left (i x+\frac {\pi }{2}\right )^2+i a \tan \left (i x+\frac {\pi }{2}\right )+b}{\tan \left (i x+\frac {\pi }{2}\right )^2 \left (a-i b \tan \left (i x+\frac {\pi }{2}\right )\right )}dx}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -i \left (\frac {i \int \frac {b \tan \left (i x+\frac {\pi }{2}\right )^2+i a \tan \left (i x+\frac {\pi }{2}\right )+b}{\tan \left (i x+\frac {\pi }{2}\right )^2 \left (a-i b \tan \left (i x+\frac {\pi }{2}\right )\right )}dx}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 4132 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}-\frac {\int -\frac {\left (a^2+b^2-b^2 \coth ^2(x)\right ) \tanh (x)}{a+b \coth (x)}dx}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -i \left (\frac {i \left (\frac {\int \frac {\left (a^2+b^2-b^2 \coth ^2(x)\right ) \tanh (x)}{a+b \coth (x)}dx}{a}+\frac {b \tanh (x)}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {\int \frac {i \left (a^2+b^2+b^2 \tan \left (i x+\frac {\pi }{2}\right )^2\right )}{\tan \left (i x+\frac {\pi }{2}\right ) \left (a-i b \tan \left (i x+\frac {\pi }{2}\right )\right )}dx}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \int \frac {a^2+b^2+b^2 \tan \left (i x+\frac {\pi }{2}\right )^2}{\tan \left (i x+\frac {\pi }{2}\right ) \left (a-i b \tan \left (i x+\frac {\pi }{2}\right )\right )}dx}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 4135 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \left (\frac {\left (a^2+b^2\right ) \int -i \tanh (x)dx}{a}+\frac {b^4 \int -\frac {i (b+a \coth (x))}{a+b \coth (x)}dx}{a \left (a^2-b^2\right )}+\frac {i a^2 b x}{a^2-b^2}\right )}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \left (-\frac {i \left (a^2+b^2\right ) \int \tanh (x)dx}{a}-\frac {i b^4 \int \frac {b+a \coth (x)}{a+b \coth (x)}dx}{a \left (a^2-b^2\right )}+\frac {i a^2 b x}{a^2-b^2}\right )}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \left (-\frac {i \left (a^2+b^2\right ) \int -i \tan (i x)dx}{a}-\frac {i b^4 \int \frac {b-i a \tan \left (i x+\frac {\pi }{2}\right )}{a-i b \tan \left (i x+\frac {\pi }{2}\right )}dx}{a \left (a^2-b^2\right )}+\frac {i a^2 b x}{a^2-b^2}\right )}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \left (-\frac {\left (a^2+b^2\right ) \int \tan (i x)dx}{a}-\frac {i b^4 \int \frac {b-i a \tan \left (i x+\frac {\pi }{2}\right )}{a-i b \tan \left (i x+\frac {\pi }{2}\right )}dx}{a \left (a^2-b^2\right )}+\frac {i a^2 b x}{a^2-b^2}\right )}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \left (-\frac {i b^4 \int \frac {b-i a \tan \left (i x+\frac {\pi }{2}\right )}{a-i b \tan \left (i x+\frac {\pi }{2}\right )}dx}{a \left (a^2-b^2\right )}+\frac {i a^2 b x}{a^2-b^2}-\frac {i \left (a^2+b^2\right ) \log (\cosh (x))}{a}\right )}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
\(\Big \downarrow \) 4013 |
\(\displaystyle -i \left (\frac {i \left (\frac {b \tanh (x)}{a}+\frac {i \left (\frac {i a^2 b x}{a^2-b^2}-\frac {i \left (a^2+b^2\right ) \log (\cosh (x))}{a}-\frac {i b^4 \log (a \sinh (x)+b \cosh (x))}{a \left (a^2-b^2\right )}\right )}{a}\right )}{a}-\frac {i \tanh ^2(x)}{2 a}\right )\) |
(-I)*(((-1/2*I)*Tanh[x]^2)/a + (I*((I*((I*a^2*b*x)/(a^2 - b^2) - (I*(a^2 + b^2)*Log[Cosh[x]])/a - (I*b^4*Log[b*Cosh[x] + a*Sinh[x]])/(a*(a^2 - b^2)) ))/a + (b*Tanh[x])/a))/a)
3.2.41.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[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)* (x_)]), x_Symbol] :> Simp[(c/(b*f))*Log[RemoveContent[a*Cos[e + f*x] + b*Si n[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] && EqQ[a*c + b*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m + 1)*((c + d*Tan[e + f*x])^(n + 1)/(f*(m + 1)*(a^2 + b^2)*(b*c - a*d))), x] + Simp[1 /((m + 1)*(a^2 + b^2)*(b*c - a*d)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[a*(b*c - a*d)*(m + 1) - b^2*d*(m + n + 2) - b*(b*c - a*d)*(m + 1)*Tan[e + f*x] - b^2*d*(m + n + 2)*Tan[e + f*x]^2, x], x], x] / ; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && LtQ[m, -1] && (LtQ[n, 0] || Integ erQ[m]) && !(ILtQ[n, -1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b^2 - a*(b*B - a*C))*(a + b*Tan[e + f*x])^(m + 1)*((c + d*Tan[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 + b^2))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^2 + b^2)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(a*(b*c - a*d)*(m + 1) - b^2*d* (m + n + 2)) + (b*B - a*C)*(b*c*(m + 1) + a*d*(n + 1)) - (m + 1)*(b*c - a*d )*(A*b - a*B - b*C)*Tan[e + f*x] - d*(A*b^2 - a*(b*B - a*C))*(m + n + 2)*Ta n[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ [b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, -1] && !(ILtQ[n, -1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
Int[((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/(((a_) + (b_.)*tan[(e_.) + (f _.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(a*( A*c - c*C) - b*(A*d - C*d))*(x/((a^2 + b^2)*(c^2 + d^2))), x] + (Simp[(A*b^ 2 + a^2*C)/((b*c - a*d)*(a^2 + b^2)) Int[(b - a*Tan[e + f*x])/(a + b*Tan[ e + f*x]), x], x] - Simp[(c^2*C + A*d^2)/((b*c - a*d)*(c^2 + d^2)) Int[(d - c*Tan[e + f*x])/(c + d*Tan[e + f*x]), x], x]) /; FreeQ[{a, b, c, d, e, f , A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
Time = 0.18 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.03
method | result | size |
parallelrisch | \(\frac {2 b^{4} \ln \left (b +a \tanh \left (x \right )\right )-2 \left (a^{3} \ln \left (1-\tanh \left (x \right )\right )+\left (\frac {a \left (a -b \right ) \tanh \left (x \right )^{2}}{2}-b \left (a -b \right ) \tanh \left (x \right )+a^{2} x \right ) \left (a +b \right )\right ) a}{2 a^{5}-2 a^{3} b^{2}}\) | \(78\) |
derivativedivides | \(-\frac {\ln \left (\coth \left (x \right )-1\right )}{2 a +2 b}+\frac {b^{4} \ln \left (a +b \coth \left (x \right )\right )}{a^{3} \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (1+\coth \left (x \right )\right )}{2 a -2 b}+\frac {b}{a^{2} \coth \left (x \right )}-\frac {\left (-a^{2}-b^{2}\right ) \ln \left (\coth \left (x \right )\right )}{a^{3}}-\frac {1}{2 a \coth \left (x \right )^{2}}\) | \(97\) |
default | \(-\frac {\ln \left (\coth \left (x \right )-1\right )}{2 a +2 b}+\frac {b^{4} \ln \left (a +b \coth \left (x \right )\right )}{a^{3} \left (a +b \right ) \left (a -b \right )}-\frac {\ln \left (1+\coth \left (x \right )\right )}{2 a -2 b}+\frac {b}{a^{2} \coth \left (x \right )}-\frac {\left (-a^{2}-b^{2}\right ) \ln \left (\coth \left (x \right )\right )}{a^{3}}-\frac {1}{2 a \coth \left (x \right )^{2}}\) | \(97\) |
risch | \(\frac {x}{a +b}-\frac {2 x}{a}-\frac {2 x \,b^{2}}{a^{3}}-\frac {2 x \,b^{4}}{a^{3} \left (a^{2}-b^{2}\right )}+\frac {2 a \,{\mathrm e}^{2 x}-2 b \,{\mathrm e}^{2 x}-2 b}{\left (1+{\mathrm e}^{2 x}\right )^{2} a^{2}}+\frac {b^{4} \ln \left ({\mathrm e}^{2 x}-\frac {a -b}{a +b}\right )}{a^{3} \left (a^{2}-b^{2}\right )}+\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{a}+\frac {\ln \left (1+{\mathrm e}^{2 x}\right ) b^{2}}{a^{3}}\) | \(135\) |
(2*b^4*ln(b+a*tanh(x))-2*(a^3*ln(1-tanh(x))+(1/2*a*(a-b)*tanh(x)^2-b*(a-b) *tanh(x)+a^2*x)*(a+b))*a)/(2*a^5-2*a^3*b^2)
Leaf count of result is larger than twice the leaf count of optimal. 637 vs. \(2 (74) = 148\).
Time = 0.28 (sec) , antiderivative size = 637, normalized size of antiderivative = 8.38 \[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=-\frac {{\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right )^{4} + 4 \, {\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{4} + a^{3} b\right )} x \sinh \left (x\right )^{4} + 2 \, a^{3} b - 2 \, a b^{3} - 2 \, {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3} - {\left (a^{4} + a^{3} b\right )} x\right )} \cosh \left (x\right )^{2} - 2 \, {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3} - 3 \, {\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right )^{2} - {\left (a^{4} + a^{3} b\right )} x\right )} \sinh \left (x\right )^{2} + {\left (a^{4} + a^{3} b\right )} x - {\left (b^{4} \cosh \left (x\right )^{4} + 4 \, b^{4} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{4} \sinh \left (x\right )^{4} + 2 \, b^{4} \cosh \left (x\right )^{2} + b^{4} + 2 \, {\left (3 \, b^{4} \cosh \left (x\right )^{2} + b^{4}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b^{4} \cosh \left (x\right )^{3} + b^{4} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + a \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left ({\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{4} - b^{4}\right )} \sinh \left (x\right )^{4} + a^{4} - b^{4} + 2 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{4} - b^{4} + 3 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a^{4} - b^{4}\right )} \cosh \left (x\right )^{3} + {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \, {\left ({\left (a^{4} + a^{3} b\right )} x \cosh \left (x\right )^{3} - {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3} - {\left (a^{4} + a^{3} b\right )} x\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{a^{5} - a^{3} b^{2} + {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{5} - a^{3} b^{2}\right )} \sinh \left (x\right )^{4} + 2 \, {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{5} - a^{3} b^{2} + 3 \, {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{5} - a^{3} b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \]
-((a^4 + a^3*b)*x*cosh(x)^4 + 4*(a^4 + a^3*b)*x*cosh(x)*sinh(x)^3 + (a^4 + a^3*b)*x*sinh(x)^4 + 2*a^3*b - 2*a*b^3 - 2*(a^4 - a^3*b - a^2*b^2 + a*b^3 - (a^4 + a^3*b)*x)*cosh(x)^2 - 2*(a^4 - a^3*b - a^2*b^2 + a*b^3 - 3*(a^4 + a^3*b)*x*cosh(x)^2 - (a^4 + a^3*b)*x)*sinh(x)^2 + (a^4 + a^3*b)*x - (b^4 *cosh(x)^4 + 4*b^4*cosh(x)*sinh(x)^3 + b^4*sinh(x)^4 + 2*b^4*cosh(x)^2 + b ^4 + 2*(3*b^4*cosh(x)^2 + b^4)*sinh(x)^2 + 4*(b^4*cosh(x)^3 + b^4*cosh(x)) *sinh(x))*log(2*(b*cosh(x) + a*sinh(x))/(cosh(x) - sinh(x))) - ((a^4 - b^4 )*cosh(x)^4 + 4*(a^4 - b^4)*cosh(x)*sinh(x)^3 + (a^4 - b^4)*sinh(x)^4 + a^ 4 - b^4 + 2*(a^4 - b^4)*cosh(x)^2 + 2*(a^4 - b^4 + 3*(a^4 - b^4)*cosh(x)^2 )*sinh(x)^2 + 4*((a^4 - b^4)*cosh(x)^3 + (a^4 - b^4)*cosh(x))*sinh(x))*log (2*cosh(x)/(cosh(x) - sinh(x))) + 4*((a^4 + a^3*b)*x*cosh(x)^3 - (a^4 - a^ 3*b - a^2*b^2 + a*b^3 - (a^4 + a^3*b)*x)*cosh(x))*sinh(x))/(a^5 - a^3*b^2 + (a^5 - a^3*b^2)*cosh(x)^4 + 4*(a^5 - a^3*b^2)*cosh(x)*sinh(x)^3 + (a^5 - a^3*b^2)*sinh(x)^4 + 2*(a^5 - a^3*b^2)*cosh(x)^2 + 2*(a^5 - a^3*b^2 + 3*( a^5 - a^3*b^2)*cosh(x)^2)*sinh(x)^2 + 4*((a^5 - a^3*b^2)*cosh(x)^3 + (a^5 - a^3*b^2)*cosh(x))*sinh(x))
\[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=\int \frac {\tanh ^{3}{\left (x \right )}}{a + b \coth {\left (x \right )}}\, dx \]
Time = 0.27 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.24 \[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=\frac {b^{4} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{5} - a^{3} b^{2}} + \frac {2 \, {\left ({\left (a + b\right )} e^{\left (-2 \, x\right )} + b\right )}}{2 \, a^{2} e^{\left (-2 \, x\right )} + a^{2} e^{\left (-4 \, x\right )} + a^{2}} + \frac {x}{a + b} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{3}} \]
b^4*log(-(a - b)*e^(-2*x) + a + b)/(a^5 - a^3*b^2) + 2*((a + b)*e^(-2*x) + b)/(2*a^2*e^(-2*x) + a^2*e^(-4*x) + a^2) + x/(a + b) + (a^2 + b^2)*log(e^ (-2*x) + 1)/a^3
Time = 0.27 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.28 \[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=\frac {b^{4} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{5} - a^{3} b^{2}} - \frac {x}{a - b} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (e^{\left (2 \, x\right )} + 1\right )}{a^{3}} - \frac {2 \, {\left (a b - {\left (a^{2} - a b\right )} e^{\left (2 \, x\right )}\right )}}{a^{3} {\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \]
b^4*log(abs(a*e^(2*x) + b*e^(2*x) - a + b))/(a^5 - a^3*b^2) - x/(a - b) + (a^2 + b^2)*log(e^(2*x) + 1)/a^3 - 2*(a*b - (a^2 - a*b)*e^(2*x))/(a^3*(e^( 2*x) + 1)^2)
Time = 2.27 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.46 \[ \int \frac {\tanh ^3(x)}{a+b \coth (x)} \, dx=\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )\,\left (a^2+b^2\right )}{a^3}-\frac {x}{a-b}-\frac {2}{a\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}+\frac {b^4\,\ln \left (b-a+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^5-a^3\,b^2}+\frac {2\,\left (a^2-b^2\right )}{a^2\,\left (a+b\right )\,\left ({\mathrm {e}}^{2\,x}+1\right )} \]