MHB Evaluating the Integral $\int_{0}^{2\pi}x^2 cos(nx)\, dx$

  • Thread starter Thread starter Albert1
  • Start date Start date
  • Tags Tags
    Dx Integral
Click For Summary
The integral $\int_{0}^{2\pi}x^2 \cos(nx)\, dx$ evaluates to $\frac{4\pi}{n^2}$ for $n \in \mathbb{N}$. This result is derived using integration by parts, first applying it to express the integral in terms of another integral involving $x \sin(nx)$. A second application of integration by parts leads to the final expression. The discussion also explores a generalized form of the integral, incorporating a phase shift, which yields similar results for specific values of $m$. Overall, the evaluations highlight the relationships between the integrals of cosine and sine functions with polynomial terms.
Albert1
Messages
1,221
Reaction score
0
evaluate :

$\int_{0}^{2\pi}x^2 cos(nx)\, dx$
 
Mathematics news on Phys.org
Re: integral-03

We are given to evaluate:

$$I=\int_0^{2\pi}x^2\cos(nx)\,dx$$ where (presumably) $$n\in\mathbb{N}$$

Using integration by parts, we may let:

$$u=x^2\,\therefore\,du=2x\,dx$$

$$dv=\cos(nx)\,dx\,\therefore\,v=\frac{1}{n}\sin(nx)$$

And we have:

$$I=\left.\frac{x^2}{n}\sin(nx) \right|_0^{2\pi}-\frac{2}{n}\int_0^{2\pi} x\sin(nx)\,dx$$

$$I=-\frac{2}{n}\int_0^{2\pi} x\sin(nx)\,dx$$

Using integration by parts again, where:

$$u=x\,\therefore\,du=dx$$

$$dv=\sin(x)\,dx\,\therefore\,v=-\frac{1}{n}\cos(nx)$$

Now we have:

$$I=\frac{2}{n}\left(\left.\frac{x}{n}\cos(nx) \right|_0^{2\pi}+\frac{1}{n}\int_0^{2\pi}\cos(nx)\,dx \right)$$

$$I=\frac{2}{n}\left(\frac{2\pi}{n}+\left.\frac{1}{n^2}\sin(nx) \right|_0^{2\pi} \right)$$

$$I=\frac{4\pi}{n^2}$$

Thus, we may state:

$$\int_0^{2\pi}x^2\cos(nx)\,dx=\frac{4\pi}{n^2}$$
 
Re: integral-03

perfect (Yes) you got it
 
Re: integral-03

Let's generalize a little...

We are given to evaluate:

$$I=\int_0^{2\pi}x^2\cos\left(nx+m\frac{\pi}{2} \right)\,dx$$ where (presumably) $$n\in\mathbb{N},\,m\in\{0,1,2,3\}$$

Using integration by parts, we may let:

$$u=x^2\,\therefore\,du=2x\,dx$$

$$dv=\cos\left(nx+m\frac{\pi}{2} \right)\,dx\,\therefore\,v=\frac{1}{n}\sin\left(nx+m\frac{\pi}{2} \right)$$

And we have:

$$I=\left.\frac{x^2}{n}\sin\left(nx+m\frac{\pi}{2} \right) \right|_0^{2\pi}-\frac{2}{n}\int_0^{2\pi} x\sin\left(nx+m\frac{\pi}{2} \right)\,dx$$

$$I=\frac{4\pi^2}{n}\sin\left(m\frac{\pi}{2} \right)-\frac{2}{n}\int_0^{2\pi} x\sin\left(nx+m\frac{\pi}{2} \right)\,dx$$

Using integration by parts again, where:

$$u=x\,\therefore\,du=dx$$

$$dv=\sin\left(nx+m\frac{\pi}{2} \right)\,dx\,\therefore\,v=-\frac{1}{n}\cos\left(nx+m\frac{\pi}{2} \right)$$

Now we have:

$$I=\frac{4\pi^2}{n}\sin\left(m\frac{\pi}{2} \right)+\frac{2}{n}\left( \left.\frac{x}{n}\cos\left(nx+m\frac{\pi}{2} \right) \right|_0^{2\pi}+\frac{1}{n}\int_0^{2\pi}\cos\left(nx+m\frac{\pi}{2} \right)\,dx \right)$$

$$I=\frac{4\pi^2}{n}\sin\left(m\frac{\pi}{2} \right)+ \frac{2}{n}\left(\frac{2\pi}{n}\cos\left(m \frac{\pi}{2} \right)+\left.\frac{1}{n^2}\sin\left(nx+m\frac{\pi}{2} \right) \right|_0^{2\pi} \right)$$

$$I=\frac{4\pi^2}{n}\sin\left(m\frac{\pi}{2} \right)+\frac{4\pi}{n^2}\cos\left(m\frac{\pi}{2} \right)$$

Thus, we may state:

$$m=0\implies\int_0^{2\pi}x^2\cos\left(nx \right)\,dx=\frac{4\pi}{n^2}$$

$$m=1\implies-\int_0^{2\pi}x^2\sin\left(nx \right)\,dx=\frac{4\pi^2}{n}$$

$$m=2\implies-\int_0^{2\pi}x^2\cos\left(nx \right)\,dx=-\frac{4\pi}{n^2}$$

$$m=3\implies\int_0^{2\pi}x^2\sin\left(nx \right)\,dx=-\frac{4\pi^2}{n}$$
 
Thread 'Erroneously  finding discrepancy in transpose rule'
Obviously, there is something elementary I am missing here. To form the transpose of a matrix, one exchanges rows and columns, so the transpose of a scalar, considered as (or isomorphic to) a one-entry matrix, should stay the same, including if the scalar is a complex number. On the other hand, in the isomorphism between the complex plane and the real plane, a complex number a+bi corresponds to a matrix in the real plane; taking the transpose we get which then corresponds to a-bi...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 14 ·
Replies
14
Views
3K