Optimal. Leaf size=38 \[ x \left (a^2+b^2\right )+\frac {2 a b \log (\sinh (c+d x))}{d}-\frac {b^2 \coth (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3477, 3475} \[ x \left (a^2+b^2\right )+\frac {2 a b \log (\sinh (c+d x))}{d}-\frac {b^2 \coth (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3477
Rubi steps
\begin {align*} \int (a+b \coth (c+d x))^2 \, dx &=\left (a^2+b^2\right ) x-\frac {b^2 \coth (c+d x)}{d}+(2 a b) \int \coth (c+d x) \, dx\\ &=\left (a^2+b^2\right ) x-\frac {b^2 \coth (c+d x)}{d}+\frac {2 a b \log (\sinh (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 65, normalized size = 1.71 \[ \frac {(a-b)^2 \log (\tanh (c+d x)+1)-(a+b)^2 \log (1-\tanh (c+d x))+4 a b \log (\tanh (c+d x))-2 b^2 \coth (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.41, size = 205, normalized size = 5.39 \[ \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} d x \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} d x \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{2} - 2 \, a b + b^{2}\right )} d x \sinh \left (d x + c\right )^{2} - {\left (a^{2} - 2 \, a b + b^{2}\right )} d x - 2 \, b^{2} + 2 \, {\left (a b \cosh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a b \sinh \left (d x + c\right )^{2} - a b\right )} \log \left (\frac {2 \, \sinh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{d \cosh \left (d x + c\right )^{2} + 2 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + d \sinh \left (d x + c\right )^{2} - d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 57, normalized size = 1.50 \[ \frac {2 \, a b \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right ) + {\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, b^{2}}{e^{\left (2 \, d x + 2 \, c\right )} - 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 116, normalized size = 3.05 \[ -\frac {b^{2} \coth \left (d x +c \right )}{d}-\frac {\ln \left (\coth \left (d x +c \right )-1\right ) a^{2}}{2 d}-\frac {\ln \left (\coth \left (d x +c \right )-1\right ) a b}{d}-\frac {\ln \left (\coth \left (d x +c \right )-1\right ) b^{2}}{2 d}+\frac {\ln \left (\coth \left (d x +c \right )+1\right ) a^{2}}{2 d}-\frac {\ln \left (\coth \left (d x +c \right )+1\right ) a b}{d}+\frac {\ln \left (\coth \left (d x +c \right )+1\right ) b^{2}}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 49, normalized size = 1.29 \[ b^{2} {\left (x + \frac {c}{d} + \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} + a^{2} x + \frac {2 \, a b \log \left (\sinh \left (d x + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.10, size = 51, normalized size = 1.34 \[ x\,{\left (a-b\right )}^2-\frac {2\,b^2}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}+\frac {2\,a\,b\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-1\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.36, size = 104, normalized size = 2.74 \[ \begin {cases} a^{2} x + \tilde {\infty } a b x + \tilde {\infty } b^{2} x & \text {for}\: c = \log {\left (- e^{- d x} \right )} \vee c = \log {\left (e^{- d x} \right )} \\x \left (a + b \coth {\relax (c )}\right )^{2} & \text {for}\: d = 0 \\a^{2} x + 2 a b x - \frac {2 a b \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + \frac {2 a b \log {\left (\tanh {\left (c + d x \right )} \right )}}{d} + b^{2} x - \frac {b^{2}}{d \tanh {\left (c + d x \right )}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________