What is the antiderivative of ##(sin(x))^2##?

## = 1/2 (x -1/2 sin 2x) + C##

use the handy double-angle formula

##cos 2A = cos^2 A – sin^2 A## ##= 2 cos^2 A -1## ##= 1 – 2 sin^2 A##

last one gives us ##sin^2 A = 1/2(1- cos 2A)##

So

##int (sin(x))^2 dx##

## = 1/2 int 1 – cos 2x dx##

## = 1/2 (x -1/2 sin 2x) + C##

which you can flip using the other double-angle formula: ##sin 2A = 2 sin A cos A##

## = 1/2 (x – sin x cos x) + C##