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

$$\int x^2\cosh(x)\,\mathrm dx$$

So my working out follows -

In the first step I have made $x^2=u$, and $\cosh(x) = \dfrac{dv}{dx}$

$= uv - ∫v \dfrac{dv}{dx}$

$= x^2\sinh(x) - ∫\sinh(x)2x$

$= x^2\sinh(x) - 2x\cosh(x) - ∫2\cosh(x)$

And my final figure is $x^2\sinh(x) -2x\cosh(x) - 2\sinh(x) + c$

However wolframalpha is saying that the end term should be $+ 2\sinh(x)$ not minus. But I can't see how.

• From the integration by parts of $\int 2x\sinh x\,dx$, you get a minus sign inside the parenthesis (which you didn't write), and there's a minus before the parenthesis, makes a plus in total. – Daniel Fischer Sep 14 '13 at 19:49
• The Maple command $$with(Student[Calculus1]): IntTutor(x^2*cosh(x), x)$$ finds that step by step with explanations, outputing $${x}^{2}\sinh \left( x \right) -2\,x\cosh \left( x \right) +2\,\sinh \left( x \right).$$ – user64494 Sep 14 '13 at 19:56

## 4 Answers

I see your error. You only failed to distribute a negative sign. The integration being pretty short, I will recreate it. We have $$\int x^2\cosh(x) \, dx.$$ Using the formula $\displaystyle\int u \, dv = u \, v - \int v \, du$ twice, we first take \begin{align*} u=x^2 &\quad v=\sinh(x) \\ du=2x &\quad dv=\cosh{x}. \end{align*} Hence the integral becomes $$x^2\sinh(x)-2\int x \sinh(x) \, dx.$$ Applying the method again on the last integrand, we take \begin{align*} u=x &\quad v=\cosh(x) \\ du=1 &\quad dv=\sinh(x). \end{align*} Now we get \begin{align*} &x^2\sinh(x)-2\left[ x\cosh(x)-\int \cosh(x) \, dx \right] \\ =&x^2\sinh(x)-2\left( x\cosh(x)-\sinh(x)\right) \\ =&x^2\sinh(x)-2x\cosh(x)+2\sinh(x)+c. \end{align*}

Your method was otherwise perfect.

In the first step x² = u, and cosh(x) = dv/dx

= uv - ∫v u'

= x²sinh(x) - ∫sinh(x)2x dx

= x²sinh(x) - [2xcosh(x) - ∫2cosh(x) dx]

And final answer is x²sinh(x) -2xcosh(x) + 2sinh(x) + c

• Yeah it's that final step that I don't get. Where did the plus come from? The integral of cosh is sinh so the sign doesn't change. So you have three minus symbols in there. – user88720 Sep 14 '13 at 20:04
• $x^{2}\sinh(x)-(2x\cosh(x)-\sinh(x))=x^{2}\sinh(x)+(-1)(2x\cosh(x)+(-1)\sinh(x))$ $=x^{2}\sinh(x)+(-1)2x\cosh(x)+(-1)(-1)\sinh(x)=x^{2}\sinh(x)-2x\cosh(x)+\sinh(x)$ – user71352 Sep 14 '13 at 20:44
• Ah yeah rookie error, I removed the brackets [2xcosh(x) - ∫2cosh(x) dx]... – user88720 Sep 17 '13 at 2:37

$\int x^{2}\cosh(x)dx=x^{2}\sinh(x)-2\int x\sinh(x)dx$

$\int x\sinh(x)dx=x\cosh(x)-\int\cosh(x)dx=x\cosh(x)-\sinh(x)+C$

Together we get:

$\int x^{2}\cosh(x)dx=x^{2}\sinh(x)-2\big(x\cosh(x)-\sinh(x)+C\big)=x^{2}\sinh(x)-2x\cosh(x)+2\sinh(x)+D$ where $D=-2C$.

\begin{align} &\color{#ff0000}{\large\int x^{2}\cosh\left(x\right)\,{\rm d}x} = \left.{{\rm d}^{2} \over {\rm d}\mu^{2}}\int\cosh\left(\mu x\right) \,{\rm d}x\right\vert_{\mu\ =\ 1} = \left.{{\rm d}^{2} \over {\rm d}\mu^{2}} {\sinh\left(\mu x\right) \over \mu}\right\vert_{\mu\ =\ 1} \\[3mm]&= \left.{{\rm d} \over {\rm d}\mu}\left[% x\,{\cosh\left(\mu x\right) \over \mu} - {\sinh\left(\mu x\right) \over \mu^{2}} \right]\right\vert_{\mu\ =\ 1} \\[3mm]&= \left.\left[% x^{2}\,{\sinh\left(\mu x\right) \over \mu} - x\,{\cosh\left(\mu x\right) \over \mu^{2}} - x\,{\cos\left(\mu x\right) \over \mu^{2}} + {2\sinh\left(\mu x\right) \over \mu^{3}} \right]\right\vert_{\mu\ =\ 1} \\[3mm]&= \color{#ff0000}{\large\left(x^{2} + 2\right)\sinh\left(x\right) - 2x\cosh\left(x\right)} \end{align}

$+$ a constant.