Optimal. Leaf size=37 \[ \frac {1}{2} x \left (a^2-b^2\right )+\frac {1}{2} (a \sinh (x)+b \cosh (x)) (a \cosh (x)+b \sinh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3073, 8} \[ \frac {1}{2} x \left (a^2-b^2\right )+\frac {1}{2} (a \sinh (x)+b \cosh (x)) (a \cosh (x)+b \sinh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3073
Rubi steps
\begin {align*} \int (a \cosh (x)+b \sinh (x))^2 \, dx &=\frac {1}{2} (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))+\frac {1}{2} \left (a^2-b^2\right ) \int 1 \, dx\\ &=\frac {1}{2} \left (a^2-b^2\right ) x+\frac {1}{2} (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 36, normalized size = 0.97 \[ \frac {1}{4} \left (\left (a^2+b^2\right ) \sinh (2 x)+2 x (a-b) (a+b)+2 a b \cosh (2 x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 42, normalized size = 1.14 \[ \frac {1}{2} \, a b \cosh \relax (x)^{2} + \frac {1}{2} \, a b \sinh \relax (x)^{2} + \frac {1}{2} \, {\left (a^{2} + b^{2}\right )} \cosh \relax (x) \sinh \relax (x) + \frac {1}{2} \, {\left (a^{2} - b^{2}\right )} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 74, normalized size = 2.00 \[ \frac {1}{8} \, a^{2} e^{\left (2 \, x\right )} + \frac {1}{4} \, a b e^{\left (2 \, x\right )} + \frac {1}{8} \, b^{2} e^{\left (2 \, x\right )} + \frac {1}{2} \, {\left (a^{2} - b^{2}\right )} x - \frac {1}{8} \, {\left (2 \, a^{2} e^{\left (2 \, x\right )} - 2 \, b^{2} e^{\left (2 \, x\right )} + a^{2} - 2 \, a b + b^{2}\right )} e^{\left (-2 \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.15, size = 37, normalized size = 1.00 \[ b^{2} \left (\frac {\cosh \relax (x ) \sinh \relax (x )}{2}-\frac {x}{2}\right )+a b \left (\cosh ^{2}\relax (x )\right )+a^{2} \left (\frac {\cosh \relax (x ) \sinh \relax (x )}{2}+\frac {x}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.55, size = 46, normalized size = 1.24 \[ a b \cosh \relax (x)^{2} + \frac {1}{8} \, a^{2} {\left (4 \, x + e^{\left (2 \, x\right )} - e^{\left (-2 \, x\right )}\right )} - \frac {1}{8} \, b^{2} {\left (4 \, x - e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.54, size = 39, normalized size = 1.05 \[ \frac {a^2\,\mathrm {sinh}\left (2\,x\right )}{4}+\frac {b^2\,\mathrm {sinh}\left (2\,x\right )}{4}+\frac {a^2\,x}{2}-\frac {b^2\,x}{2}+\frac {a\,b\,\mathrm {cosh}\left (2\,x\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.19, size = 78, normalized size = 2.11 \[ - \frac {a^{2} x \sinh ^{2}{\relax (x )}}{2} + \frac {a^{2} x \cosh ^{2}{\relax (x )}}{2} + \frac {a^{2} \sinh {\relax (x )} \cosh {\relax (x )}}{2} + a b \cosh ^{2}{\relax (x )} + \frac {b^{2} x \sinh ^{2}{\relax (x )}}{2} - \frac {b^{2} x \cosh ^{2}{\relax (x )}}{2} + \frac {b^{2} \sinh {\relax (x )} \cosh {\relax (x )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________