Source: https://www.maths.lancs.ac.uk/jameson/sincosintnotes.pdf