Okay. We're in the final stages of solving the diffusion equation. We did the separation of variables ansatz, so we wrote the concentration, which is a function of position in time, as a product of two functions one which is only a function of x and the second which is only a function of t. By substituting into the diffusion equation, we were able to obtain two ordinary differential equations one for X, X double prime plus lambda X equals zero, which we showed gives eigenvalues and eigenfunctions as solutions when you had the two-point boundary value boundary conditions, X sub zero equals zero, and X sub L equals zero. So, we said that the solution of this equation occurs for non-zero X, when lambda n takes these discrete values n squared Pi squared over L squared, and then the corresponding function is sine n Pi x over L, n here is a positive integer. The second equation we got from separating variables was the T equation, that is T prime plus lambda DT equals zero, but now we've determined lambda to be lambda n so we can put lambda n into the T equation. This equation is pretty easy to solve. We're looking for a function whose derivative is equal to negative lambda n D times the function, that's just the exponential function with the proper argument. So we can write down the solution here. So, T of t, there's a constant in front but we're going to absorb that constant into our solutions when we do the principle of superposition. So, let me just set the constant equal to one. So we have an exponential function and then it should be minus lambda n D times T which will be minus n squared Pi squared D divided by L squared times t. Then this depends on n also because of lambda n, so I can put a subscript n here. We have our xn and our tn here. We can put them together, so we've constructed these functions U, I can call them U sub n, which is a function of x and t, is equal to X sub n which is sine n Pi x over L, times T sub n, which is the exponential function of e to the minus n squared Pi squared Dt here divided by L squared. So, in our ansatz, we assume that U was equal to x times t. What we found then is a whole bunch of solutions of that type, and a whole bunch means an infinite number of solutions of that type, of a sine times an exponential function. So this is valid for n equals one, two, three, all the way to infinity. Okay. Final step, Principle of Superposition. So, we apply the principle of superposition valid for linear homogeneous differential equations, and then we get the general solution. So, the idea here is to write down the general solution. So, the general solution for U, is U of xt equals the sum from n equals one to infinity of these functions, multiplied by a constant. So, we can call that constant b sub n, and then we have a sine n Pi x over L, and we have an exponential function e to the minus n squared, Pi squared D times t divided by L squared. Okay. That's our general solution for the concentration U. In a given problem though, you're going to specify what is the concentration in the pipe at T equals zero, that's called the initial condition. So, what would be the initial condition? The problem we're going to do in the next video, is when all of the dye is concentrated right in the middle of the pipe at t equals zero and then ask how that initial dye diffuses across the length of the pipe. Here, we can be very more general. We can say that, U of x at t equals zero is just some function of x. So, that's the initial concentration of dye in the pipe as a function of x. So, what happens if we put t equal to zero in this expression? Then we get f of x is equal to the sum from n equals one to infinity, of b sub n times sine n Pi x over L, times e to the zero, which is one. So the exponential function becomes one. I hope you recognize this, this is a Fourier Sine Series, a Fourier sine series. That was the whole purpose of introducing Fourier series at the beginning of this module. Because we need it now in the final solution of the PDE. In fact, Joseph Fourier invented Fourier series because he needed it in the final solution of the PDE. So, we know what the bn is, from the Fourier series analysis. We know that b sub n, then, is equal to two over L times the integral from zero to L of f of x times sine n Pi x over Ldx. That completes the solution of the diffusion equation. So, let me quickly review what we did. We were solving the diffusion equation. We did use the technique of separation of variables. In a previous video, we solved the x equation. In this video, we solve then the t equation. Then we've noted that we found a whole bunch of solutions satisfying x times t, these are given by use of U sub n here, a sine function times an exponential function. Then we applied the principle of superposition, so we have the general solution for the concentration. Now, we're being very specific, what is the initial conditions of the dye? What is the concentration at t equals zero? We specify that as some function f of x. In the next video, we'll further specify what f of x will be in an example problem. Once we do this, we see that f of x is actually written as a Fourier sine series for which we can then determine the coefficients b sub n in terms of an integral of f of x. I'm Jeff Chasnoff, thanks for watching, and I'll see you in the next video.