Introduction to Partial Differential Equations part of EM, Scalar and Vector Fields module (PHY2064) November 12, 2018
Wave equation in one dimension This lecture Wave PDE in 1D Method of Separation of Variables to solve wave PDE Solution with just one wavevector k Fourier series
Wave equation in one dimension The one-dimensional wave equation, for a function W (x, t), is 2 W (x, t) x 2 = 1 2 W (x, t) c 2 t 2 or equivalently 2 W (x, t) t 2 = c 2 2 W (x, t) x 2 where c is the speed of the wave. Note that it is a linear homogeneous PDE. W could be, for example, a component of an EM field, the pressure of air in a sound wave moving along the x axis, or it could be the displacement of a string, for a wave moving along a taught string.
Wave equation in one dimension: Standing wave solutions via method of separation of variables The main technique we will use for solving the wave, diffusion and Laplace PDEs is the method of Separation of Variables. For the wave equation in 1D, this works as follows. We know the solution will be a function of two variables: x and t, W (x, t). We assume it has a specific form, namely that it is the product of a function only of x, X (x), times a function only of t, T (t). W (x, t) = X (x)t (t) Using this we can break the PDE into a pair of ODEs, each of which is much easier to solve than the PDE. Note that this assumption is wrong for most functions of x and t, e.g., W (x, t) = x + t cannot be written in the form of X (x)t (t).
Wave equation in one dimension: Standing wave solutions via method of separation of variables Because the assumption W (x, t) = X (x)t (t) is not correct in most cases it will give us a solution, but usually not the particular solution that is consistent with the boundary conditions we want to apply. This is where Fourier series come in. We will find that X and T are sines and cosines, and from the mathematics of Fourier series we know we can write essentially any function as a sum of sines and cosines. Because we can write any function as a Fourier series, we can use a Fourier series to satisfy any set of BCs.
Wave equation in one dimension: Standing wave and travelling wave solutions The one-dimensional wave equation, for a function W (x, t), is 2 W (x, t) x 2 = 1 2 W (x, t) c 2 t 2 If we substitute W (x, t) = X (x)t (t) into the one-dimensional wave equation we get 2 X (x)t (t) x 2 = 1 2 X (x)t (t) c 2 t 2
Wave equation in one dimension: Standing wave solutions We can take T out of the x differentiation as it is independent of x, and similarly we can take X out of the t differentiation, then T (t) d2 X (x) dx 2 = 1 c 2 X T (t) (x)d2 dt 2 If we divide both sides by XT, we get 1 d 2 X (x) X (x) dx 2 = 1 1 d 2 T (t) c 2 T (t) dt 2 Now, we notice that the left-hand side is a function of x but not of t while the right-hand side is a function of t but not of x.
Wave equation in one dimension: Standing wave solutions So the LHS tells us that the equation does not depend on t (the only function of t is T and that is not present on the LHS), and the RHS tells us that it does not depend on x. Therefore it cannot depend on either x or t, and so must be a constant. At the moment we don t know what this constant is and so could call it C. But as we ll see we ll need it to be negative, and it will help if is squared, so we will call this constant k 2. So we have 1 d 2 X (x) X (x) dx 2 = 1 1 d 2 T (t) c 2 T (t) dt 2 = k 2 which gives us the two ODEs d 2 X (x) dx 2 = k 2 X (x) and d 2 T (t) dt 2 = k 2 c 2 T (t)
Wave equation in one dimension: Standing wave solutions Revision The two ODEs are just the ODEs for SHM d 2 X (x) dx 2 = k 2 X (x) and The solutions of these ODEs are d 2 T (t) dt 2 = k 2 c 2 T (t) X (x) = A cos(kx)+b sin(kx) and T (t) = C cos(kct)+d sin(kct) Note that these are the general solutions to these second order ODEs as they each have two unknown constants.
Why the minus sign? We choose the sign as we wanted sine and cosine functions. If we picked a + sign, we would get exponentials, which are not useful for the problems we study here but might be in other problems. The fact that k is squared is because if we do this we get that k is just the standard wavevector a wave, i.e., k = 2π/λ, for λ the wavelength of the wave.
Wave equation in one dimension: Standing wave solution We can multiply X and T together and get the solution for W W (x, t) = X (x)t (t) = [A cos(kx) + B sin(kx)] [C cos(kct) + D sin(kct)] or W (x, t) = AC cos(kx) cos(kct) + AD cos(kx) sin(kct) + BC sin(kx) cos(kct) + BD sin(kx) sin(kct) Defining the four new constants E = AC, F = AD, G = BC and H = BD we have that the solution is W (x, t) = E cos(kx) cos(kct) + F cos(kx) sin(kct) + G sin(kx) cos(kct) + H sin(kx) sin(kct) This solution has four terms: the four combinations of sines and cosines as functions of space and of time.
Wave equation in one dimension: Standing and travelling wave solutions The wave PDE can be solved by both standing and travelling wave solutions. Standing wave is W (x, t) = E cos(kx) cos(kct) + F cos(kx) sin(kct) while travelling wave solution is + G sin(kx) cos(kct) + H sin(kx) sin(kct) W (x, t) = P cos (k(x ct)) + Q cos (k(x + ct)) + R sin (k(x ct)) + S sin (k(x + ct)) there are 4 travelling waves, a sine and cosine moving with velocity +c, and a sine and cosine with velocity c. Can convert between the two using the trig identity 2 cos(α) cos(β) = cos(α + β) + cos(α β) and the equivalent for the sine function.
Boundary conditions As always, determining the particular solution requires not just solving the PDE, but imposing the BCs. We will see how this works using a simple example where we assume only waves with one wavelength λ, and so one wavevector k = 2π/λ are present.
BCs for example with only one wavevector k A possible solution of the wave equation, for waves of speed c = 2, consists of cosine standing waves of amplitudes A and B W (x, t) = A cos(kx) cos(2kt) + B cos(kx) sin(2kt) This is 3 constants whose values we need to determine in order to determine the particular solution: A, B and k. The BCs we look at here are initial conditions, i.e., state of the wave at t = 0. Because the wave equation is second order with respect to the time derivative, we have two BCs at t = 0: First BC: W (x, t = 0) = 10 cos(0.75x) and the time derivative of this wave, ( ) W (x, t) Second BC: t t=0 = 0
BCs for example with only one wavevector k If we impose these BCs, we get W (x, t = 0) = 10 cos(0.75x) = A cos(kx) cos(0) + B cos(kx) sin(0) or 10 cos(0.75x) = A cos(kx) so we must have that k = 0.75 and A = 10. Note that here we are equating functions and so LHS = RHS at all values of x. The solution then becomes W (x, t) = 10 cos(0.75x) cos(1.5t) + B cos(0.75x) sin(1.5t)
BCs for example with only one wavevector k For the second BC we need the time derivative W (x, t) t = 15 cos(0.75x) sin(1.5t) + 1.5B cos(0.75x) cos(1.5t) equating this to the 2nd BC ( ) W (x, t) t and t=0 = 0 15 cos(0.75x) sin(0)+1.5b cos(0.75x) cos(0) = 1.5B cos(0.75x) = 0 so B = 0.
BCs for example with only one wavevector k The particular solution is then W (x, t) = 10 cos(0.75x) cos(1.5t) For example, the thick green curve below is at t = 0, while the thinner cyan curve is 1 s later. Note that this solution is just one simple standing wave. 10 W (x, t) 5 0 5 10 0 5 10 15 x
Wave equation in one dimension: Fourier Series travelling wave solutions Any solution of the wave PDE, with period L, can be written in terms of a sum of travelling waves, i.e., functions like sin(k(x ct)) W (x, t) = C + n=1 [ ( 2πn A n cos L ( ) 2πn + C n cos (x + ct) L ) ( 2πn (x ct) + B n sin L ( 2πn + D n sin (x + ct) L ) (x ct) because all the above terms are solutions of the wave PDE, and we know we can write any function as a Fourier series, so using a Fourier series we can satisfy any BCs. The first two terms in the sum are sine and cosine waves moving to the right, with speed c, whereas the last two terms are sine and cosine waves moving to the left, with speed c. )]
Example Fourier Series travelling wave solution We can consider a simple example: the square wave, defined by { 1 π < x < 0 W (x, t = 0) = +1 0 < x < π has the Fourier series W (x, t = 0) = n=1,3,5,7,... 4 sin (nx) nπ Note that for this particular square wave, the sum only includes every second term, the n even terms are zero.
Travelling wave solutions as Fourier Series To convert this to a travelling wave moving with speed +c all we need to do is replace x by x ct W (x, t) = n=1,3,5,7,... 4 sin (n(x ct)) nπ In effect, we are applying BCs here. The BCs are that at t = 0 W (x, t = 0) is the square wave on the previous slide, and that it then moves forward at speed c (i.e., no component moving at c.).
Travelling wave solutions as Fourier Series A plot of a sine wave approximation (up to n = 25) square-wave travelling wave W (x) of wavelength L = 2π, at two times, t = 0 (dark green thick curve) and t = 2 (cyan thinner curve). The speed c = 1. 1 W (x, t) 0 1 0 5 10 15 x
Wave equation in one dimension This lecture Wave PDE in 1D Method of Separation of Variables to solve wave PDE Solution with just one wavevector k & BCs Fourier series