If you imagine that sin(x), cos(x), -sin(x) and -cos(x) are on a wheel as shown below:
sin(x)
-cos(x) cos(x)
-sin(x)
then going clockwise around the wheel you have what each term differentiates to, so sin(x) to cos(x), cos(x) to -sin(x) etc, and anticlockwise you have what each term integrates to, so sin(x) to -cos(x), -cos(x) to -sin(x) etc etc.