 Welcome to tutorial on separation of variables method for wave equation. In this tutorial we are going to solve 3 problems which are carefully chosen I will comment about them at the end. So problem 1 is solved by separation of variables method the IBVP for a damped wave equation this term UT because of the presence of this it is called damped wave equation and the initial conditions are given where U of x 0 is given to be sin cube x by 2 UT of x 0 is given to be 0 then we deal with mixed boundary conditions U of 0 t is 0 and dou u by dou x at pi t is 0 for t greater than or equal to 0. So let us go ahead and try to solve this by separation of variables method. So what is the step 1 in separation of variables method? It is try U of x t solutions to the given equation in the separated form. So on substituting this expression in the equation what we get is x t double dash plus x t dash equal to x double dash t and that further gives us t double dash plus t dash by t equal to x double dash by x. Now if you notice here the left hand side is a function of t only and the right hand side is a function of x only therefore as you know we set it equal to constant lambda. So therefore we have got two ODE's what are those x double dash minus lambda x equal to 0 and t double dash plus t dash minus lambda t equal to 0. Now from the given boundary conditions and initial conditions we should try to get conditions for x and t. So first boundary condition that we have is at 0 that is U of 0 t is 0 that implies that x of 0 t of t equal to 0 and that implies x of 0 equal to 0 because we do not want t to be an identically equal to 0 function. Now U x pi of t is also given to be 0 that means x dash at pi into t of t is 0 and that will give us x dash at pi equal to 0. So these are the boundary conditions that we obtained. Now we move on to step 2. Step 2 is to solve the boundary value problem x double dash minus lambda x equal to 0 with the boundary conditions x of 0 and x of x prime of pi equal to 0. We need to solve for non-zero solutions of this of course x identically equal to 0 that is useless because if x is identically equal to 0 U of x t will be 0 we are not interested. So we want to find non-zero solutions of this boundary value problem. It would not exist for every real number lambda and those real number lambda for which this boundary value problem admits non-zero solutions are called Eigen values and the corresponding non-zero solutions are called Eigen functions. In other words we are looking for Eigen functions of x double dash operator. So first is lambda equal to 0 if lambda is 0 what is the solution equation is x double dash equal to 0 so therefore x of x equal to a plus b x and when I apply this boundary condition x of 0 equal to 0 I get a equal to 0 if I apply x dash of pi equal to 0 I get b equal to 0. So what is the conclusion x is identically equal to 0. So lambda equal to 0 is not an Eigen value. Then we try for lambda which is positive we always write lambda equal to mu square and mu positive to avoid square roots in the expression of the solutions. Now when lambda equal to mu square what is the equation x double dash minus mu square x equal to 0 so solution is a combination of exponentials which is a e power mu x plus b e power minus mu x. Now x of 0 equal to 0 when I apply what I get is a plus b equal to 0 and I want to apply x dash pi therefore I should know what is x dash of x is x dash of x is a e power mu x minus b e power minus mu x. So when I put x equal to pi what I get is a e power mu pi minus b e power minus mu pi equal to 0 I have not included this mu because mu is non-zero it gets cancelled in this equation. So a and b are satisfying a system of two linear equations it is always a good idea to write them in the matrix form we are looking for a non-trivial solution for this system that means at least one of a and b is non-zero that will happen if and only if determinant is 0 but what is the determinant? Detonant is equal to minus e power minus mu pi minus e power mu pi this is not equal to 0 therefore the only solution is the 0 solution a equal to 0 b equal to 0 that implies x of x is identically equal to 0. So no positive eigenvalues in this problem now we look at negative eigenvalues so suppose lambda is less than 0 then as usual we put lambda equal to minus mu square mu is positive the equation is now x double dash plus mu square x equal to 0 and the boundary conditions let me reiterate here or this our solutions will be a combination of sin and cos here. So x of x equal to a cos mu x plus b sin mu x when we put x of 0 equal to 0 what we get is a equal to 0 when we put x dash of pi equal to 0 we have to compute what x dash x is after doing that and substituting x pi there x dash of pi equal to 0 this equation will give us mu b cos mu pi equal to 0. So cos mu pi equal to 0 if and only if mu equal to mu n equal to 2n minus 1 by 2 and n belongs to natural numbers. When done this we have solved for x now we have to solve for t. So solution of t double dash plus t dash minus lambda t equal to 0 this equation needs to be supplemented with a condition that comes from ut x 0 equal to 0 that will give us t prime of 0 is 0. Now here what is lambda? Lambda is minus mu n mu square but we have a sequence so let us put lambda n minus mu n square that is minus 2n minus 1 by 2 whole square. Now this is a second order ODE now let us write how the ODE looks now t dash plus 2n minus 1 by 2 whole square into t equal to 0. The solution of this will go through via the auxiliary equations m square plus m plus 2n minus 1 by 2 whole square equal to 0 and m is minus 1 by 2 plus or minus i times root n into n minus 1 and this is when n is greater than or equal to 2 and m equal to minus half it is a repeated road when n is equal to 1. So on solving with this equation we need to now solve with tn for tn now. So everywhere actually n now. The solution I write down the final solution please check for yourself is tn of t will turn out to be constant times e power minus t by 2 into 1 plus t by 2 if n is equal to 1 otherwise it is am e power minus t by 2 into cos root n into n minus 1 into t plus sin root n into n minus 1 t divided by root n into n minus 1 when n is greater than or equal to 2. So we have got our xn's and tn's now we are ready to move on to the step 3. Step 3 is solution as a formal series. So we write u of xt summation n equal to 1 to infinity xnx tnt usually we put a constant here but the constant we already put in tn so we will not write here. So that is nothing but a e power minus t by 2 into 1 plus t by 2 into sin x by 2 plus summation n greater than or equal to 2 an e power minus t by 2 into cos root n into n minus 1 t plus sin root n into n minus 1 t divided by root n into n minus 1 sin 2n minus 1 by 2 into x. Yeah I forgot to mention when we determine the eigenvalues we should have written down the expression for xn's also xn of x is actually sin of 2n minus 1 by 2 into x. This is n equal to 1. So this is t1 into x1 and this is tn and this is xn. So we need to determine these coefficients a and a n's. Now this is where we will use the initial condition that we have that is ux0 equal to sin cube x by 2 which by a trigonometric identity is 3 by 4 sin x by 2 minus 1 by 4 sin 3x by 2 but what is ux0 from our series that is a I am putting t equal to 0. So a sin x by 2 plus summation n greater than or equal to 2 a n sin 2n minus 1 by 2 into x. So this implies compare the background there is some uniqueness result for a Fourier series that is used. So what we get is a equal to 3 by 4 a2 equal to minus 1 by 4 a n equal to 0 for n bigger than or equal to 3. Therefore what did we get the solution as u of xt expression is 3 by 4 e power minus t by 2 1 plus t by 2 sin x by 2 minus 1 by 4 e power minus t by 2 into cos root 2 t plus sin root 2 t by root 2 into sin 3x by 2. So this is a solution. So if you want to simplify we can write e power minus t by 2 divided by 4 what we get 3 into 1 plus t by 2 sin x by 2 minus cos root 2 into t plus sin root 2 this is cos root 2 t. So sin root 2 t by root 2 sin 3x by 2. So please do these computations on your own that is when it will be clear whether it is cos root 2 into t or cos of root 2 t. So thus we have solved this problem 1. Let us move on to the problem 2. This is again solution by separation of variables. Now we have the usual wave equation u dt minus u xx equal to 0 on interval 0 1. Now the change here is both the initial data are non-zero. If you remember in the lecture we have taken one of them to be 0, one of them to be non-zero but now we will see what are the difficulties by taking both of them. In fact there are no difficulties as such. You will see that procedure is little more longer and now we have changed the boundary conditions to Neumann boundary conditions. In the lecture on separation of variables method we consider Dirichlet boundary conditions. Now we are considering a different boundary conditions. Mixed ones we already considered in problem 1. So after this tutorial you should be able to solve any mix of these boundary conditions. Let us turn to the solution to problem 2. The step 1 as always is trying solutions which are in the separated form. So on substituting this in the wave equation we get t double dash by t equal to x double dash by x and since left hand side is a function of t alone, right hand side is a function of x alone it has to be a constant function. So therefore this gives us two ODE's they are x double dash minus lambda x equal to 0, t double dash minus lambda t equal to 0 and we also get boundary conditions from the given boundary conditions which are ux of 0 t equal to 0 that means that x dash at 0 into t of t is 0 we do not want t to be 0 function therefore x dash of 0 is 0. The other boundary condition ux of 1 comma t is 0 the same argument we get that x prime at 1 equal to 0. Step 2 is to solve the BVP or the eigenvalue problem x double dash minus lambda x equal to 0 x prime of 0 equal to x prime of 1 equal to 0. So we consider the cases lambda is 0, lambda negative and lambda positive. So when lambda is 0 solution is x of x equal to A plus Bx and this boundary condition x prime of 0 equal to 0 will give us B is 0 and the boundary condition x prime of 1 equal to 0 will also give us B equal to 0 which means the conclusion is that lambda equal to 0 is an eigenvalue. What is eigen function? It is a function which is a constant function A any constant function is an eigen function. Let us consider lambda to be positive lambda equal to mu square mu positive the solution will be of exponential type x of x equal not exponential type combination of exponentials. This is what we have and x dash of x is mu into A e power mu x minus B e power minus mu x. When I apply this boundary condition x prime of 0 is 0 we get A minus B equal to 0 when we apply x prime of 1 is 0 x prime of 1 is 0 we get A e power mu minus B e power minus mu equal to 0 and we said we should always write this as a system because it is easy to check whether we have non-trivial solution or not depending on whether the determinant is 0 or not. What is the determinant? Determinant is minus e power mu there is a typo here minus e power minus mu minus e power mu and that is not equal to 0. Therefore, A and B are 0s and x is 0. So, negative real numbers are not eigenvalues. Now, let us check for positive sorry positive or not eigenvalues let us check for negative numbers lambda less than 0. So, lambda is equal to minus mu square mu positive and now the solutions are combination of cos and sin A cos mu x plus B sin mu x we would require x prime. So, let us compute that. So, the conditions that we have x prime of 0 equal to 0 and x prime of 1 equal to 0 they give us that B is 0 and on substituting B equal to 0 we get sin mu equal to 0. So, mu has to satisfy sin mu equal to 0 which is the case if and only if mu is a multiple of pi and we take natural numbers because mu is supposed to be positive. So, let us cut something and do something here mu equal to n pi n natural numbers because mu is supposed to be positive that is the assumption that is how we chose n. So, mu equal to n pi. So, what is the summary after this we have got lambda n which is equal to minus mu n square equal to minus n square pi square and what are the eigenvectors x and of x equal to A cos mu that is n pi x n greater than or equal to 1. Now, we need to solve the ODE for t solve ODE for t we have eigenvalues here lambda equal to 0 is an eigenvalue and lambda n equal to minus n square pi square or eigenvalues. So, let us solve with lambda equal to 0 the equation is t double dash equal to 0 that implies t of t equal to A plus Bt we do not have any conditions on t because we are given non-zero Cauchy data therefore we cannot do anything. So, we keep it as it is in the end we will determine these coefficients and when lambda is less than 0 we have a sequence of such problems tn double dash plus n square pi square t equal to 0 and solutions to this are given by An cos n pi t plus Bn sin n pi t. So, now we have solved for xn and tn. So, these are the things we have this is tn of t. Now, we are in a position to express a solution as a superposition of all these functions we have obtained. So, step 3 is u of xt is A plus Bt plus summation n bigger than or equal to 1 An cos n pi t plus Bn sin n pi t into cos n pi x. So, this corresponds to the eigenvalue lambda equal to 0 and this is t that we got x was constant. So, that constants are there inside this A and B. So, we do not try explicitly again these are the ones which are corresponds to the eigenvalues lambda n n greater than or equal to 1. Now, we move on to step 4 where we have to determine these constants. So, we use u of x 0 equal to cos pi x this is what is given to us but from this series it will be equal to A plus because t equal to 0 A plus summation n bigger than or equal to 1 An cos n pi x. So, that implies that A is equal to 0 A1 equal to 1 An equal to 0 for n bigger than or equal to 2. So, we have determined An's now we need to determine Bn's for which we have another initial condition. So, at the end of this previous step what we have is u of xt equal to or this formal thing is Bt plus cos pi t cos pi x plus summation n bigger than or equal to 1 Bn sin n pi t cos n pi x. So, therefore, we have to see what is u t of xt u t of xt is B minus pi sin pi t cos pi x plus summation n bigger than or equal to 1 n Bn cos n pi t cos n pi x. Now, we have to see u t of x 0 because that is what is given to us. u t of x 0 is given to be equal to sin pi x is what we want and from this series when I put t equal to 0 what I get is B plus summation n bigger than or equal to 1 n Bn cos n pi this is what we have. So, let us call this star. So, star says us that the series that we have on the RHS is a Fourier cosine series for sin pi x star gives Fourier cosine series for this function sin pi x. So, which functions have only cosine series they are the even functions. Therefore, what we need to do is to extend this function which function sin pi x it is given in this interval we have to extend this to a function let us denote it as g x which is now defined on the other side of 0. It extends this function sin pi x as even function. So, g of x is equal to sin pi x in the interval 0 1 minus sin pi x in the interval minus 1 to 0. g is an even function on minus 1 comma 1. Therefore, when we write its Fourier series it will only involve cosines and if the equality holds when you restrict the equality to the interval 0 1 what you get is this star. So, using this idea we are going to determine these constants B and Bms. So, g of x equal to B plus summation n bigger than or equal to 1 n Bn cos n pi x. So, first let us observe certain things integrate between minus 1 and 1 that is our interval gx dx that is minus 1 to 1 B. So, do not question whether this exchange of integral and summation is allowed. When it is allowed what happens that is what we are looking at. The series we are going to everything we are doing formal computations. This we have. This is 0 and this is 2B. Then what is this? Let us compute minus 1 to 1 gx dx because g is even this is 0 to 1 2 times gx dx even with respect to 0 x equal to 0. And that is nothing but 2 times 0 to 1 sin pi x dx that is 4 by pi. So, this gives us B is equal to 2 by pi. So, we have got B. Now, we need to get Bns. So, second is this computation for k bigger than or equal to 1 minus 1 to 1 gx cos k pi x dx that is equal to minus 1 to 1 B cos k pi x plus summation n Bn minus 1 to 1 cos n pi x cos k pi x dx. Now, this integral is 0 because cos n minus 1 to 1 cos n k pi x. So, therefore, this integral will be 0 and what is this integral? This is an even function. So, therefore, that is equal to 2 times 0 to 1 of the same integrand and that integrand is nothing but we can use cos a plus b formulas. So, what we get even use is yeah. So, we get that is equal to 0 to 1 cos n plus k pi x plus cos n minus k pi x. So, that will be 0 if n is not equal to k and that will be equal to 1 if n equal to k. Therefore, minus 1 to 1 gx cos k pi x equal to k Bk. So, on the other hand minus 1 to 1 gx cos k pi x dx is given by 2 times 0 to 1 sin pi x cos k pi x dx. This upon simplification will give us 4 by pi into k plus 1 into 1 minus k if k is even 0 if k is odd. So, the same thing is equal to k into Bk that is what the expression we obtained by using the series. So, therefore, this gives us the expression for Bk. So, Bk is equal to minus 4 by pi into k plus 1 k k minus 1 if k is even and 0 if k is odd. Therefore, u of x t is 2 by pi into t plus cos pi t into cos pi x minus 4 by pi summation k bigger than or equal to 2 k even natural number 1 by k plus 1 into k into k minus 1 into sin k pi t cos k pi x. So, this is the solution that we obtained. In this example, naturally we ran into a Fourier cosine series and we have seen how to compute the coefficients on the solution. Let us move to problem 3. Here it is a non-homogeneous wave equation. So, as such we have learned separation variables method for homogeneous wave equation. We will see how to modify it and get it for a non-homogeneous wave equation that is why it is also called method of eigenfunction expansion. The idea is that keep this 0 get the eigenfunctions as we have computed and then propose a series in terms of them with the coefficient which are functions of t, substitute the entire series in this equation and try to solve that is the idea. So, here once again we consider non-zero Cauchy data in both of them and we consider the Neumann boundary conditions. Step 1 is the same. Step 1 is take homogeneous wave equation and that is what I have indicated because we are now going to compute the eigenfunctions and try separated solutions substitute in the wave equation that will give you x double dash by x equal to t double dash by t equal to lambda. Then we have to get boundary conditions and those are x prime of 0 equal to x prime of 1 equal to 0. We obtained this just in the last problem exactly the same computations. Now we need to solve the boundary wave problem. So, x double dash minus lambda x equal to 0 with x prime of 0 equal to x prime of 1 equal to 0. So, suppose you take lambda equal to 0 we saw that solution is constant earlier it is the same boundary conditions same problem and lambda positive is not no eigenvalues and lambda negative we set lambda equal to minus mu square mu positive and that gives us that solutions are A cos mu x plus B sin mu x and x prime of x is equal to minus A mu sin mu x plus B mu cos mu x. Using this boundary condition x prime of 0 equal to 0 that will give us B equal to 0 and x prime of 1 equal to 0 that will give us sin mu equal to 0 that implies or if and only if is mu is n pi n belongs to n. Therefore, lambda is equal to lambda n equal to minus n square pi square and x n of x is equal to cos n pi x. So, these are the eigenvalues and eigenfunctions coming from x. Now, step 2 let us just recall what we have lambda not equal to 0 0 is an eigenvalue x 0 x is any constant let me take it as 1 and x n of x is cosine n pi x lambda n equal to lambda n equal to minus n square pi square and n greater than or equal to 1. These are the 2 sets of eigenvalues we got this is with 0 eigenvalue this is for the negative eigenvalues and there are no positive eigenvalues here. So, now idea is try the formal series expansion as a solution what is that try the formal series. So, we take a series let us say infinite linear combination of these x 0's and x n's with coefficients which are functions of t u of x t equal to t naught of t into 1. So, just t naught of t plus summation n equal to 1 to infinity of t n of t into x n which is cos n pi x. So, what we are doing is solution to non-homogeneous equation or non-homogeneous initial problem as an eigenfunction expansion. This is the meaning of eigenfunction expansion. So, when we substitute substitute into the equation of the given equation what we get is we need to compute u t t and u x x. So, what is u t t and u x x let us see that u t t is nothing but t naught double dash plus summation n equal to 1 to infinity t n double dash cos n pi x. What is u x x that is summation n is equal to 1 to infinity t n of t into minus n square pi square cos n pi x is what we get t 0 double dash summation n is equal to 1 to infinity t n double dash plus n square pi square t n into cos n pi x equal to cos 2 pi t cos 2 pi x. This is what we get after we substitute the expressions in the given non-homogeneous wave equation. So, from here comparing t naught double dash equal to 0 that of course gives us that t naught of t is a plus b t and then t 2 double dash plus 4 pi square t 2 equal to cos 2 pi t. It is something like comparison of 2 vectors in a vector space which are already expressed in kind of basis something like that components must be equal. So, cos 2 pi x coefficient here is cos 2 pi t and here it is this t 2 double dash plus 4 pi square t 2 and other things are 0. So, for n not equal to 0 and n not equal to 2 the equation will be t n double dash plus n square pi square t n equal to 0. Now, we need to solve these equations. So, t naught we already solved let us write separately now t 0 of t is a plus b t. What is t 2 of t? We have to solve this non-homogeneous equation ODE that is a 2 cos 2 pi t plus b 2 sin 2 pi t plus t by 4 pi t by 4 pi into sin 2 pi t. And t n of t for n not equal to 0 and 2 t n of t is equal to a n cos n pi t plus b n sin n pi. Therefore, what is u x t? u x t is equal to a naught plus b naught t into 1 plus t by 4 pi sin 2 pi t cos 2 pi x plus summation n is equal to 1 to infinity a n cos n pi t plus b n sin n pi t into cos n pi x. What are these terms? This is t naught of t. This is x naught of x. This is a part of t 2 of t. Remaining part is clubbed in this expression. This is x 2 of x. So, this is the expression for u x t. Now, we have to apply initial conditions that we have. So, what are the initial conditions? So, I c 1 is half plus half cos 2 pi x. This is what is u x 0. You can check that. That is equal to a naught plus summation n is equal to 1 to infinity a n cos n pi x. Now, by the same comparison, a naught is equal to 1 by 2. a 2 is also equal to 1 by 2 and a n equal to 0 for n different from 0 and 1. Then, I c 2 that is 2 cos 2 pi x equal to u t of x 0 and that is equal to b 0 plus summation n is equal to 1 to infinity n pi b n cos n pi x. That implies that b 2 is equal to 1 by pi and b n is equal to 0 if n is not equal to 2. So, combining all this, we get this expression for the solution. u of x t is equal to half plus half cos 2 pi t plus t plus 4 by 4 pi sin 2 pi t into cos 2 pi x. So, this is the solution. Let us see the summary of what we did in this tutorial. In lecture 4.11, we considered IBVP with Dirichlet boundary conditions. In problem 1, we had mixed boundary conditions and problems 2 and 3, we had Neumann boundary conditions. In problems 2 and 3, both initial conditions were non-zero. So, method of eigenfunction expansion was demonstrated in problem 3 to solve the non-homogeneous equations. Thank you.