MHB 8.4.2 - Computing ∫ x² cos(x) dx

  • Thread starter Thread starter karush
  • Start date Start date
  • Tags Tags
    Computing Dx
karush
Gold Member
MHB
Messages
3,240
Reaction score
5
8.4.2
$$\int {x}^{2}\cos\left({x}\right)\ dx
= {x}^{2}\sin\left({x}\right)
-2\sin\left({x}\right)
+2x\cos\left({x}\right)
+ C
$$
$$uv-\int v \ du $$
$$u={x}^{2}\ \ \ dv=\cos\left({x}\right)\ dx $$
$$du=2x \ dx \ \ \ \ v=\sin\left({x}\right)$$
$${x}^{2}\sin\left({x}\right)-\int\sin\left({x}\right)\ 2x \ dx $$
tried to finish but couldn't get the answer.
 
Physics news on Phys.org
Re: 8.4.2

karush said:
8.4.2
$$\int {x}^{2}\cos\left({x}\right)\ dx
= {x}^{2}\sin\left({x}\right)
-2\sin\left({x}\right)
+2x\cos\left({x}\right)
+ C
$$
$$uv-\int v \ du $$
$$u={x}^{2}\ \ \ dv=\cos\left({x}\right)\ dx $$
$$du=2x \ dx \ \ \ \ v=\sin\left({x}\right)$$
$${x}^{2}\sin\left({x}\right)-\int\sin\left({x}\right)\ 2x \ dx $$
tried to finish but couldn't get the answer.

Use integration by parts again...
 
Rewrite $\int\cos\left({x}\right)\ 2x \ dx $ as $2\int x\cos\left({x}\right) \ dx $
Then
$\displaystyle u=x \ \ \ \ \ \ \ dv=\cos\left({x}\right)\ dx $
$\displaystyle du=dx \ \ \ \ \ v=\sin\left({x}\right)$
Then
$$uv-\int v \ du \implies 2\sin\left({x}\right)
-2x\sin\left({x}\right)$$
Finally
$$\int {x}^{2}\cos\left({x}\right)\ dx
= {x}^{2}\sin\left({x}\right)
-2\sin\left({x}\right)
+2x\cos\left({x}\right)
+ C
$$
 
We could write:

$$I(x)=\int x^2\cos(x)\,dx$$

Thus, differenting w.r.t $x$, we have the first order linear ODE:

$$\d{I}{x}=x^2\cos(x)$$

We immediately see that the homogeneous solution is:

$$I_h(x)=c_1$$

Then we may assume a particular solution of the form:

$$I_p(x)=(Ax^2+Bx+C)\sin(x)+(Dx^2+Ex+F)\cos(x)$$

Hence:

$$I_p'(x)=(Ax^2+Bx+C)\cos(x)+(2Ax+B)\sin(x)-(Dx^2+Ex+F)\sin(x)+(2Dx+E)\cos(x)=(-Dx^2+(2A-E)x+(B-F))\sin(x)+(Ax^2+(B+2D)x+(C+E))\cos(x)$$

Substituting this into the ODE, we obtain the system:

$$-D=0$$

$$2A-E=0$$

$$B-F=0$$

$$A=1$$

$$B+2D=0$$

$$C+E=0$$

Solving this system, we obtain:

$$(A,B,C,D,E,F)=(1,0,-2,0,2,0)$$

And so we have:

$$I_p(x)=(x^2-2)\sin(x)+(2x)\cos(x)$$

Hence, by the principle of superposition, we find:

$$I(x)=I_p(x)+I_h(x)=(x^2-2)\sin(x)+2x\cos(x)+C$$

And so we conclude:

$$\int x^2\cos(x)\,dx=(x^2-2)\sin(x)+2x\cos(x)+C$$
 
Wow that was interesting
I assume that would be used verses recycling by parts till you get $du=dx$
 
karush said:
Wow that was interesting
I assume that would be used verses recycling by parts till you get $du=dx$

That's a method you will encounter when you study ordinary differential equations...I just posted it to look impressive to be informative. :)
 
I swallowed hard ...
 
Back
Top