When
two waves are present in the same medium, the resultant distortion of the
medium is simply the sum of the two individual distortions. The waves here
have the same wavelength, frequency, and amplitude. The only difference
between them is their direction of travel.
Trigonometry allows the solution to be written as a product of two sine functions. A phase angle, phi, has been added to allow explicit control over the choice of origin (where x=0).
This solution is not a traveling wave. Though it is the superposition of two travelling waves, it is a standing wave. If y represents the vertical displacement of a horizontal string, an observer sees each point on the string reach its maximum (or minimum if the sin(kx) term is negative) value at the same time. No traveling wave crest is observed.
A standing wave typically results from the imposition of a pair of boundary conditions. One is at x=0 and another is at some other location, x=L. In this standing wave solution, if the string is not allowed to move at x=0, then the phase angle phi is zero. If at x=L the string is also fixed, most values of k will fail to work in the solution. k must be such that kL=n pi (where n is an integer) so that the sine function is zero at x=L.
This means only waves whose wavelengths are an integral multiple of 2L will work as standing waves with these boundary conditions. From the relation between wavelength and frequency, it is seen that the allowed frequencies are nf0 where f0=c/(2L).
On the other hand, if the string is free to move at x=0, then the derivative of y with respect to x must be zero. This can be accomplished by making the phase angle phi equal to pi/2 so that the spatial dependence becomes a cosine function of x.
If the boundary condition is the same at both ends, then the allowed frequencies are nf0 where f0=c/(2L).
If one end is fixed and the other free, then mf0 where f0=c/(4L) and m is an odd integer.