Optimal. Leaf size=30 \[ \frac{x^3}{3}+\frac{x}{2}+2 x \sinh (x)-2 \cosh (x)+\frac{1}{2} \sinh (x) \cosh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.038134, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.833, Rules used = {6742, 3296, 2638, 2635, 8} \[ \frac{x^3}{3}+\frac{x}{2}+2 x \sinh (x)-2 \cosh (x)+\frac{1}{2} \sinh (x) \cosh (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6742
Rule 3296
Rule 2638
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int (x+\cosh (x))^2 \, dx &=\int \left (x^2+2 x \cosh (x)+\cosh ^2(x)\right ) \, dx\\ &=\frac{x^3}{3}+2 \int x \cosh (x) \, dx+\int \cosh ^2(x) \, dx\\ &=\frac{x^3}{3}+2 x \sinh (x)+\frac{1}{2} \cosh (x) \sinh (x)+\frac{\int 1 \, dx}{2}-2 \int \sinh (x) \, dx\\ &=\frac{x}{2}+\frac{x^3}{3}-2 \cosh (x)+2 x \sinh (x)+\frac{1}{2} \cosh (x) \sinh (x)\\ \end{align*}
Mathematica [A] time = 0.0641519, size = 26, normalized size = 0.87 \[ \frac{1}{6} \left (x \left (2 x^2+12 \sinh (x)+3\right )+3 (\sinh (x)-4) \cosh (x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 25, normalized size = 0.8 \begin{align*}{\frac{x}{2}}+{\frac{{x}^{3}}{3}}-2\,\cosh \left ( x \right ) +2\,x\sinh \left ( x \right ) +{\frac{\cosh \left ( x \right ) \sinh \left ( x \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.04878, size = 49, normalized size = 1.63 \begin{align*} \frac{1}{3} \, x^{3} -{\left (x + 1\right )} e^{\left (-x\right )} +{\left (x - 1\right )} e^{x} + \frac{1}{2} \, x + \frac{1}{8} \, e^{\left (2 \, x\right )} - \frac{1}{8} \, e^{\left (-2 \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.83525, size = 80, normalized size = 2.67 \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \,{\left (4 \, x + \cosh \left (x\right )\right )} \sinh \left (x\right ) + \frac{1}{2} \, x - 2 \, \cosh \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.2522, size = 41, normalized size = 1.37 \begin{align*} \frac{x^{3}}{3} - \frac{x \sinh ^{2}{\left (x \right )}}{2} + 2 x \sinh{\left (x \right )} + \frac{x \cosh ^{2}{\left (x \right )}}{2} + \frac{\sinh{\left (x \right )} \cosh{\left (x \right )}}{2} - 2 \cosh{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2375, size = 49, normalized size = 1.63 \begin{align*} \frac{1}{3} \, x^{3} -{\left (x + 1\right )} e^{\left (-x\right )} +{\left (x - 1\right )} e^{x} + \frac{1}{2} \, x + \frac{1}{8} \, e^{\left (2 \, x\right )} - \frac{1}{8} \, e^{\left (-2 \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]