 Now that we have some idea of how to solve the one-dimensional heat equation, let's actually try to solve the one-dimensional heat equation. So we found a solution to the one-dimensional heat equation with given boundary values with this formula. But remember the worst way to learn mathematics is to memorize formulas. And so you do yourself a great favor if you've just ignored the formula. The best way to learn mathematics is to understand concepts. And so remember we arrived at the solution through two steps. First, we assume separability, and then we use the initial conditions to determine restrictions on the constants. So let's see how that plays out. So let's consider this problem. Now we won't go over every single step in the solution. Let's start about midway through where we know the form of our solution. And so it remains to find the coefficients bn. So again the best way to learn mathematics is to understand concepts. In this case, remember that our initial temperature distribution is going to be given by some function of x only. And so since u of 0x is i of x, this means that i of x is going to be the trigonometric series. But again, once we have a trigonometric series, we can find the coefficients by multiplying by a trigonometric function and then integrating over one full period. So again, assuming convergence, we can interchange the integral of the summation. And again, since we're integrating over one full period, if k is not equal to n, the integral will vanish, leaving only the sine k terms, which we can rewrite. And again, since we're integrating over one full period, the trigonometric terms will be zero. So the cosine component will vanish on integration, leaving. And after all of that settles, we get... On the left-hand side, because i of x is a sine series, it's an odd function. Since sine is an odd function itself, we have a product of odd functions, which means that i of x times sine k pi of x is going to be an even function. So the integral over a symmetric interval is going to be twice the integral from zero to the end point, which tells us what bk is. And we can evaluate this integral. Remember, we're told that the initial temperature of the rod is 20 degrees. So i of x is equal to 20 for all x. So integrating gives us... Now the actual value of bk is going to depend on the value of cosine of k pi, and that is going to depend on whether k is odd or even. If k is odd, then the cosine of an odd multiple of pi is going to be minus one. Cleaning this up a little, we find... And so bk is going to be 80 over k pi. On the other hand, if k is even, then cosine of an even multiple of pi is going to be one, and so bk is going to be zero. Consequently, our function is going to look like the following. If n is even, then bn is equal to zero and the terms vanish, and that means we could write our series as this series, where n is taken to be an odd number. And again, while this is a perfectly good way of expressing this series, to gain street cred among gangs of rogue mathematicians, you can rewrite it as follows. n being odd is the same as n equals 2k plus 1 for k equals zero to infinity, so our series can be rewritten as... And since it doesn't matter what we call the index variable, we'll call it n and get our final answer. Now, this is a lot of work, and it's easy to get lost in the details, so it's worth checking. So remember our basic assumptions. The n points are going to be held at a constant temperature of zero, but if x is equal to zero, then all of our sine terms are going to be zero, and so u of t zero is going to be zero. At x equal to l, the other n point, we want the temperature to be zero, so if x is equal to l, we're taking the sine of an odd multiple of pi, which is also going to be zero. So u of t l is going to be zero. Meanwhile, u of zero x is going to correspond to the initial temperature distribution of the rod, and if we've done our work correctly, then when t is equal to zero, we get the Fourier series for our initial temperature 20 degrees above zero. Well, I wouldn't take my word for it. We'll graph i of x equals 20 and the successive partial sums of our series. Since l is a constant, it doesn't matter what we use for it, so we'll use l equals one and consider only the interval for x between zero and one. So if t equals zero, our series becomes, now if we consider some function f of x equal to just the first term of the series, we can graph it and get, now if we include the second term of the series, including the third term, the fourth term, and it certainly seems plausible if we include all the rest of the terms of the series, we will get convergence to i of x equals 20. We also have a differential equation we're trying to solve, so we can find a partial derivative with respect to u, our partial derivative with respect to x, actually we need the second partial with respect to x, and our differential equation is the partial of u with respect to t should be alpha squared times the second partial with respect to x, and so if we compare, we see that our differential equation is also satisfied. And finally, we can also take a look at a graphical version of our solution. Although u of tx is a function of two variables, we can examine the behavior of u by considering how it looks for different values of t, and this will give us a stop action animation of the function.