### 3.276 $$\int x^2 \cosh (x) \, dx$$

Optimal. Leaf size=16 $x^2 \sinh (x)+2 \sinh (x)-2 x \cosh (x)$

[Out]

-2*x*Cosh[x] + 2*Sinh[x] + x^2*Sinh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0271148, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 6, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.333, Rules used = {3296, 2637} $x^2 \sinh (x)+2 \sinh (x)-2 x \cosh (x)$

Antiderivative was successfully veriﬁed.

[In]

Int[x^2*Cosh[x],x]

[Out]

-2*x*Cosh[x] + 2*Sinh[x] + x^2*Sinh[x]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int x^2 \cosh (x) \, dx &=x^2 \sinh (x)-2 \int x \sinh (x) \, dx\\ &=-2 x \cosh (x)+x^2 \sinh (x)+2 \int \cosh (x) \, dx\\ &=-2 x \cosh (x)+2 \sinh (x)+x^2 \sinh (x)\\ \end{align*}

Mathematica [A]  time = 0.0129836, size = 14, normalized size = 0.88 $\left (x^2+2\right ) \sinh (x)-2 x \cosh (x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[x^2*Cosh[x],x]

[Out]

-2*x*Cosh[x] + (2 + x^2)*Sinh[x]

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 17, normalized size = 1.1 \begin{align*} -2\,x\cosh \left ( x \right ) +2\,\sinh \left ( x \right ) +{x}^{2}\sinh \left ( x \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cosh(x),x)

[Out]

-2*x*cosh(x)+2*sinh(x)+x^2*sinh(x)

________________________________________________________________________________________

Maxima [B]  time = 0.95329, size = 59, normalized size = 3.69 \begin{align*} \frac{1}{3} \, x^{3} \cosh \left (x\right ) - \frac{1}{6} \,{\left (x^{3} + 3 \, x^{2} + 6 \, x + 6\right )} e^{\left (-x\right )} - \frac{1}{6} \,{\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cosh(x),x, algorithm="maxima")

[Out]

1/3*x^3*cosh(x) - 1/6*(x^3 + 3*x^2 + 6*x + 6)*e^(-x) - 1/6*(x^3 - 3*x^2 + 6*x - 6)*e^x

________________________________________________________________________________________

Fricas [A]  time = 1.8497, size = 46, normalized size = 2.88 \begin{align*} -2 \, x \cosh \left (x\right ) +{\left (x^{2} + 2\right )} \sinh \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cosh(x),x, algorithm="fricas")

[Out]

-2*x*cosh(x) + (x^2 + 2)*sinh(x)

________________________________________________________________________________________

Sympy [A]  time = 0.326455, size = 17, normalized size = 1.06 \begin{align*} x^{2} \sinh{\left (x \right )} - 2 x \cosh{\left (x \right )} + 2 \sinh{\left (x \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*cosh(x),x)

[Out]

x**2*sinh(x) - 2*x*cosh(x) + 2*sinh(x)

________________________________________________________________________________________

Giac [A]  time = 1.09227, size = 36, normalized size = 2.25 \begin{align*} -\frac{1}{2} \,{\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + \frac{1}{2} \,{\left (x^{2} - 2 \, x + 2\right )} e^{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cosh(x),x, algorithm="giac")

[Out]

-1/2*(x^2 + 2*x + 2)*e^(-x) + 1/2*(x^2 - 2*x + 2)*e^x