So, we've done a lot of work to solve the diffusion equation. We were solving Ut equals DUxx. We had this homogeneous Dirichlet boundary condition, so that the pipe of length L and these two large reservoirs at the end, so that the concentration of the dye at the ends of the pipe go to zero. We also specify some initial condition of the dye in the pipe. Here was quite general f of x. Our solution then was this series for u of x t with these coefficients b sub n and the coefficients are given in terms of this initial concentration of the dye. So, in this video, I want to work an example where I'll tell you what the initial concentration of the dye is and then we see what the solution looks like. So, let me draw a picture of our pipe. So, here is the pipe, it has a very large reservoirs at the end. All right. It's starting at zero and ending at L. So, pipe of length L. So, our natural first look at this solution for initial concentration is to put all of the dye initially in the middle of the pipe. So, we're going to put all of the dye right in the middle. That will be at L over two. Okay. Then we're going to look to see how does this dye then diffuse outward to the right and to the left, there will be symmetric, and eventually the mass of the dye that we've put into the pipe will diffuse out into the reservoirs in the end. How do we model that? Well, that's the initial. This is at t equals zero. Right. This is our f of x. So we have to write down an f of x. What should it be? Well, this dye here is only in the middle. So, u should be zero everywhere in this pipe except that position x equals L over two. But the dye has some mass. Right. So, the concentration is the mass per unit length. So that if we integrate over the length of the pipe, we should have some mass. We can call that mass M zero. This is some function that when you integrate over the length you get a mass of M zero but it's zero everywhere except that L over two. So, the way to model this is by our Dirac Delta function centered at L over two. A very nice application of the Dirac Delta function in this problem. We saw this before, when we discussed impulse forces and we did the Laplace transform technique for all these. So, now we're modeling the concentration of the dye as a Dirac Delta function. All the mass is at a single cross section of this pipe. Okay. Then, we can calculate the b sub n. So, b sub n is equal to two over L times f of x. So, the M naught can come out. So two M naught over L times the integral from zero to L, the Dirac Delta function centered at L over two times sine n pi x over L dx. Now, here comes the beauty of the Dirac Delta function in modeling. Besides being a beautiful model for the dye being concentrated in the middle, it also makes the integration trivial. Remember that when you integrate a function against the Dirac Delta function, it just picks out the value x equals L over two. So this is two M naught over L times sine x equals L over two so n pi over two. Okay. That's the solution for b sub n. If we're just interested in the longer time behavior, longer time here means that t is somewhat larger than L squared over d because this exponential function when n is larger than one will cause the terms to go to zero very fast. So, the diffusion time is defined as L squared over d. So, if t is larger than that diffusion time, the most important term in this sum will correspond to n equals one. So, let's just look at the n equals one term. That will be b sub one, n equals one we have a sine pi over two is one. So, that will be two M naught over L. Then u of xt then, is approximately just the first term here which will be two M naught over L times sine pi x over L times e to the minus pi square dt over L squared. That will be the solution for large enough times when we can neglect all the higher order terms in n. Okay. So, What does that look like if we draw a picture, rather crude picture. If I draw the pipe here with the reservoir, the distribution of the dye looks like sine pi x over L. So, the sine function has a peak at L over two and zero on the ends. So, there's almost no dye at the ends. Then there's a lot more dye in the middle. Right? There all dye at the end allowed to dye in the middle. So, the dye has diffused. If you look at a graph, we can graph the concentration versus x. It would look like a sine function. So, it would look like this and it would be decaying in time. So, everything would be decaying down in time. Okay. Flattening out. So, let me review then what this example is about. In the previous three videos, we derived the diffusion equation for diffusion of dye in a pipe and then we've solved it using separation of variables with the boundary conditions of the homogeneous Dirichlet boundary conditions where the two ends are connected to reservoirs and some general initial condition for the concentration. This was our solution. In this video, I'm looking at the very specific initial condition when all the dye is centered in the middle of the pipe at t equals zero and then it diffuses outward. We Model that very nicely using the Dirac Delta function, that allows us to do the integral for bn very quickly and then the leading order term, which is valid when the time is larger than the diffusion time, gives us that the behavior of the dye looks like a sine function over the domain that's decaying exponentially. Okay. Congratulations to making it to the end of the course. We've done ODE's, and now we've done PDE's. So we've covered a lot of material in this course and I think by making it to this video you guys have learned a lot. Thanks for watching.