Integrand size = 21, antiderivative size = 53 \[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=\frac {b (b c-a d) \coth (x)}{d^2}-\frac {(a+b \coth (x))^2}{2 d}-\frac {(b c-a d)^2 \log (c+d \coth (x))}{d^3} \]
Time = 3.51 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.17 \[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=\frac {2 b d (b c-2 a d) \coth (x)-b^2 d^2 \text {csch}^2(x)+2 (b c-a d)^2 (\log (\sinh (x))-\log (d \cosh (x)+c \sinh (x)))}{2 d^3} \]
(2*b*d*(b*c - 2*a*d)*Coth[x] - b^2*d^2*Csch[x]^2 + 2*(b*c - a*d)^2*(Log[Si nh[x]] - Log[d*Cosh[x] + c*Sinh[x]]))/(2*d^3)
Time = 0.36 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 25, 4844, 49, 2009}
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 {\text {csch}^2(x) (a+b \coth (x))^2}{c+d \coth (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\csc (i x)^2 (a+i b \cot (i x))^2}{c+i d \cot (i x)}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {(a+i b \cot (i x))^2 \csc (i x)^2}{c+i d \cot (i x)}dx\) |
\(\Big \downarrow \) 4844 |
\(\displaystyle -\int \frac {(a+b \coth (x))^2}{c+d \coth (x)}d\coth (x)\) |
\(\Big \downarrow \) 49 |
\(\displaystyle -\int \left (\frac {(a d-b c)^2}{d^2 (c+d \coth (x))}-\frac {b (b c-a d)}{d^2}+\frac {b (a+b \coth (x))}{d}\right )d\coth (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {(b c-a d)^2 \log (c+d \coth (x))}{d^3}+\frac {b \coth (x) (b c-a d)}{d^2}-\frac {(a+b \coth (x))^2}{2 d}\) |
(b*(b*c - a*d)*Coth[x])/d^2 - (a + b*Coth[x])^2/(2*d) - ((b*c - a*d)^2*Log [c + d*Coth[x]])/d^3
3.11.24.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^2, x_Symbol] :> With[{d = FreeFac tors[Cot[c*(a + b*x)], x]}, Simp[-d/(b*c) Subst[Int[SubstFor[1, Cot[c*(a + b*x)]/d, u, x], x], x, Cot[c*(a + b*x)]/d], x] /; FunctionOfQ[Cot[c*(a + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && NonsumQ[u] && (EqQ[F, Csc] || EqQ[F, csc])
Time = 0.83 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.17
method | result | size |
derivativedivides | \(-\frac {b \left (\frac {b \coth \left (x \right )^{2} d}{2}+2 \coth \left (x \right ) a d -\coth \left (x \right ) b c \right )}{d^{2}}-\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \ln \left (c +d \coth \left (x \right )\right )}{d^{3}}\) | \(62\) |
default | \(-\frac {b \left (\frac {b \coth \left (x \right )^{2} d}{2}+2 \coth \left (x \right ) a d -\coth \left (x \right ) b c \right )}{d^{2}}-\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \ln \left (c +d \coth \left (x \right )\right )}{d^{3}}\) | \(62\) |
risch | \(-\frac {2 b \left (2 a d \,{\mathrm e}^{2 x}-b c \,{\mathrm e}^{2 x}+b d \,{\mathrm e}^{2 x}-2 a d +b c \right )}{\left ({\mathrm e}^{2 x}-1\right )^{2} d^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}-1\right ) a^{2}}{d}-\frac {2 \ln \left ({\mathrm e}^{2 x}-1\right ) a b c}{d^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}-1\right ) b^{2} c^{2}}{d^{3}}-\frac {\ln \left ({\mathrm e}^{2 x}-\frac {c -d}{c +d}\right ) a^{2}}{d}+\frac {2 \ln \left ({\mathrm e}^{2 x}-\frac {c -d}{c +d}\right ) a b c}{d^{2}}-\frac {\ln \left ({\mathrm e}^{2 x}-\frac {c -d}{c +d}\right ) b^{2} c^{2}}{d^{3}}\) | \(174\) |
-b/d^2*(1/2*b*coth(x)^2*d+2*coth(x)*a*d-coth(x)*b*c)-(a^2*d^2-2*a*b*c*d+b^ 2*c^2)/d^3*ln(c+d*coth(x))
Leaf count of result is larger than twice the leaf count of optimal. 694 vs. \(2 (51) = 102\).
Time = 0.29 (sec) , antiderivative size = 694, normalized size of antiderivative = 13.09 \[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=-\frac {2 \, b^{2} c d - 4 \, a b d^{2} - 2 \, {\left (b^{2} c d - {\left (2 \, a b + b^{2}\right )} d^{2}\right )} \cosh \left (x\right )^{2} - 4 \, {\left (b^{2} c d - {\left (2 \, a b + b^{2}\right )} d^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) - 2 \, {\left (b^{2} c d - {\left (2 \, a b + b^{2}\right )} d^{2}\right )} \sinh \left (x\right )^{2} + {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sinh \left (x\right )^{4} + b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2} - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2} - 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{3} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (d \cosh \left (x\right ) + c \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sinh \left (x\right )^{4} + b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2} - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2} - 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )^{3} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{d^{3} \cosh \left (x\right )^{4} + 4 \, d^{3} \cosh \left (x\right ) \sinh \left (x\right )^{3} + d^{3} \sinh \left (x\right )^{4} - 2 \, d^{3} \cosh \left (x\right )^{2} + d^{3} + 2 \, {\left (3 \, d^{3} \cosh \left (x\right )^{2} - d^{3}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (d^{3} \cosh \left (x\right )^{3} - d^{3} \cosh \left (x\right )\right )} \sinh \left (x\right )} \]
-(2*b^2*c*d - 4*a*b*d^2 - 2*(b^2*c*d - (2*a*b + b^2)*d^2)*cosh(x)^2 - 4*(b ^2*c*d - (2*a*b + b^2)*d^2)*cosh(x)*sinh(x) - 2*(b^2*c*d - (2*a*b + b^2)*d ^2)*sinh(x)^2 + ((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x)^4 + 4*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x)*sinh(x)^3 + (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*s inh(x)^4 + b^2*c^2 - 2*a*b*c*d + a^2*d^2 - 2*(b^2*c^2 - 2*a*b*c*d + a^2*d^ 2)*cosh(x)^2 - 2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2 - 3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x)^2)*sinh(x)^2 + 4*((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x )^3 - (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x))*sinh(x))*log(2*(d*cosh(x) + c*sinh(x))/(cosh(x) - sinh(x))) - ((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x )^4 + 4*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x)*sinh(x)^3 + (b^2*c^2 - 2*a *b*c*d + a^2*d^2)*sinh(x)^4 + b^2*c^2 - 2*a*b*c*d + a^2*d^2 - 2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x)^2 - 2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2 - 3*(b^ 2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x)^2)*sinh(x)^2 + 4*((b^2*c^2 - 2*a*b*c* d + a^2*d^2)*cosh(x)^3 - (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*cosh(x))*sinh(x)) *log(2*sinh(x)/(cosh(x) - sinh(x))))/(d^3*cosh(x)^4 + 4*d^3*cosh(x)*sinh(x )^3 + d^3*sinh(x)^4 - 2*d^3*cosh(x)^2 + d^3 + 2*(3*d^3*cosh(x)^2 - d^3)*si nh(x)^2 + 4*(d^3*cosh(x)^3 - d^3*cosh(x))*sinh(x))
\[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=\int \frac {\left (a + b \coth {\left (x \right )}\right )^{2} \operatorname {csch}^{2}{\left (x \right )}}{c + d \coth {\left (x \right )}}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 177 vs. \(2 (51) = 102\).
Time = 0.20 (sec) , antiderivative size = 177, normalized size of antiderivative = 3.34 \[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=b^{2} {\left (\frac {2 \, {\left ({\left (c + d\right )} e^{\left (-2 \, x\right )} - c\right )}}{2 \, d^{2} e^{\left (-2 \, x\right )} - d^{2} e^{\left (-4 \, x\right )} - d^{2}} - \frac {c^{2} \log \left (-{\left (c - d\right )} e^{\left (-2 \, x\right )} + c + d\right )}{d^{3}} + \frac {c^{2} \log \left (e^{\left (-x\right )} + 1\right )}{d^{3}} + \frac {c^{2} \log \left (e^{\left (-x\right )} - 1\right )}{d^{3}}\right )} + 2 \, a b {\left (\frac {c \log \left (-{\left (c - d\right )} e^{\left (-2 \, x\right )} + c + d\right )}{d^{2}} - \frac {c \log \left (e^{\left (-x\right )} + 1\right )}{d^{2}} - \frac {c \log \left (e^{\left (-x\right )} - 1\right )}{d^{2}} + \frac {2}{d e^{\left (-2 \, x\right )} - d}\right )} - \frac {a^{2} \log \left (d \coth \left (x\right ) + c\right )}{d} \]
b^2*(2*((c + d)*e^(-2*x) - c)/(2*d^2*e^(-2*x) - d^2*e^(-4*x) - d^2) - c^2* log(-(c - d)*e^(-2*x) + c + d)/d^3 + c^2*log(e^(-x) + 1)/d^3 + c^2*log(e^( -x) - 1)/d^3) + 2*a*b*(c*log(-(c - d)*e^(-2*x) + c + d)/d^2 - c*log(e^(-x) + 1)/d^2 - c*log(e^(-x) - 1)/d^2 + 2/(d*e^(-2*x) - d)) - a^2*log(d*coth(x ) + c)/d
Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (51) = 102\).
Time = 0.28 (sec) , antiderivative size = 265, normalized size of antiderivative = 5.00 \[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=-\frac {{\left (b^{2} c^{3} - 2 \, a b c^{2} d + b^{2} c^{2} d + a^{2} c d^{2} - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \log \left ({\left | c e^{\left (2 \, x\right )} + d e^{\left (2 \, x\right )} - c + d \right |}\right )}{c d^{3} + d^{4}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right )}{d^{3}} - \frac {3 \, b^{2} c^{2} e^{\left (4 \, x\right )} - 6 \, a b c d e^{\left (4 \, x\right )} + 3 \, a^{2} d^{2} e^{\left (4 \, x\right )} - 6 \, b^{2} c^{2} e^{\left (2 \, x\right )} + 12 \, a b c d e^{\left (2 \, x\right )} - 4 \, b^{2} c d e^{\left (2 \, x\right )} - 6 \, a^{2} d^{2} e^{\left (2 \, x\right )} + 8 \, a b d^{2} e^{\left (2 \, x\right )} + 4 \, b^{2} d^{2} e^{\left (2 \, x\right )} + 3 \, b^{2} c^{2} - 6 \, a b c d + 4 \, b^{2} c d + 3 \, a^{2} d^{2} - 8 \, a b d^{2}}{2 \, d^{3} {\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} \]
-(b^2*c^3 - 2*a*b*c^2*d + b^2*c^2*d + a^2*c*d^2 - 2*a*b*c*d^2 + a^2*d^3)*l og(abs(c*e^(2*x) + d*e^(2*x) - c + d))/(c*d^3 + d^4) + (b^2*c^2 - 2*a*b*c* d + a^2*d^2)*log(abs(e^(2*x) - 1))/d^3 - 1/2*(3*b^2*c^2*e^(4*x) - 6*a*b*c* d*e^(4*x) + 3*a^2*d^2*e^(4*x) - 6*b^2*c^2*e^(2*x) + 12*a*b*c*d*e^(2*x) - 4 *b^2*c*d*e^(2*x) - 6*a^2*d^2*e^(2*x) + 8*a*b*d^2*e^(2*x) + 4*b^2*d^2*e^(2* x) + 3*b^2*c^2 - 6*a*b*c*d + 4*b^2*c*d + 3*a^2*d^2 - 8*a*b*d^2)/(d^3*(e^(2 *x) - 1)^2)
Time = 2.76 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.02 \[ \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx=\frac {\ln \left ({\mathrm {e}}^{2\,x}-1\right )\,{\left (a\,d-b\,c\right )}^2}{d^3}-\frac {\ln \left (d-c+d\,{\mathrm {e}}^{2\,x}+c\,{\mathrm {e}}^{2\,x}\right )\,{\left (a\,d-b\,c\right )}^2}{d^3}-\frac {2\,\left (b^2\,d-b^2\,c+2\,a\,b\,d\right )}{d^2\,\left ({\mathrm {e}}^{2\,x}-1\right )}-\frac {2\,b^2}{d\,\left ({\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1\right )} \]