WEBVTT mathematics/differential-equations/murray
00:00:00.000 --> 00:00:09.000
Hi and welcome back to the differential equations lectures here on www.educator.com, my name is Will Murray and we are studying partial differential equations.
00:00:09.000 --> 00:00:21.000
What we are going to do in this lecture is solve the heat equation we are going to combine everything we learned about Fourier series and separation of variables, put it all together and get an actual solution to the heat equation.
00:00:21.000 --> 00:00:30.000
Let us see how that works out, we are going to solve the heat equation and its boundary and initial conditions, I will just remind you that this was the PDE that we started with.
00:00:30.000 --> 00:00:53.000
PDE stands for partial differential equation and we had these two boundary conditions U(0t)=0 and U(Lt)=0 and those are the boundary conditions and then we had this initial condition which told us what happened when we plugged in t=0.
00:00:53.000 --> 00:01:10.000
That represented the initial distribution of heat along this rod, let us see what the progress that we have made so far, we started to solve this using separation of variables that was in an earlier lectures, you will see one called separation of variables.
00:01:10.000 --> 00:01:22.000
We did a lot of work back in this earlier lecture and we got a general solution to both the partial differential equation and it also match the boundary conditions.
00:01:22.000 --> 00:01:38.000
And this what we got U(Xt)= a series b(n) x sin(n) π(x)/L and then this fairly complicated expression e^-(n² π² α²)t/L².
00:01:38.000 --> 00:01:53.000
This looks very complicated but it is actually very formulaic, in particular all of these constants comes straight out of the differential equation, for example the α² comes straight from the differential equations, you can just drop that in.
00:01:53.000 --> 00:02:08.000
Same with the L, straight from the differential equations, you can just drop that in, this is very formulaic, all you have to do is just drop in the constants, the only part here that we have not figured out yet is the (bn).
00:02:08.000 --> 00:02:23.000
That is the part they we are going to focus on in this lecture, what we try to do here is we try to match the initial condition, I said we already got a solution, this solution the we just found is it already matches the partial differential equation.
00:02:23.000 --> 00:02:40.000
And it matches the boundary conditions, the only part that it does not necessarily match yet is the initial condition, which is that U(x0) should be equal to f(x), let us see what that means when you plug in t=0 into our solution.
00:02:40.000 --> 00:02:57.000
That means you are plugging in 0 here, which means you are just getting e⁰ which is 1, all of those e terms just turn into 1 and what we got is the sum of (bn) x sin(n π(x)/L)=f(x).
00:02:57.000 --> 00:03:15.000
What you see here is that is exactly a Fourier series, that is why we did all that work in the previous lecture learning about Fourier series is because we are going to use it right now, we need to expand f(x) into a Fourier series.
00:03:15.000 --> 00:03:31.000
We want a Fourier series which uses only sines and we want to find those coefficients (bn) by finding a Fourier series for f(x) that uses only sines, let me show you what the procedure is.
00:03:31.000 --> 00:03:50.000
Remember that you are given f(x), it will be defined between 0 and L because that represented the initial distribution of heat in this rod and we assumed that the left hand under the rod was 0.
00:03:50.000 --> 00:04:11.000
The right hand end of the rod was L and that f(x) is defined between 0 and L, what we want to do is extend it to -L, and extended to be an odd function and the reason for that is that then we know that it is a Fourier series we will have only sines.
00:04:11.000 --> 00:04:20.000
That is something we learned out in the previous lectures, if you have not just watch the previous lecture on Fourier series, this is where we are using it, you might want go back and check that previous lecture.
00:04:20.000 --> 00:04:41.000
Then we are going to find the Fourier series for f(x) and we figured out when you have an odd function, it will be easier to find the Fourier series that it is for general functions, just have this (bn) is equal to 2/L x the integral from 0 to L of f(x) x sin((n π(x)/L(dx)).
00:04:41.000 --> 00:04:58.000
That tells you what the (bn) is, all you do is you take that (bn) and you drop it back in to our general solution to the heat equation, you just take this BN, drop it back in right here and everything else like I said is predetermined from the differential equation.
00:04:58.000 --> 00:05:07.000
You got the L, the α² from the differential equation, everything else just comes straight out the differential equation, the only work here is finding the (bn).
00:05:07.000 --> 00:05:22.000
You are going to have to do some integration to find the (bn) but everything else just follows from all the work we have done in the previous lectures, let us go ahead and see how those work out.
00:05:22.000 --> 00:05:33.000
I broke it up into several steps over various examples here, we are not going to solve the whole thing from scratch in the first example, we are just going to start with the boundary value problem.
00:05:33.000 --> 00:05:42.000
What are we doing in this first example is we will extend the initial function f(x) to be an odd function.
00:05:42.000 --> 00:06:09.000
The initial function is f(x)=3 that is define from 0 to L=3, let me make my graph and there is 3, there is 0, there is -3 and the function we are given is just as f(x) is equal to 3, between 0 and 3.
00:06:09.000 --> 00:06:25.000
What we want to do is extend that to be an odd function, remember odd functions have rotational symmetry, if you rotate them 180° around the origin then they should look the same.
00:06:25.000 --> 00:06:49.000
What we are going to do is extend that from -3 to 0 and we will extend it in such a way that it has rotational symmetry, we will define f(x) to be equal to, well we are given that it is 3, if 0 is less than or equal to x , is less than or equal to 3.
00:06:49.000 --> 00:07:17.000
We will extend it to be, there is 3, there is -3, we will extend it to be -3, if -3 is less than x, less than 0, that way f(-x)=-f(x), we will get an odd function there.
00:07:17.000 --> 00:07:28.000
The point of doing that of course is that later on it is Fourier series we use only sines, this is an odd function.
00:07:28.000 --> 00:07:44.000
Just a recap here, we are not completely solving our partial differential equation yet, we are just doing the first step which is to take the initial function and extend it, that is the initial function we are given and there is our extension.
00:07:44.000 --> 00:08:01.000
Extending it in such a way that it will be an odd function, an odd function has rotational symmetry that means if it is +3 on a positive set of x values, we are going to make it -3 on the negative set of x values.
00:08:01.000 --> 00:08:25.000
This 3 was given to us, this -3 is our contribution in this problem, example 2, we are going to keep going with a function we justified in example 1, this all came from example 1.
00:08:25.000 --> 00:08:52.000
What we want to do here is to find a Fourier series that uses only sines, let me remind you of our formula for Fourier coefficients, BN is equal to 2/L, integral from 0 to L and of f(x) x sin(n π(x)/L)d/x.
00:08:52.000 --> 00:09:11.000
Let us work that out for this function, our (BN) is equal to, our L =3, that is our L right there, our (BN) =2/3 x the integral from 0 to 3.
00:09:11.000 --> 00:09:40.000
Our f(x) between 0 and 3 is just 3 x sin(n π(x/L), our L is still 3, (dx), we just have to work out this integral which is not too bad, it is 2/3, actually the 2/3 and then we still have another 3 from the inside.
00:09:40.000 --> 00:10:12.000
The integral of sine is -cosine, -cos of, I should have put n(π x/3), n(pix/3) x 3/n(π), that is the chain rule coming through there and then we have to evaluate this from x=0 to x=3.
00:10:12.000 --> 00:10:50.000
Let me simplify my coefficients a bit, 2/3 x 3 is 2 and then that times 3 is a 6/n(π), if we plug in x=3 there, we have -cos(n π) - -1, +1.
00:10:50.000 --> 00:11:17.000
1 - cos(n π) there and we figured out in the previous lecture a little formula for cos(n π), I figured it out real quick right now, cos(0) is 1, cos(π) is -1, cos(2π) is 1, cos(3π) is -1.
00:11:17.000 --> 00:11:58.000
cos(n π) is 1 if n is even and -1 if n is odd, what we have here is 6/n(π), now -cos(n π) if n is even then cos(n π) will be 1, we will get 1 - 1, this will be 0 if n is even.
00:11:58.000 --> 00:12:25.000
If n is odd then this would be -1, 1 - -1, 1 + 1 would be 2, if n is odd, of course we are multiplying that by 6/n π, this is all equal to, if I have to write a couple cases here 6x 2 is 12/n(π).
00:12:25.000 --> 00:12:50.000
If n is odd, still 0 if n is even, our Fourier series of x, let me remind you of the general formula for Fourier series, I'm not going to write the (an) and the cosine terms because we know we are dealing with an odd function here.
00:12:50.000 --> 00:13:10.000
There will be no cosine terms, our Fourier series of x, I'm just going to write the sign terms n=1 to infinity(bn) sin(n π) x/L, that is our generic form for a Fourier series.
00:13:10.000 --> 00:13:44.000
Let me plug in the (BN ) that I just arrived here, b1 is 12/π, 12/π x sin of n is 1 π(x)/3, L is 3, b2 is 0, I will go ahead and write the 0, B3 is 12/3 π, I do not think I will simplify that, I think it will be easier to see a pattern.
00:13:44.000 --> 00:14:15.000
sin(3π(x)/3) + 0 + 12/5π sin(5π)x/3 and so on, we just write that 1 more time without the 0s, 12/π sin, I think I could factor out a π, maybe I will leave it in there.
00:14:15.000 --> 00:14:52.000
sin(π x/3)+ 12 over 3 π, sin(3pix/3) + 12/5π, sin(5π/3) and that is certainly enough to get the pattern and see how it would continue from there, that is our Fourier series for the function.
00:14:52.000 --> 00:15:11.000
Let me recap how we derived that, we use our generic Fourier series formula BN is equal to 2/L times the integral from 0 to L of f(x) sin(n pix/L), that is our Fourier series formula when we know that the function is odd.
00:15:11.000 --> 00:15:24.000
Of course we define this function to be odd because we wanted to get a sine series, that is our (BN) and of course we know that the (an's) are all 0 for odd functions, we don't have to worry about the An's.
00:15:24.000 --> 00:15:48.000
I just plugged in my values here, L is 3, there is the L everywhere there, now this three came from this three right here, that was our definition of F, we had to do an integral there, we get 2/3 × 3 which was 6, 2/3 × 3 was 2.
00:15:48.000 --> 00:16:07.000
And then an extra three and there is what gave us the 6, the integral sin(n π(x)/3) is negative cosine of n(π)x/3, but we got a multiply by 3/n(π), that's why that 3/n(π) came out of.
00:16:07.000 --> 00:16:23.000
I plugged in X equals 3, we got -cos(n π )plugged in X equal 0, we get the cosine of 0 is just 1, we get 6/n(π) x over and high times the negative cosine n π +1 and I was trying to remember a formula for cosine(n π).
00:16:23.000 --> 00:16:50.000
When we came up with this it is -1 if n is odd, 1 if n is even and if N is even, the 1s cancel each other out and we just get 0, if n is odd you get 1 minus -1, we get 2 here and BN is 2 times 6/n π, 12/n(π) for odd n's and 0 if n is even.
00:16:50.000 --> 00:17:06.000
Now that's my (BN), I'm going to drop that back into a Fourier series which means I take those coefficients and I just multiply each 1 by sin(n π)x/L, the even ones all give me 0 and the odd ones give me 12/n(π).
00:17:06.000 --> 00:17:28.000
There is 12/1(π), 12/3(π), 12/5(π) and so on, we get just by simplifying that 12/π times sin(pix)/3, 12/3π sin(3π)x/3, 12/5(π) x sin(5π)x/3, that is my Fourier sin series for that initial function.
00:17:28.000 --> 00:17:43.000
We still have not solve the partial differential equations but we are very close now that we got the (BN), essentially we are just going to drop them into our generic formula and we will have the solution to the partial differential equation.
00:17:43.000 --> 00:17:54.000
In example 3, we are actually going to solve the boundary value problem starting with the partial differential equation, UT=α² Ux(x), that is our heat equation.
00:17:54.000 --> 00:18:14.000
We had 2 boundary conditions and we have 1 initial condition and we done all the work for this already, we really do not need to do any more work in this 1 we just need to take our answers and drop them in to our generic formula.
00:18:14.000 --> 00:18:33.000
I will remind you what we figured out in example 2, I believe it was, I you have not just watched example 2, maybe check back and look at example 2 and you'll see that we figured out that our (bn) we are (bn) was 12/n π.
00:18:33.000 --> 00:18:53.000
If n was odd, just 0 if n is even and we can just take those BN's and plug them into our general formula for the solution of the heat equation, it is a little messy but it is not hard at all.
00:18:53.000 --> 00:19:29.000
Our general formula is U(XT) is equal to the sum from n= 1 to infinity of (BN) sin(n π)x/L x e^-(n² π² α⁺2t)/L², what have we been given here we been given that L is equal to 3.
00:19:29.000 --> 00:19:47.000
Where will I see an L, I'm going to plug in 3 and we have not been given α², I'm just going to leave that as α², but we have been given what BN is, well we have not been given that if we figured it out in example 1.
00:19:47.000 --> 00:20:18.000
Let me drop in my (BN) from example 2 that is, let me drop in my (bn) from example 2, all the even ones are 0 and I'm going to fill in the odd ones here, this is for n=1, we get 12 /π sin(π)x/3, e^-π² α² T / 9 because that L².
00:20:18.000 --> 00:20:47.000
Now n= 2 gives us 0 for n equal 3 we get 12/n π, 12/3π sin(3π)x / 3 x e^-, n² is 9, I'm just going to leave that as 9 even though it does cancel, but I think it is easier to spot a pattern if we do not cancel it.
00:20:47.000 --> 00:21:18.000
9π² n² π² α² t / L² was 9 and the next even term is still 0, 12/5π sin(5π)x/ 3 x e⁻20 π² α⁺2t / 9 and it keeps going like that.
00:21:18.000 --> 00:21:37.000
I see that I got this pattern of odd numbers building up 1, 3, 5 and in my e's I got 1, 9 and 25, those are the squares of the odd numbers, I know there is a way to keep track of odd numbers which is to keep track of 2n + 1.
00:21:37.000 --> 00:21:44.000
If you start summing from n=0 , 2n+ 1 will give you all the odd numbers, let me we write a close form expression for that.
00:21:44.000 --> 00:22:34.000
The sum from n equal 0 to infinity of 12/the odd number x π, 2n + 1 x π sine of odd number x π/x 2n + 1 x π/x/ 3, 3 in all of those, e⁺negative, now odd number², 2n + 1² π² α ⁺2t and there was a 9 in all of those and that is what I have.
00:22:34.000 --> 00:22:52.000
Congratulations if you made it this far with me because together we have solved our very first heat equation, our very first partial differential equation took for it 4 lectures to do it, it is quite a lot of work we went into that.
00:22:52.000 --> 00:23:10.000
But at the very end it is pretty straightforward because we done all the work in previous examples, in particular in example 2 we found our (BN) was 12/n π if n is odd, 0 if n is even and we had this generic formula.
00:23:10.000 --> 00:23:42.000
This is coming out of the previous lecture, it was coming out of 2 lectures ago, lecture on separation of variables, we had this generic formula for the solution of a heat equation was (bn) sin(n π)s/L e⁻n² π² α² T/L².
00:23:42.000 --> 00:23:56.000
We know all those constants, we do not know the α² because it was just left generic in the equation but we know that L is equal to 3 and we figured out the (bn) in example 2, I drop those in here.
00:23:56.000 --> 00:24:09.000
There is my n= 1 term, n=2, in fact all the even ones are 0, they are sort of a missing 0 in each of these where I just dropped out all the even terms, there is n= 3, there is n=5.
00:24:09.000 --> 00:24:54.000
And then I figured out that I can index my numbers differently if I use 2n + 1 to keep track of odd numbers then I can add them up for n=0 again, wherever you see an odd number above I change it to 2n + 1.
00:24:54.000 --> 00:24:55.000
12 / 1, 3, 5 is 2n + 1 π sin(1, 3, 5) is 2n + 1 π(x) /3 and then 1, there is a 1 there, there is 1 there, 1, 9 and 25 is 2n + 1² π² α² T / 9 gives you the last ingredient to the solution there.
00:24:55.000 --> 00:25:10.000
That at long last really is the solution to our very first heat equation, in the next series of examples, we are going to build up the solution to another heat equation and then we are going to draw a big sigh of relief.
00:25:10.000 --> 00:25:27.000
Let us keep going here, in example 4 we are going to consider the boundary value problem below, UT(t) is equal to 4U(xx), by the way that means that the four is α².
00:25:27.000 --> 00:25:55.000
We got a couple boundary conditions here, U(0T) is 0, U(4t) is 0, by the way that means that L is equal 4 and U(x0) is equal to x, that is our initial condition and that is defined from 0 to 4, 0 to L.
00:25:55.000 --> 00:26:09.000
The first part of solving this boundary value problem is just to extend the initial function to be an odd function, that is all we have to do right now and then in the next couple of examples we will put the other elements together.
00:26:09.000 --> 00:26:25.000
The Fourier series in the general solution to get a complete solution to this partial differential equation, right now we just have to extend the initial function to be an odd function and that really not very hard.
00:26:25.000 --> 00:26:49.000
Let me graph what we are looking at, this is 4, this is 0, the function we are looking at is f(x) = x from 0 to 4 and we wanted to be in odd function which means we are going to extend it on to the domain going back to -4.
00:26:49.000 --> 00:27:03.000
Since we remember odd functions have rotational symmetry around the origin and we want to define this in such a way that gives us that rotational symmetry around the origin.
00:27:03.000 --> 00:27:17.000
It is easy to see that if I just extended as a line back like that then that would give me that nice rotational symmetry and of course that line back there is also the line in y=x.
00:27:17.000 --> 00:27:32.000
All I have to do is define f(x) to be x and instead of going just from 0 to 4, I'm going to run it now from -4 to four.
00:27:32.000 --> 00:27:52.000
That is my extension and that is an odd function, all we did there, we have not solve the differential equation, we have not gone through the Fourier series business yet, we are going to do that in the next example.
00:27:52.000 --> 00:28:06.000
We are going to solve this problem in the next example, all we did at this point was we looked at that initial function there and we know we want a Fourier sine series at the next step.
00:28:06.000 --> 00:28:18.000
But at this step we just want to extend that to be an odd function, when we do find the Fourier series we will get all sines, we just looked at the graph of it f(x) = x.
00:28:18.000 --> 00:28:29.000
And then in order to extend it to have rotational symmetry, we just extended it back and it turned out that it was still just y=x.
00:28:29.000 --> 00:28:44.000
Instead of defining it from 0 to 4, I can define it from -4 to 4 and I will get my odd function ,I'm going to carry that over, we are going to use this same boundary value problem for the next couple of examples to find a Fourier series.
00:28:44.000 --> 00:29:02.000
And then to use the Fourier series to actually solve the partial differential equation, the whole boundary value problem, let us look at example 5, for example 5 we are going to find a Fourier sine series for the initial function from the example above.
00:29:02.000 --> 00:29:18.000
The nice thing is that we got an odd function here, we defined that back in example 4 to be an odd function, I know that I'm going to get of a Fourier series that involves only sines, it means I do not have to worry about the cosines at all know.
00:29:18.000 --> 00:29:48.000
No (an) just (bn), let me remind you of the formula for (bn), BN when you have an odd function is 2/L x the integral from 0 to L of f(x) x sin(n π)x /L(DX) and we already figured out what L is.
00:29:48.000 --> 00:30:14.000
Let me go ahead and drop that in our (BN), our L was 4 and 2/4 is better known as 1/2, the integral from 0 to 4, f(x) is just x, so x x sin(n π)x /4 DX, that is my (BN).
00:30:14.000 --> 00:30:31.000
By the way you might remember another formula for Fourier series, where we had (BN) is equal to 1 / L the integral from -L to L and then the same stuff after that, the reason we simplify that is because we know that f(x) is an odd function.
00:30:31.000 --> 00:30:46.000
If f(x) is an odd function, we have some symmetry, which can run that integral from 0 to L and multiply it by 2, now I want to solve that integral of course that means I have to do integration by parts.
00:30:46.000 --> 00:31:02.000
If you are rusty on integration by parts we got some lectures in a different series here on www.educator.com, there is a calculus 2 series, it is also called the calculus BC where we have a whole lecture on integration by parts.
00:31:02.000 --> 00:31:13.000
I'm assuming that you already know integration by parts, I'm going to go through a kind of quickly using the little shorthand trick that I covered in those lectures back in the calculus 2.
00:31:13.000 --> 00:31:49.000
It is called tabular integration sin X x sin(n π)x/4, tabular integration you write derivatives on the left, derivative X is 1, derivative 1 is 0 and then integrals on the right and the integral of sin(n π)x/4 is -cos(n π)x/4.
00:31:49.000 --> 00:32:19.000
It is -cos(n π)x/4 except that I have to multiply that by 4/n(π) by the chain rule, we multiply that by 4/n(π), my π got a little messy there.
00:32:19.000 --> 00:32:51.000
4/n π and then I had to do 1 more integral there, the integral of cos is sin(n π)x/4 but I still have a negative here and I have to multiply by another 4/n(π), I get 16/n² π² and then I write this little diagonal lines.
00:32:51.000 --> 00:33:08.000
Alternating signs +, - and what I see here is I got a 1/2, that still same half from the outside and I got -4x/n(π), I'm multiplying along the diagonal lines and this tabular integration.
00:33:08.000 --> 00:34:03.000
4x/n(π) cos(n π)x/ 4 minus -, let us see, I forgot my negative sign here there should be a negative here, +16 / n² π² sin(n π)x/4, I multiply along that diagonal line there and I have to evaluate this from x=0, 2X = 4.
00:34:03.000 --> 00:34:22.000
That is going to be a little bit messy but it is what is nice about it is a lot of the terms go way quickly, in particular this sin term if we plug in x=4 in the sin term, we will get sin(n π) that is just 0 and if we plug inx=0 we will get sin(0) that is just 0.
00:34:22.000 --> 00:34:43.000
The sin term is going to go away to 0 on both limits there, this is pretty nice, I'm going to combine my 1/2 of my -4x /n(π), I get -2/n(π).
00:34:43.000 --> 00:35:33.000
Now I have got a cos( n π)x/4, that cos(n π) when I plug in x=4, that cos(4π)x/4n(π)/4, cos(n π), when I plug in 0, there is also an X there, I also have a 4 there, when I plug in x=0, that x turns it in to 0.
00:35:33.000 --> 00:35:51.000
We just get -0 there and then I said before, the sin terms will give you 0, those dropout right away and it looks like what I have here is -2 x 4 is -8/n(π).
00:35:51.000 --> 00:36:21.000
Now cos(n π) we figured out a nice formula for that, cos(n π),let us see, let me write down the first couple terms there, cos(0) is 1, cos(π) is -1, cos(2π) is 1 again, cos(3π) is -1.
00:36:21.000 --> 00:36:45.000
They are alternating between 1 and -1, cos(n π) is -1⁺n, -a/ n(π) x -1⁺n and that is my formula for BN and I guess I could simplify that a little bit by combining that negative in with the -1⁺n.
00:36:45.000 --> 00:37:28.000
That is -1⁺n + 1 x 8/n(π), my Fourier series, our general formula for Fourier series, I will go ahead and write the whole formula, a₀/2 + the sum from n=1 to infinity of (an)cos(n π)x/L, n(π)x/L + (bn)sin(n π)x/L.
00:37:28.000 --> 00:37:41.000
However when we we said when we have an odd function and we designed this function to be odd, that makes all the the cos terms dropout which means all the a terms dropout.
00:37:41.000 --> 00:38:14.000
a₀ is 0 and all the cos terms are 0 because F(x) is an odd function, that means we just have to focus on the BN's and we figured out our BN it is -1⁺n+1 8/n(π).
00:38:14.000 --> 00:38:32.000
I can factor out the a/π, I think I can do that, I will get a/π x the sum from n =1 to infinity, the rest of my (bn) I can not factor it out because it is got n's in it.
00:38:32.000 --> 00:38:59.000
-1⁺n +1/n, and sin(n π)x, my L was 4, n(π)x over, I'm going to go ahead and change that L to a 4 and that is my Fourier series for F(x), still have not used it to solve with the differential equation yet.
00:38:59.000 --> 00:39:14.000
We got a pretty close we would not have to do very much work to use this to solve the differential equation, let me just recap the steps that we did to get this Fourier series, we start out with a function F(x) = x which is an odd function.
00:39:14.000 --> 00:39:28.000
Which means I know when I do my Fourier series, I would not have to do my general formula here, 1/ L x the integral from -L to L, I can use my specialized formula 2/ L x the integral from 0 to L.
00:39:28.000 --> 00:39:44.000
It is such a little bit easier, makes it a little bit less messy, I plug in L=4, that is where I got 4 here, 2/4 is where I got that 1/2 here, L =4 here.
00:39:44.000 --> 00:40:04.000
That x came from this x right here, that is where we got that x and then clearly that is the integration by parts problem, remembering what I learned from the integration by parts lecture in the calculus 2 lectures here on www.educator.com.
00:40:04.000 --> 00:40:21.000
I set up my tabular integration x and sin(n π)x/4, wrote my derivatives here, wrote my integrals on the side, set up alternating signs positive and negative, multiply down diagonals and got this horrific expression.
00:40:21.000 --> 00:40:38.000
Which turned out not to be so horrific because I know when I plug-in X =4 and x= 0, all the sin terms go to 0, the cos terms, well the X = 0 term, the cos term goes to 0 because of that x.
00:40:38.000 --> 00:40:58.000
The X =4 term, that half and that 4/n(π) that is how I got the 2/n(π) and the X is where I got that 4 right there, that is where that 4 came from and we got cos(n π), of course that came from there.
00:40:58.000 --> 00:41:22.000
And cos(n π) I figured out this nice formula for cos(n π) is just -1⁺n, this turn into the 2 and the 4 gave me 8 and I get -1⁺n x -1 gives me -1⁺n + 1 x 8/n π and that is my BN for my Fourier series.
00:41:22.000 --> 00:41:38.000
Here is the generic formula for Fourier series and I do not have to worry about any of the A's because F(x) was an odd function, we extended f(x) to be an odd function precisely because we wanted to get a Fourier series involving only sines.
00:41:38.000 --> 00:41:57.000
That means all of the A's disappear and go to 0 and then we just drop in what we figured out for BN's, I drop that and right there and I factored out the a/π, I can pull it out because it does not have an n in it and I just copy down sin(n π)x/L=4.
00:41:57.000 --> 00:42:14.000
That is my Fourier series for the initial function F(x) still have not solved the partial differential equation the, full boundary value problem but I'm very close here, essentially there is no more work to do, I'm just going to carry these coefficients over from the Fourier series.
00:42:14.000 --> 00:42:30.000
And drop them into the generic solution of the boundary value problem, that is our last example, let us go ahead and jump to that, example 6 we will solve the boundary value problem that we first met in example 4.
00:42:30.000 --> 00:42:44.000
We did most of the work here in examples 4 and 5, example 6 we are just going to drop in the answers the we got from the 4th, let me remind you what we figured out earlier.
00:42:44.000 --> 00:43:07.000
We figured out in example 5 it was, that we found those coefficients bn and what we got was -1 to the n +1× 8/n(π).
00:43:07.000 --> 00:43:26.000
Let me remind you of the general solution to the heat equation which we worked out a couple of lectures ago but I reminded you at the beginning of this lecture what the general solution was, that is fairly complicated formula.
00:43:26.000 --> 00:43:54.000
Some from n=1 to infinity of BN, it looks like the Fourier series for sin(n π)x/L but then there is also this t term, e⁻n² π² α⁺2t/L² , rather complicated but the good news here is we already figured out all the numbers here.
00:43:54.000 --> 00:44:11.000
We really do not have to do any more work, we are just plugging things in, what we figured out is that L = 4 that came from here, we figured out that α² is 4, that came from here there is my α².
00:44:11.000 --> 00:44:25.000
We got BN, we figure that out in example 5, quite a bit of work to figure that out, that is probably the most work in the problem is actually finding those Fourier coefficients and I think that is all we need, we can plug everything in here.
00:44:25.000 --> 00:44:48.000
I'm going to go ahead and factor out an a/π because that is the same everywhere, a/π from the BN, now we got -1⁺n + 1/n sin(n π)x/4.
00:44:48.000 --> 00:45:16.000
Now α² is 4 L² is 16 so I can simplify that a little bit, adjust it to 1/4 e⁻n² π², I'm going to combine my 4 and my 16 into the denominator of 4 and that is all I have.
00:45:16.000 --> 00:45:37.000
That is my complete solution to that boundary value problem that is solution to the differential equation and the 2 boundary conditions and the initial condition and it only took us 4 lectures to get that.
00:45:37.000 --> 00:45:55.000
Let me recap that, we got α² is = 4 here, we essentially done all the hard work of solving this problem in the previous example, if you have not just watched example 5, that is where I got the BN is -1⁺n +1 x 8/n(π).
00:45:55.000 --> 00:46:04.000
I did not figure that out right here, that is just not a guess, that came from doing a lot of integration and some work with a Fourier series in the previous problem, having found that.
00:46:04.000 --> 00:46:22.000
However I can just take that BN and drop that into my generic formula for the solution to the heat equation which we derived several lectures ago, bn sin(n π)x/L e⁺n² π² α² t⁺L².
00:46:22.000 --> 00:46:46.000
Our L is 4, we get that from the problem here so we get 16 in the denominator there α² is 4, that is there, 4/16 is is where I got this 4 in the denominator, those terms are both coming from BN and I factored out the 8/π because that did not depend on n.
00:46:46.000 --> 00:47:05.000
Here I plugged in L=-4 and here I plug in what I know α² is 4 and L² is 16, that is our complete solution to that partial differential equation and to the boundary value problem.
00:47:05.000 --> 00:47:22.000
That is the end of our lecture on solving the heat equation, you should know how to solve the heat equation now and that actually wraps up this chapter on partial differential equations and that wraps up this whole set of lectures on differential equations.
00:47:22.000 --> 00:47:32.000
It has been a long journey but I really appreciate your watching these lectures and joining me, I have had a lot of fun talking about differential equations and I hope they go well for you.
00:47:32.000 --> 00:47:41.000
Just to remind you these are the differential equations lectures on www.educator.com. My name is Will Murray and I really want to thank you for sticking with me through all the lectures, bye.