3.366 \(\int (x+\sinh (x))^2 \, dx\)

Optimal. Leaf size=30 \[ \frac{x^3}{3}-\frac{x}{2}-2 \sinh (x)+2 x \cosh (x)+\frac{1}{2} \sinh (x) \cosh (x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0376925, 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, 2637, 2635, 8} \[ \frac{x^3}{3}-\frac{x}{2}-2 \sinh (x)+2 x \cosh (x)+\frac{1}{2} \sinh (x) \cosh (x) \]

Antiderivative was successfully verified.

[In]

Int[(x + Sinh[x])^2,x]

[Out]

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

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

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

Mathematica [A]  time = 0.0555372, size = 30, normalized size = 1. \[ \frac{1}{6} x \left (2 x^2-3\right )-2 \sinh (x)+\frac{1}{4} \sinh (2 x)+2 x \cosh (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(x + Sinh[x])^2,x]

[Out]

(x*(-3 + 2*x^2))/6 + 2*x*Cosh[x] - 2*Sinh[x] + Sinh[2*x]/4

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 25, normalized size = 0.8 \begin{align*} -{\frac{x}{2}}+{\frac{{x}^{3}}{3}}+2\,x\cosh \left ( x \right ) -2\,\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]

int((x+sinh(x))^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.07062, size = 47, normalized size = 1.57 \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]

integrate((x+sinh(x))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.8074, size = 80, normalized size = 2.67 \begin{align*} \frac{1}{3} \, x^{3} + 2 \, x \cosh \left (x\right ) + \frac{1}{2} \,{\left (\cosh \left (x\right ) - 4\right )} \sinh \left (x\right ) - \frac{1}{2} \, x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+sinh(x))^2,x, algorithm="fricas")

[Out]

1/3*x^3 + 2*x*cosh(x) + 1/2*(cosh(x) - 4)*sinh(x) - 1/2*x

________________________________________________________________________________________

Sympy [A]  time = 0.202045, size = 41, normalized size = 1.37 \begin{align*} \frac{x^{3}}{3} + \frac{x \sinh ^{2}{\left (x \right )}}{2} - \frac{x \cosh ^{2}{\left (x \right )}}{2} + 2 x \cosh{\left (x \right )} + \frac{\sinh{\left (x \right )} \cosh{\left (x \right )}}{2} - 2 \sinh{\left (x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x+sinh(x))**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.29417, size = 47, normalized size = 1.57 \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]

integrate((x+sinh(x))^2,x, algorithm="giac")

[Out]

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