The agreement between the two solutions is very good. The numerical method overestimates the amplitude of the decaying mode and underestimates the amplitude of the growing mode but the maxima and minima are in the same places for the two methods. At later times we see that the secondary peaks occur later in the numerical solution than in the exact solution. For the power spectrum analysis, I use routines from Numerical Recipes, by Press et al. The results for the ideal string and the stiff string are compared in the figure below.
Stiffness causes the higher frequency components to shift to higher frequencies.
There is no longer a harmonic structure for the stiff string. Also we see that for the ideal string only the odd harmonics are present, which is in agreement with the exact result. Hence the numerical result for the shift is about that for the exact result.