Optimal. Leaf size=27 \[ a^2 x-(b+a \cosh (x)) (a+b \cosh (x)) \text {csch}(x)+a b \sinh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4477, 2770,
2717} \begin {gather*} a^2 x+a b \sinh (x)-\text {csch}(x) (a \cosh (x)+b) (a+b \cosh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 2770
Rule 4477
Rubi steps
\begin {align*} \int (a \coth (x)+b \text {csch}(x))^2 \, dx &=-\int (i b+i a \cosh (x))^2 \text {csch}^2(x) \, dx\\ &=-(b+a \cosh (x)) (a+b \cosh (x)) \text {csch}(x)-\int \left (-a^2-a b \cosh (x)\right ) \, dx\\ &=a^2 x-(b+a \cosh (x)) (a+b \cosh (x)) \text {csch}(x)+(a b) \int \cosh (x) \, dx\\ &=a^2 x-(b+a \cosh (x)) (a+b \cosh (x)) \text {csch}(x)+a b \sinh (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 23, normalized size = 0.85 \begin {gather*} -\left (\left (a^2+b^2\right ) \coth (x)\right )+a (a x-2 b \text {csch}(x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.61, size = 30, normalized size = 1.11
method | result | size |
risch | \(a^{2} x -\frac {2 \left (2 b \,{\mathrm e}^{x} a +a^{2}+b^{2}\right )}{{\mathrm e}^{2 x}-1}\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 45, normalized size = 1.67 \begin {gather*} a^{2} {\left (x + \frac {2}{e^{\left (-2 \, x\right )} - 1}\right )} + \frac {4 \, a b}{e^{\left (-x\right )} - e^{x}} + \frac {2 \, b^{2}}{e^{\left (-2 \, x\right )} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 37, normalized size = 1.37 \begin {gather*} -\frac {2 \, a b + {\left (a^{2} + b^{2}\right )} \cosh \left (x\right ) - {\left (a^{2} x + a^{2} + b^{2}\right )} \sinh \left (x\right )}{\sinh \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \coth {\left (x \right )} + b \operatorname {csch}{\left (x \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 29, normalized size = 1.07 \begin {gather*} a^{2} x - \frac {2 \, {\left (2 \, a b e^{x} + a^{2} + b^{2}\right )}}{e^{\left (2 \, x\right )} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.61, size = 33, normalized size = 1.22 \begin {gather*} a^2\,x-\frac {2\,a^2+4\,{\mathrm {e}}^x\,a\,b+2\,b^2}{{\mathrm {e}}^{2\,x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________