In all three cases I know how if you accept that they can be written in that form (I.e. as power series or infinite series of the sines and cosines), then you can derive the coefficients using cleverly picked transformations, i.e. differentiation, the Fourier transforms or Cauchy integral formula trick. What I don't know is how you derive the original bit.