Mister Exam

Integral of xcos(pix) dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
  1               
  /               
 |                
 |  x*cos(pi*x) dx
 |                
/                 
0                 
01xcos(πx)dx\int\limits_{0}^{1} x \cos{\left(\pi x \right)}\, dx
Integral(x*cos(pi*x), (x, 0, 1))
Detail solution
  1. Use integration by parts:

    udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}

    Let u(x)=xu{\left(x \right)} = x and let dv(x)=cos(πx)\operatorname{dv}{\left(x \right)} = \cos{\left(\pi x \right)}.

    Then du(x)=1\operatorname{du}{\left(x \right)} = 1.

    To find v(x)v{\left(x \right)}:

    1. Let u=πxu = \pi x.

      Then let du=πdxdu = \pi dx and substitute duπ\frac{du}{\pi}:

      cos(u)πdu\int \frac{\cos{\left(u \right)}}{\pi}\, du

      1. The integral of a constant times a function is the constant times the integral of the function:

        cos(u)du=cos(u)duπ\int \cos{\left(u \right)}\, du = \frac{\int \cos{\left(u \right)}\, du}{\pi}

        1. The integral of cosine is sine:

          cos(u)du=sin(u)\int \cos{\left(u \right)}\, du = \sin{\left(u \right)}

        So, the result is: sin(u)π\frac{\sin{\left(u \right)}}{\pi}

      Now substitute uu back in:

      sin(πx)π\frac{\sin{\left(\pi x \right)}}{\pi}

    Now evaluate the sub-integral.

  2. The integral of a constant times a function is the constant times the integral of the function:

    sin(πx)πdx=sin(πx)dxπ\int \frac{\sin{\left(\pi x \right)}}{\pi}\, dx = \frac{\int \sin{\left(\pi x \right)}\, dx}{\pi}

    1. Let u=πxu = \pi x.

      Then let du=πdxdu = \pi dx and substitute duπ\frac{du}{\pi}:

      sin(u)πdu\int \frac{\sin{\left(u \right)}}{\pi}\, du

      1. The integral of a constant times a function is the constant times the integral of the function:

        sin(u)du=sin(u)duπ\int \sin{\left(u \right)}\, du = \frac{\int \sin{\left(u \right)}\, du}{\pi}

        1. The integral of sine is negative cosine:

          sin(u)du=cos(u)\int \sin{\left(u \right)}\, du = - \cos{\left(u \right)}

        So, the result is: cos(u)π- \frac{\cos{\left(u \right)}}{\pi}

      Now substitute uu back in:

      cos(πx)π- \frac{\cos{\left(\pi x \right)}}{\pi}

    So, the result is: cos(πx)π2- \frac{\cos{\left(\pi x \right)}}{\pi^{2}}

  3. Now simplify:

    πxsin(πx)+cos(πx)π2\frac{\pi x \sin{\left(\pi x \right)} + \cos{\left(\pi x \right)}}{\pi^{2}}

  4. Add the constant of integration:

    πxsin(πx)+cos(πx)π2+constant\frac{\pi x \sin{\left(\pi x \right)} + \cos{\left(\pi x \right)}}{\pi^{2}}+ \mathrm{constant}


The answer is:

πxsin(πx)+cos(πx)π2+constant\frac{\pi x \sin{\left(\pi x \right)} + \cos{\left(\pi x \right)}}{\pi^{2}}+ \mathrm{constant}

The answer (Indefinite) [src]
  /                                            
 |                      cos(pi*x)   x*sin(pi*x)
 | x*cos(pi*x) dx = C + --------- + -----------
 |                           2           pi    
/                          pi                  
xcos(πx)dx=C+xsin(πx)π+cos(πx)π2\int x \cos{\left(\pi x \right)}\, dx = C + \frac{x \sin{\left(\pi x \right)}}{\pi} + \frac{\cos{\left(\pi x \right)}}{\pi^{2}}
The graph
0.001.000.100.200.300.400.500.600.700.800.901-2
The answer [src]
-2 
---
  2
pi 
2π2- \frac{2}{\pi^{2}}
=
=
-2 
---
  2
pi 
2π2- \frac{2}{\pi^{2}}
-2/pi^2
Numerical answer [src]
-0.202642367284676
-0.202642367284676
The graph
Integral of xcos(pix) dx

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