I don't know what I have learned about this type of question.
That's a very unfortunate thing to say! I hope you didn't really mean it the way you said it. Further, whether you intended it or not, you are saying that you
know how to solve this problem, you just don't want to do the
work!
One way of handling non-homogeneous boundary values is to
make them homogenous (Homogenize them?) by changing the variable. Since the only boundary value given is [itex]u(0, t)= e^{-t}[/itex], let [itex]y(x, t)= u(x, t)- e^{-t}[/itex] or [itex]u(x, t)= y(x, t)+ e^{-t}[/itex]. Then [itex]u_{xx}= y_{xx}[/itex] and [itex]u_{t}= y_t- e^{-t}[/itex] so the equation becomes [itex]y_t- e^{-t}= y_xx[/itex] with "initial condition" [itex]y(x, 0)= u(x, 0)- 1= cos(x)- 1[/itex] and "boundary condition" [itex]y((0, t)= u(0, t)- e^{-t}= e^{-t}- e^{-t}= 0[/itex] and [itex]y(2\pi, t)= u(2\pi, t)- e^{-t}= 0[/itex].
That's probably what you did. Now to solve that using the "eigenfunction expansion" method, we would recognize that eigenvectors for the operator [itex]\partial^2/\partial x[/itex], with boundaries at x= 0 and [itex]x= 2\pi[/itex] are sin(nx) for n a positive integer. So you want to write [itex]y(x)= \sum A_n(t) sin(nx)[/itex].
Then [itex]y_xx= y_t[/itex] becomes [itex]\sum -n^2 A_n(t) sin(nx)= \sum A'_n sin(nx)[/itex] so that we must have [itex]A'_n= -n^2A_n[/itex] for all n.