If we have a string of length $L$ in constant tension $T$ and we oscillate one of the extremes at the rate $\sin{\frac{\pi nc t}{L}}$, we observe in a lab that single harmonics are produced. I want to theoretically check that answer using the wave equation $$u_{tt}-c^{2}u_{xx}=\sin{\frac{n \pi c t }{L}}.$$ (The boundary conditions are for a fixed string with initial position and velocity $0$.)
In which the term in the right represents this sinusoidal force. However when I solve the PDE for a certain n ($n=2$ for example), I expected all the other modes to vanish, so I get a single normal mode that oscillates at that frequency $\frac{2 \pi c t}{L}$. However, I don't get this physically observed answer. What I am doing wrong? Which conditions should I set in the wave equations to check what I saw in the lab?
Edit: I'm not interested in the PDE solving, I'm interested in the physical conditions that, once set in the wave equation, produce the observed result
Edit2: I also tried solving the homogeneous wave equation stating that $u(L,t)=\sin{\frac{n \pi c t}{L}}$ but didn't get the expected result either
Edit3: I think the first method fails because I am applying it to all the points in the string at once, and the second one fails because in the lab we were told to considerate the two extremes as fixed