# Expressing the wave equation solution by separation of variables as a superposition of forward and backward waves.

(From an exercise in Pinchover's Introduction to Partial Differential Equations).

$$u(x,t)=\frac{A_0 + B_0 t}{2}+\sum_{n=1}^{\infty} \left(A_n\cos{\frac{c\pi nt}{L}}+ B_n\sin{\frac{c\pi nt}{L}}\right)\cos{\frac{n\pi x}{L}}$$

is a general (and formal, at least) solution to the vibrating string with fixed ends. How to write this as a superposition of a forward and a backward wave? That is, as $f(x+ct)+f(x-ct)$ for some $f$. (No need to worry about rigour here, an heuristic will do.)

I know, by elementary trigonometry, that $$\left(A_n\cos{\frac{c\pi nt}{L}}+ B_n\sin{\frac{c\pi nt}{L}}\right)\cos{\frac{n\pi x}{L}} =\\= (1/2)(A_n\cos +B_n\sin)\left(\frac{c\pi nt}{L} + \frac{n\pi x}{L}\right)+(1/2)(A_n\cos +B_n\sin)\left(\frac{c\pi nt}{L} - \frac{n\pi x}{L}\right),$$ but this doesn't seem to work because the variable $x$ is the one that changes sign, so apparently this cannot be interpreted as a sum of forward and backward waves.

Is there a workaround to this?

EDIT. The second wave is from another function $g$. The answer is then straightforward after oen's comment.

• Wait a minute: shouldn't the superposition of arbitrary forward and backward waves be of the form $f(x+ct)+g(x-ct)$? Then oen's observation should help you resolve the issue...
– anon
Jul 17, 2012 at 1:29
• @anon You're right. Stupid me. Jul 17, 2012 at 1:42
• @anon: Thanks for the careful reading. I skipped right over $f(x+t) + f(x-t)$ ... Jul 17, 2012 at 1:44
• @Weltschmerz: Typos happen to everybody! Jul 17, 2012 at 1:46
• Write $$a+bt=v(x+ct)+w(x-ct)=(v+w)x+(v-w)ct$$ where $v,w$ are constants and solve the subsequent linear system.
– anon
Jul 17, 2012 at 2:23

Notice that $\cos(t-x) = \cos(x-t)$ and $\sin(t-x) = -\sin(x-t)$.