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.01757, antiderivative size = 37, normalized size of antiderivative = 1., 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 3073
Rule 8
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.0541152, 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]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 37, normalized size = 1. \begin{align*}{b}^{2} \left ({\frac{\cosh \left ( x \right ) \sinh \left ( x \right ) }{2}}-{\frac{x}{2}} \right ) +ab \left ( \cosh \left ( x \right ) \right ) ^{2}+{a}^{2} \left ({\frac{\cosh \left ( x \right ) \sinh \left ( x \right ) }{2}}+{\frac{x}{2}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.04819, size = 62, normalized size = 1.68 \begin{align*} a b \cosh \left (x\right )^{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 )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.18391, size = 126, normalized size = 3.41 \begin{align*} \frac{1}{2} \, a b \cosh \left (x\right )^{2} + \frac{1}{2} \, a b \sinh \left (x\right )^{2} + \frac{1}{2} \,{\left (a^{2} + b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + \frac{1}{2} \,{\left (a^{2} - b^{2}\right )} x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.243936, size = 78, normalized size = 2.11 \begin{align*} - \frac{a^{2} x \sinh ^{2}{\left (x \right )}}{2} + \frac{a^{2} x \cosh ^{2}{\left (x \right )}}{2} + \frac{a^{2} \sinh{\left (x \right )} \cosh{\left (x \right )}}{2} + a b \sinh ^{2}{\left (x \right )} + \frac{b^{2} x \sinh ^{2}{\left (x \right )}}{2} - \frac{b^{2} x \cosh ^{2}{\left (x \right )}}{2} + \frac{b^{2} \sinh{\left (x \right )} \cosh{\left (x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.1521, size = 100, normalized size = 2.7 \begin{align*} \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 )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]