Mister Exam

Other calculators

Integral of ((pi-x)/2)*cos(nx) dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

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

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