Recall that ∫uv'=uv- ∫u'v Set u=sin²(x), v'=1 Therefore u'=2sin(x)cos(x) and v=x which gives us the following:
∫sin²(x)dx = xsin²(x) - ∫2xsin(x)cos(x)dx
The second integral in the above expression is given in the question so we then have the form:
∫sin²(x)dx = xsin²(x) +1⁄2[xcos(2x)-1⁄2sin(2x)]
which can be rearranged to give:
∫sin²(x)dx = 1⁄2x[2sin²(x) + cos(2x)] - 1⁄4sin(2x) + c
We can then employ the identity: cos(2x) = cos²(x) - sin²(x) to give us:
∫sin²(x)dx = 1⁄2x[sin²(x) + cos²(x)] - 1⁄4sin(2x) + c
Finally the identity: sin²(x) + cos²(x) = 1 is used to produce:
∫sin²(x)dx = 1⁄2x- 1⁄4sin(2x) + c
where c is the constant of integration