Mister Exam

Integral of x^2cosnx dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
 pi               
  /               
 |                
 |   2            
 |  x *cos(n*x) dx
 |                
/                 
-pi               
$$\int\limits_{- \pi}^{\pi} x^{2} \cos{\left(n x \right)}\, dx$$
Integral(x^2*cos(n*x), (x, -pi, pi))
The answer (Indefinite) [src]
                          //                 3                           \                            
                          ||                x                            |                            
                          ||                --                  for n = 0|                            
                          ||                3                            |                            
  /                       ||                                             |                            
 |                        ||/sin(n*x)   x*cos(n*x)                       |      //   x      for n = 0\
 |  2                     |||-------- - ----------  for n != 0           |    2 ||                   |
 | x *cos(n*x) dx = C - 2*|<|    2          n                            | + x *|
            
$${{\left(n^2\,x^2-2\right)\,\sin \left(n\,x\right)+2\,n\,x\,\cos \left(n\,x\right)}\over{n^3}}$$
The answer [src]
/                    2                                                             
|  4*sin(pi*n)   2*pi *sin(pi*n)   4*pi*cos(pi*n)                                  
|- ----------- + --------------- + --------------  for And(n > -oo, n < oo, n != 0)
|        3              n                 2                                        
|       n                                n                                         
<                                                                                  
|                         3                                                        
|                     2*pi                                                         
|                     -----                                   otherwise            
|                       3                                                          
\                                                                                  
$${{2\,\left(\left(n^2\,\pi^2-2\right)\,\sin \left(n\,\pi\right)+2\,n \,\pi\,\cos \left(n\,\pi\right)\right)}\over{n^3}}$$
=
=
/                    2                                                             
|  4*sin(pi*n)   2*pi *sin(pi*n)   4*pi*cos(pi*n)                                  
|- ----------- + --------------- + --------------  for And(n > -oo, n < oo, n != 0)
|        3              n                 2                                        
|       n                                n                                         
<                                                                                  
|                         3                                                        
|                     2*pi                                                         
|                     -----                                   otherwise            
|                       3                                                          
\                                                                                  
$$\begin{cases} \frac{2 \pi^{2} \sin{\left(\pi n \right)}}{n} + \frac{4 \pi \cos{\left(\pi n \right)}}{n^{2}} - \frac{4 \sin{\left(\pi n \right)}}{n^{3}} & \text{for}\: n > -\infty \wedge n < \infty \wedge n \neq 0 \\\frac{2 \pi^{3}}{3} & \text{otherwise} \end{cases}$$

    Use the examples entering the upper and lower limits of integration.