I came across an example when understanding Fourier Series. There was one part where they converted a trigonometry function to standard variable. They did this:

.

What have they done here? Can this be done to sine too? Thanks in advance for the help.