How do you find the integral of #sinpixcospix dx#?

2 Answers
Feb 7, 2015

For this integral, you should recall that #\sin(2x)=2\sin(x)\cos(x)#. So, if you multiply the sine and cosine function evaluated in the same point, dividing by two the relation above, you can check that
#{\sin(2x)}/{2}=\sin(x)\cos(x)#.

In your case, instead of #x# you have #\pi x#, so the relations becomes
#\sin(\pi x)\cos(\pi x) = {\sin(2\pi x)}/2#, which is much easier to integrate. In fact,
#\int {\sin(2\pi x)}/2 = 1/2\int \sin(2\pi x)#
let #t# be the new variable:
#t=2\pi x \Rightarrow x=t/{2\pi} \Rightarrow dx = dt/{2\pi}#

The integral becomes
#1/2\int \sin(t)dt/{2\pi}#, and factoring out constants again we get
#1/{4\pi}\int \sin(t)dt=-\cos(t)/{4\pi} +C#
Recalling the relation between #t# and #x#, the answer is finally
#-\cos(2\pi x)/{4\pi} +C#

Mar 10, 2015

One method gives correct answer: #-\cos(2\pi x)/{4\pi} +C#

A different method gives an answer that looks different:

#intsin(pix)cos(pix)dx#

Since d(sin t) =cos t dt, substitution will work:

Let #u=sin(pix)#, then #du= pi cos(pix) dx# And #cos(pix)=(du)/(pi)#.

Substituting yields:

#1/(pi)intsinu du=1/(pi)(sin^2u)/2+C#

So
#intsin(pix)cos(pix)dx=1/(2pi)sin^2(pi x)+C#

The answer look different, but what is the difference?
Hint: subtract and simplify.

#1/(2pi)sin^2(pi x)-(-\cos(2\pi x)/{4\pi})#
# =1/(2pi)sin^2(pi x)+1/(4 pi)cos(2 pi x)#
# =1/(2pi)sin^2(pi x)+1/(4 pi)[1-2sin^2( pi x)]#
#=1/(4pi)#

The difference is a constant! The two solutions have different #C#'s.