\(\int (x+\cosh (x))^3 \, dx\) [334]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 6, antiderivative size = 56 \[ \int (x+\cosh (x))^3 \, dx=\frac {3 x^2}{4}+\frac {x^4}{4}-6 x \cosh (x)-\frac {3 \cosh ^2(x)}{4}+7 \sinh (x)+3 x^2 \sinh (x)+\frac {3}{2} x \cosh (x) \sinh (x)+\frac {\sinh ^3(x)}{3} \]

[Out]

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

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {6874, 3377, 2717, 3391, 30, 2713} \[ \int (x+\cosh (x))^3 \, dx=\frac {x^4}{4}+\frac {3 x^2}{4}+3 x^2 \sinh (x)+\frac {\sinh ^3(x)}{3}+7 \sinh (x)-\frac {3 \cosh ^2(x)}{4}-6 x \cosh (x)+\frac {3}{2} x \sinh (x) \cosh (x) \]

[In]

Int[(x + Cosh[x])^3,x]

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2717

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

Rule 3377

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 3391

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (x^3+3 x^2 \cosh (x)+3 x \cosh ^2(x)+\cosh ^3(x)\right ) \, dx \\ & = \frac {x^4}{4}+3 \int x^2 \cosh (x) \, dx+3 \int x \cosh ^2(x) \, dx+\int \cosh ^3(x) \, dx \\ & = \frac {x^4}{4}-\frac {3 \cosh ^2(x)}{4}+3 x^2 \sinh (x)+\frac {3}{2} x \cosh (x) \sinh (x)+i \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-i \sinh (x)\right )+\frac {3 \int x \, dx}{2}-6 \int x \sinh (x) \, dx \\ & = \frac {3 x^2}{4}+\frac {x^4}{4}-6 x \cosh (x)-\frac {3 \cosh ^2(x)}{4}+\sinh (x)+3 x^2 \sinh (x)+\frac {3}{2} x \cosh (x) \sinh (x)+\frac {\sinh ^3(x)}{3}+6 \int \cosh (x) \, dx \\ & = \frac {3 x^2}{4}+\frac {x^4}{4}-6 x \cosh (x)-\frac {3 \cosh ^2(x)}{4}+7 \sinh (x)+3 x^2 \sinh (x)+\frac {3}{2} x \cosh (x) \sinh (x)+\frac {\sinh ^3(x)}{3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.91 \[ \int (x+\cosh (x))^3 \, dx=-6 x \cosh (x)-\frac {3}{8} \cosh (2 x)+\frac {1}{12} \left (9 x^2+3 x^4+9 \left (9+4 x^2\right ) \sinh (x)+9 x \sinh (2 x)+\sinh (3 x)\right ) \]

[In]

Integrate[(x + Cosh[x])^3,x]

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.86

method result size
parallelrisch \(-\frac {5}{8}+\frac {x^{4}}{4}+\frac {3 x^{2}}{4}+3 x^{2} \sinh \left (x \right )-6 x \cosh \left (x \right )+\frac {3 x \sinh \left (2 x \right )}{4}+\frac {\sinh \left (3 x \right )}{12}+\frac {27 \sinh \left (x \right )}{4}-\frac {3 \cosh \left (2 x \right )}{8}\) \(48\)
default \(\left (\frac {2}{3}+\frac {\cosh \left (x \right )^{2}}{3}\right ) \sinh \left (x \right )+\frac {3 x \cosh \left (x \right ) \sinh \left (x \right )}{2}+\frac {3 x^{2}}{4}-\frac {3 \cosh \left (x \right )^{2}}{4}+3 x^{2} \sinh \left (x \right )-6 x \cosh \left (x \right )+6 \sinh \left (x \right )+\frac {x^{4}}{4}\) \(52\)
parts \(\left (\frac {2}{3}+\frac {\cosh \left (x \right )^{2}}{3}\right ) \sinh \left (x \right )+\frac {3 x \cosh \left (x \right ) \sinh \left (x \right )}{2}+\frac {3 x^{2}}{4}-\frac {3 \cosh \left (x \right )^{2}}{4}+3 x^{2} \sinh \left (x \right )-6 x \cosh \left (x \right )+6 \sinh \left (x \right )+\frac {x^{4}}{4}\) \(52\)
risch \(\frac {x^{4}}{4}+\frac {3 x^{2}}{4}+\frac {9}{16}+\frac {{\mathrm e}^{3 x}}{24}+\left (-\frac {3}{16}+\frac {3 x}{8}\right ) {\mathrm e}^{2 x}+\left (\frac {27}{8}-3 x +\frac {3}{2} x^{2}\right ) {\mathrm e}^{x}+\left (-\frac {27}{8}-3 x -\frac {3}{2} x^{2}\right ) {\mathrm e}^{-x}+\left (-\frac {3}{16}-\frac {3 x}{8}\right ) {\mathrm e}^{-2 x}-\frac {{\mathrm e}^{-3 x}}{24}\) \(73\)

[In]

int((x+cosh(x))^3,x,method=_RETURNVERBOSE)

[Out]

-5/8+1/4*x^4+3/4*x^2+3*x^2*sinh(x)-6*x*cosh(x)+3/4*x*sinh(2*x)+1/12*sinh(3*x)+27/4*sinh(x)-3/8*cosh(2*x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.96 \[ \int (x+\cosh (x))^3 \, dx=\frac {1}{4} \, x^{4} + \frac {1}{12} \, \sinh \left (x\right )^{3} + \frac {3}{4} \, x^{2} - 6 \, x \cosh \left (x\right ) - \frac {3}{8} \, \cosh \left (x\right )^{2} + \frac {1}{4} \, {\left (12 \, x^{2} + 6 \, x \cosh \left (x\right ) + \cosh \left (x\right )^{2} + 27\right )} \sinh \left (x\right ) - \frac {3}{8} \, \sinh \left (x\right )^{2} \]

[In]

integrate((x+cosh(x))^3,x, algorithm="fricas")

[Out]

1/4*x^4 + 1/12*sinh(x)^3 + 3/4*x^2 - 6*x*cosh(x) - 3/8*cosh(x)^2 + 1/4*(12*x^2 + 6*x*cosh(x) + cosh(x)^2 + 27)
*sinh(x) - 3/8*sinh(x)^2

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.52 \[ \int (x+\cosh (x))^3 \, dx=\frac {x^{4}}{4} - \frac {3 x^{2} \sinh ^{2}{\left (x \right )}}{4} + 3 x^{2} \sinh {\left (x \right )} + \frac {3 x^{2} \cosh ^{2}{\left (x \right )}}{4} + \frac {3 x \sinh {\left (x \right )} \cosh {\left (x \right )}}{2} - 6 x \cosh {\left (x \right )} - \frac {2 \sinh ^{3}{\left (x \right )}}{3} + \sinh {\left (x \right )} \cosh ^{2}{\left (x \right )} + 6 \sinh {\left (x \right )} - \frac {3 \cosh ^{2}{\left (x \right )}}{4} \]

[In]

integrate((x+cosh(x))**3,x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.45 \[ \int (x+\cosh (x))^3 \, dx=\frac {1}{4} \, x^{4} + \frac {3}{4} \, x^{2} + \frac {3}{16} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - \frac {3}{2} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - \frac {3}{16} \, {\left (2 \, x + 1\right )} e^{\left (-2 \, x\right )} + \frac {3}{2} \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + \frac {1}{24} \, e^{\left (3 \, x\right )} - \frac {3}{8} \, e^{\left (-x\right )} - \frac {1}{24} \, e^{\left (-3 \, x\right )} + \frac {3}{8} \, e^{x} \]

[In]

integrate((x+cosh(x))^3,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.34 \[ \int (x+\cosh (x))^3 \, dx=\frac {1}{4} \, x^{4} + \frac {3}{4} \, x^{2} + \frac {3}{16} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - \frac {3}{8} \, {\left (4 \, x^{2} + 8 \, x + 9\right )} e^{\left (-x\right )} - \frac {3}{16} \, {\left (2 \, x + 1\right )} e^{\left (-2 \, x\right )} + \frac {3}{8} \, {\left (4 \, x^{2} - 8 \, x + 9\right )} e^{x} + \frac {1}{24} \, e^{\left (3 \, x\right )} - \frac {1}{24} \, e^{\left (-3 \, x\right )} \]

[In]

integrate((x+cosh(x))^3,x, algorithm="giac")

[Out]

1/4*x^4 + 3/4*x^2 + 3/16*(2*x - 1)*e^(2*x) - 3/8*(4*x^2 + 8*x + 9)*e^(-x) - 3/16*(2*x + 1)*e^(-2*x) + 3/8*(4*x
^2 - 8*x + 9)*e^x + 1/24*e^(3*x) - 1/24*e^(-3*x)

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.86 \[ \int (x+\cosh (x))^3 \, dx=\frac {20\,\mathrm {sinh}\left (x\right )}{3}+3\,x^2\,\mathrm {sinh}\left (x\right )-\frac {3\,{\mathrm {cosh}\left (x\right )}^2}{4}+\frac {{\mathrm {cosh}\left (x\right )}^2\,\mathrm {sinh}\left (x\right )}{3}-6\,x\,\mathrm {cosh}\left (x\right )+\frac {3\,x^2}{4}+\frac {x^4}{4}+\frac {3\,x\,\mathrm {cosh}\left (x\right )\,\mathrm {sinh}\left (x\right )}{2} \]

[In]

int((x + cosh(x))^3,x)

[Out]

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