Integrate sin x and cos x (#911)