The problem I was trying to solve is the following PDE problem
$$\begin{cases} \partial_{tt}^2 u = \partial_{xx}^2 u -\gamma\partial_t u \\[5 pt] u(0,t)= u(\pi, t) = 0 \\[5 pt] u(x,0) = (\sin2x)^4 -{1\over 5}\sin 10x \\[5 pt] \partial_t u(x,t)|_{t=0}=0 \end{cases}\tag 1$$
with the Fourier series method. But I got stuck on the calculations.
What I've done is, first thing first, to evaluate the initial condition to eliminate that fourth power, which can be easily done, and I've got
$$ u(x,0) = {3\over 8}-{1\over 2}\cos4x +{1\over8}\cos8x-{1\over 5}\sin10x $$
This says to me that the solution ought to be of the form
$$ u(x,t) = \sum_n a_n(t)\sin(nx)+b_n(t)\cos(nx) $$
or simply by using the complex exponential, which doesn't change much. I then used the ansatz in the PDE to get two ODE's for the coefficients $a_n(t), b_n(t)$
$$ \sum_n(a''_n(t)\sin(nx)+b''_n(t)\cos(nx))= \\ =-\sum_n(a_n(t)\sin(nx)+b_n(t)\cos(nx))-\gamma\sum_n(a'_n(t)\sin(nx)+b'_n(t)\cos(nx)) $$
and got, equating the coefficients
$$ a''_n(t)= -\gamma a'_n(t)-a_n(t) \\ b''_n(t)= -\gamma b'_n(t)-b_n(t) $$
which are the same equations: the equation of a damped harmonic oscillator. To find the solution we search for the solutions of the polynomial equation
$$ \lambda^2 +\gamma\lambda +1 = 0 $$
which are
$$ \lambda_1 = -{1\over 2}\left(\gamma+\sqrt{\gamma^2-4}\right)\;\;\;\;\; \lambda_2 = -{1\over 2}\left(\gamma-\sqrt{\gamma^2-4}\right) $$
Clearly the solution for the ODE's depends on the value of the "damping coefficient" gamma
$$ \gamma^2-4 \gt 0 \implies \color{red}{a_n(t) = c^a_1e^{\lambda_1 t}+c^a_2e^{\lambda_2 t}}\\ \gamma_2-4\lt 0 \implies \lambda_{1/2} = \mu\pm i\nu \implies \color{orange}{a_n(t) = c^a_1 e^{(\mu+i\nu)t}+c^a_2 e^{(\mu-i\nu)t}} \\ \gamma^2-4=0\implies \lambda_1=\lambda_2=\lambda \implies \color{green}{a_n(t)=c^a_1 e^{\lambda t}+c^a_2 t e^{\lambda t}} $$
and the same goes for $b_n(t)$. But then jumped to my mind that the solution would become very ugly! Knowing my professor I think that there could be a easier way to solving this.
Question 1: In my solution, am I headed in the right way?
Question 2: Is there a simpler method to solve this problem?
Question 3: I thought about using Laplace transform but the initial condition make matter worse: could this be a viable way?