Sin^2(x) cannot be integrated in its current form so you must use trigonometric identities to change sin^2(x) into something else.
Use the formula for cox(2x): cos(2x)=cos(x+x)=cos^2(x)-sin^2(x)
Now use that cos^2(x)=(1-sin^2(x))
So cos(2x)=1-2sin^2(x)
Rearrange the equation to find that sin^2(x)=1/2-1/2(cos(2x))
Now you can integrate to get that the integral of sin^2(x)=1/2x-1/4sin(2x)