How do you integrate #int cos^2x# by integration by parts method?

1 Answer
Jan 23, 2017

#x/2+1/2sin x cos x + c#

Explanation:

If you really want to integrate by parts, choose #u=cos x#, #dv= cos x dv#, #du=-sin xdx#, #v = sin x#.

#int udv = uv - int v du#

#int cosx cosx dx= cos x sinx - int sin x (-sin x)dx#

#int cos^2 x dx= cos x sin x + int (1 - cos^2x)dx#

#int cos^2 x dx= cos x sin x + int 1 dx - int cos^2x dx#

Now for the sneaky part: take the integral on the right over to the left:

#2int cos^2x dx = cos x sin x + x#

Hence
#int cos^2xdx = 1/2 x + 1/2 sin x cos x#

However, a shorter way is to use the identities #cos2x = cos^2x-sin^2x = 2 cos^2 x - 1 = 1 - 2sin^2 x# and #sin2x=2sinxcosx#.

#int cos^2 x=int (1+cos2x)/2dx#

#=int1/2 dx + 1/2 int cos2x dx#

#=1/2x +1/2sin 2x+c#

#=1/2x+sinxcosx+c#