Optimal. Leaf size=53 \[ -\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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4344, 43} \[ \frac {b \coth (x) (b c-a d)}{d^2}-\frac {(b c-a d)^2 \log (c+d \coth (x))}{d^3}-\frac {(a+b \coth (x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 4344
Rubi steps
\begin {align*} \int \frac {(a+b \coth (x))^2 \text {csch}^2(x)}{c+d \coth (x)} \, dx &=-\operatorname {Subst}\left (\int \frac {(a+b x)^2}{c+d x} \, dx,x,\coth (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (-\frac {b (b c-a d)}{d^2}+\frac {b (a+b x)}{d}+\frac {(-b c+a d)^2}{d^2 (c+d x)}\right ) \, dx,x,\coth (x)\right )\\ &=\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}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.53, size = 62, normalized size = 1.17 \[ \frac {2 b d \coth (x) (b c-2 a d)+2 (b c-a d)^2 (\log (\sinh (x))-\log (c \sinh (x)+d \cosh (x)))-b^2 d^2 \text {csch}^2(x)}{2 d^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.49, size = 694, normalized size = 13.09 \[ -\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 \relax (x)^{2} - 4 \, {\left (b^{2} c d - {\left (2 \, a b + b^{2}\right )} d^{2}\right )} \cosh \relax (x) \sinh \relax (x) - 2 \, {\left (b^{2} c d - {\left (2 \, a b + b^{2}\right )} d^{2}\right )} \sinh \relax (x)^{2} + {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x)^{4} + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x) \sinh \relax (x)^{3} + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sinh \relax (x)^{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 \relax (x)^{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 \relax (x)^{2}\right )} \sinh \relax (x)^{2} + 4 \, {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x)^{3} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x)\right )} \log \left (\frac {2 \, {\left (d \cosh \relax (x) + c \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x)^{4} + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x) \sinh \relax (x)^{3} + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sinh \relax (x)^{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 \relax (x)^{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 \relax (x)^{2}\right )} \sinh \relax (x)^{2} + 4 \, {\left ({\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x)^{3} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x)\right )} \log \left (\frac {2 \, \sinh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{d^{3} \cosh \relax (x)^{4} + 4 \, d^{3} \cosh \relax (x) \sinh \relax (x)^{3} + d^{3} \sinh \relax (x)^{4} - 2 \, d^{3} \cosh \relax (x)^{2} + d^{3} + 2 \, {\left (3 \, d^{3} \cosh \relax (x)^{2} - d^{3}\right )} \sinh \relax (x)^{2} + 4 \, {\left (d^{3} \cosh \relax (x)^{3} - d^{3} \cosh \relax (x)\right )} \sinh \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 265, normalized size = 5.00 \[ -\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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.23, size = 203, normalized size = 3.83 \[ -\frac {b^{2} \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{8 d}-\frac {b a \tanh \left (\frac {x}{2}\right )}{d}+\frac {b^{2} \tanh \left (\frac {x}{2}\right ) c}{2 d^{2}}-\frac {\ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) d +2 c \tanh \left (\frac {x}{2}\right )+d \right ) a^{2}}{d}+\frac {2 \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) d +2 c \tanh \left (\frac {x}{2}\right )+d \right ) c b a}{d^{2}}-\frac {\ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) d +2 c \tanh \left (\frac {x}{2}\right )+d \right ) c^{2} b^{2}}{d^{3}}-\frac {b^{2}}{8 d \tanh \left (\frac {x}{2}\right )^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) a^{2}}{d}-\frac {2 \ln \left (\tanh \left (\frac {x}{2}\right )\right ) c b a}{d^{2}}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right ) c^{2} b^{2}}{d^{3}}-\frac {b a}{d \tanh \left (\frac {x}{2}\right )}+\frac {b^{2} c}{2 d^{2} \tanh \left (\frac {x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.33, size = 177, normalized size = 3.34 \[ 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 \relax (x) + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.16, size = 107, normalized size = 2.02 \[ \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 )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \coth {\relax (x )}\right )^{2} \operatorname {csch}^{2}{\relax (x )}}{c + d \coth {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________