Integrand size = 11, antiderivative size = 37 \[ \int (a \cosh (x)+b \sinh (x))^2 \, 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)) \]
[Out]
Time = 0.01 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3152, 8} \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=\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)) \]
[In]
[Out]
Rule 8
Rule 3152
Rubi steps \begin{align*} \text {integral}& = \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*}
Time = 0.05 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.97 \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=\frac {1}{4} \left (2 (a-b) (a+b) x+2 a b \cosh (2 x)+\left (a^2+b^2\right ) \sinh (2 x)\right ) \]
[In]
[Out]
Time = 1.00 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00
method | result | size |
default | \(a^{2} \left (\frac {\cosh \left (x \right ) \sinh \left (x \right )}{2}+\frac {x}{2}\right )+a b \cosh \left (x \right )^{2}+b^{2} \left (\frac {\cosh \left (x \right ) \sinh \left (x \right )}{2}-\frac {x}{2}\right )\) | \(37\) |
parts | \(a^{2} \left (\frac {\cosh \left (x \right ) \sinh \left (x \right )}{2}+\frac {x}{2}\right )+a b \cosh \left (x \right )^{2}+b^{2} \left (\frac {\cosh \left (x \right ) \sinh \left (x \right )}{2}-\frac {x}{2}\right )\) | \(37\) |
risch | \(\frac {a^{2} x}{2}-\frac {b^{2} x}{2}+\frac {a^{2} {\mathrm e}^{2 x}}{8}+\frac {b \,{\mathrm e}^{2 x} a}{4}+\frac {b^{2} {\mathrm e}^{2 x}}{8}-\frac {{\mathrm e}^{-2 x} a^{2}}{8}+\frac {{\mathrm e}^{-2 x} a b}{4}-\frac {{\mathrm e}^{-2 x} b^{2}}{8}\) | \(66\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.14 \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=\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 \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 78 vs. \(2 (34) = 68\).
Time = 0.09 (sec) , antiderivative size = 78, normalized size of antiderivative = 2.11 \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=- \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 \cosh ^{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} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.24 \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=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 )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (33) = 66\).
Time = 0.26 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.00 \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=\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 )} \]
[In]
[Out]
Time = 2.32 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.05 \[ \int (a \cosh (x)+b \sinh (x))^2 \, dx=\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} \]
[In]
[Out]