If you have #intsin^2(x)dx# you can integrate by parts after rearranging your integrand:
#intsin^2(x)dx=intsin(x)sin(x)dx=#
by parts where you have:
#intf(x)*g(x)dx=F(x)*g(x)-intF(x)*g'(x)dx#
Where:
#F(x)=intf(x)dx#
#g'(x)# is the derivative of #g(x)#
#=sin(x)(-cos(x))-int(-cos(x))cos(x)dx=#
#=sin(x)(-cos(x))+intcos^2(x)dx=#
but: #cos^2(x)=1-sin^2(x)# and your integral becomes:
#=sin(x)(-cos(x))+int(1-sin^2(x))dx=#
#=sin(x)(-cos(x))+int1dx-intsin^2(x)dx#
So basically you can write:
#intsin^2(x)dx=sin(x)(-cos(x))+int1dx-intsin^2(x)dx#
Taking the integral with #sin^2(x)# from the right to the left (as in a normal equation) yuo get:
#2intsin^2(x)dx=sin(x)(-cos(x))+int1dx#
and finally:
#intsin^2(x)dx=(sin(x)(-cos(x))+x)/2+c#