Optimal. Leaf size=59 \[ \frac{1}{2} x \left (2 a^2+b^2-c^2\right )+\frac{1}{2} (b \sinh (x)+c \cosh (x)) (a+b \cosh (x)+c \sinh (x))+\frac{3}{2} a b \sinh (x)+\frac{3}{2} a c \cosh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0354636, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3120, 2637, 2638} \[ \frac{1}{2} x \left (2 a^2+b^2-c^2\right )+\frac{1}{2} (b \sinh (x)+c \cosh (x)) (a+b \cosh (x)+c \sinh (x))+\frac{3}{2} a b \sinh (x)+\frac{3}{2} a c \cosh (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3120
Rule 2637
Rule 2638
Rubi steps
\begin{align*} \int (a+b \cosh (x)+c \sinh (x))^2 \, dx &=\frac{1}{2} (c \cosh (x)+b \sinh (x)) (a+b \cosh (x)+c \sinh (x))+\frac{1}{2} \int \left (2 a^2+b^2-c^2+3 a b \cosh (x)+3 a c \sinh (x)\right ) \, dx\\ &=\frac{1}{2} \left (2 a^2+b^2-c^2\right ) x+\frac{1}{2} (c \cosh (x)+b \sinh (x)) (a+b \cosh (x)+c \sinh (x))+\frac{1}{2} (3 a b) \int \cosh (x) \, dx+\frac{1}{2} (3 a c) \int \sinh (x) \, dx\\ &=\frac{1}{2} \left (2 a^2+b^2-c^2\right ) x+\frac{3}{2} a c \cosh (x)+\frac{3}{2} a b \sinh (x)+\frac{1}{2} (c \cosh (x)+b \sinh (x)) (a+b \cosh (x)+c \sinh (x))\\ \end{align*}
Mathematica [A] time = 0.0814906, size = 54, normalized size = 0.92 \[ \frac{1}{4} \left (2 x \left (2 a^2+b^2-c^2\right )+8 a b \sinh (x)+8 a c \cosh (x)+\left (b^2+c^2\right ) \sinh (2 x)+2 b c \cosh (2 x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.023, size = 54, normalized size = 0.9 \begin{align*}{a}^{2}x+2\,ab\sinh \left ( x \right ) +2\,ac\cosh \left ( x \right ) +{b}^{2} \left ({\frac{\cosh \left ( x \right ) \sinh \left ( x \right ) }{2}}+{\frac{x}{2}} \right ) +b \left ( \cosh \left ( x \right ) \right ) ^{2}c+{c}^{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.00798, size = 85, normalized size = 1.44 \begin{align*} b c \cosh \left (x\right )^{2} + \frac{1}{8} \, b^{2}{\left (4 \, x + e^{\left (2 \, x\right )} - e^{\left (-2 \, x\right )}\right )} - \frac{1}{8} \, c^{2}{\left (4 \, x - e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )}\right )} + a^{2} x + 2 \,{\left (c \cosh \left (x\right ) + b \sinh \left (x\right )\right )} a \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.95671, size = 171, normalized size = 2.9 \begin{align*} \frac{1}{2} \, b c \cosh \left (x\right )^{2} + \frac{1}{2} \, b c \sinh \left (x\right )^{2} + 2 \, a c \cosh \left (x\right ) + \frac{1}{2} \,{\left (2 \, a^{2} + b^{2} - c^{2}\right )} x + \frac{1}{2} \,{\left (4 \, a b +{\left (b^{2} + c^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.352485, size = 100, normalized size = 1.69 \begin{align*} a^{2} x + 2 a b \sinh{\left (x \right )} + 2 a c \cosh{\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} + b c \sinh ^{2}{\left (x \right )} + \frac{c^{2} x \sinh ^{2}{\left (x \right )}}{2} - \frac{c^{2} x \cosh ^{2}{\left (x \right )}}{2} + \frac{c^{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 [A] time = 1.13587, size = 112, normalized size = 1.9 \begin{align*} \frac{1}{8} \, b^{2} e^{\left (2 \, x\right )} + \frac{1}{4} \, b c e^{\left (2 \, x\right )} + \frac{1}{8} \, c^{2} e^{\left (2 \, x\right )} + a b e^{x} + a c e^{x} + \frac{1}{2} \,{\left (2 \, a^{2} + b^{2} - c^{2}\right )} x - \frac{1}{8} \,{\left (b^{2} - 2 \, b c + c^{2} + 8 \,{\left (a b - a c\right )} e^{x}\right )} e^{\left (-2 \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]