`int_0^infty cos (pi x)dx=`

Substitute `u=pi x` `=>` `du=pi dx` `=>` `dx=(du)/pi,` `u_l=pi cdot 0=0,` `u_u=pi cdot infty=infty.` (`u_l` and `u_u` are lower and upper bound respectively).

`1/pi int_0^infty cos u du=1/pi sin u|_0^infty=1/pi(lim_(u to infty)sin u-sin0)`

**The integral does not converge (it diverges)** because `lim_(u to infty) sin u` does not exist.

The image below shows the graph of the function (blue) and area between it and `x`-axis representing the value of integral (green positive and red negative). We can see that any such integral (with infinite bound(s)) of periodic function will diverge.