[Script Info]
Title:
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.17,0:00:04.05,Default,,0000,0000,0000,,So, let's continue with this example.
Dialogue: 0,0:00:04.05,0:00:07.42,Default,,0000,0000,0000,,We just found the T(2) was 11, or approximately 11
Dialogue: 0,0:00:07.42,0:00:10.96,Default,,0000,0000,0000,,because we had to do some make-believe to get this,
Dialogue: 0,0:00:10.96,0:00:14.08,Default,,0000,0000,0000,,but now let's see if we can figure out T(4).
Dialogue: 0,0:00:14.08,0:00:16.96,Default,,0000,0000,0000,,I can figure out how fast the temperature is changing
Dialogue: 0,0:00:16.96,0:00:22.13,Default,,0000,0000,0000,,at time 2, assuming that the temperature is 11.
Dialogue: 0,0:00:22.13,0:00:24.96,Default,,0000,0000,0000,,What's the rate of change? Well I just ask the equation
Dialogue: 0,0:00:24.96,0:00:28.46,Default,,0000,0000,0000,,- that's what the differential equation does - it's a rule that tells me how fast
Dialogue: 0,0:00:28.46,0:00:31.90,Default,,0000,0000,0000,,the temperature is changing, if we know the temperature.
Dialogue: 0,0:00:31.90,0:00:34.41,Default,,0000,0000,0000,,So let's do that.
Dialogue: 0,0:00:36.15,0:00:39.15,Default,,0000,0000,0000,,So we use the equation - we ask the equation:
Dialogue: 0,0:00:39.15,0:00:43.05,Default,,0000,0000,0000,,When the temperature is 11, what's the rate of change? what's the derivative?
Dialogue: 0,0:00:43.05,0:00:50.90,Default,,0000,0000,0000,,So, when time is 2, we plug in 11, so capital T is 11, 20 -11 is 9,
Dialogue: 0,0:00:50.90,0:00:53.63,Default,,0000,0000,0000,,times .2 is 1.8
Dialogue: 0,0:00:53.63,0:00:57.62,Default,,0000,0000,0000,,So now we know that when the temperature is 11,
Dialogue: 0,0:00:57.62,0:01:01.96,Default,,0000,0000,0000,,it is warming up at 1.8 degrees per minute.
Dialogue: 0,0:01:01.96,0:01:05.17,Default,,0000,0000,0000,,So now suppose we want to know T(4), 4 minutes in,
Dialogue: 0,0:01:05.17,0:01:07.92,Default,,0000,0000,0000,,again, we have the same problem
Dialogue: 0,0:01:07.92,0:01:10.63,Default,,0000,0000,0000,,- this rate isn't constant - it's changing all the time,
Dialogue: 0,0:01:10.63,0:01:13.74,Default,,0000,0000,0000,,as soon as a temperature changes we get a new rate,
Dialogue: 0,0:01:13.74,0:01:16.74,Default,,0000,0000,0000,,but as before, we'll ignore the problem
Dialogue: 0,0:01:16.74,0:01:19.88,Default,,0000,0000,0000,,and pretend that it's constant.
Dialogue: 0,0:01:25.05,0:01:27.94,Default,,0000,0000,0000,,So, again the problem is: the rate is not constant
Dialogue: 0,0:01:27.94,0:01:29.34,Default,,0000,0000,0000,,- our solution is to ignore the problem
Dialogue: 0,0:01:29.34,0:01:32.21,Default,,0000,0000,0000,,- not always a good way to go about things
Dialogue: 0,0:01:32.21,0:01:34.66,Default,,0000,0000,0000,,but for Euler's method, it turns out to work okay
Dialogue: 0,0:01:34.66,0:01:36.66,Default,,0000,0000,0000,,- we'll ignore the problem - pretend it is constant
Dialogue: 0,0:01:36.66,0:01:41.20,Default,,0000,0000,0000,,and then we can figure out the temperature at time 4, 4 minutes in,
Dialogue: 0,0:01:41.20,0:01:43.74,Default,,0000,0000,0000,,in these 2 minutes, that we're pretending:
Dialogue: 0,0:01:43.74,0:01:46.25,Default,,0000,0000,0000,,how much temperature increase do we have,
Dialogue: 0,0:01:46.25,0:01:51.33,Default,,0000,0000,0000,,well at 1.8 degrees per minute for 2 minutes, that's 3.6,
Dialogue: 0,0:01:51.33,0:01:58.13,Default,,0000,0000,0000,,3.6 +11, where we started, gives us 14.6
Dialogue: 0,0:01:58.13,0:02:03.05,Default,,0000,0000,0000,,So now, I know the temperature at T equals 4 minutes.
Dialogue: 0,0:02:03.05,0:02:04.54,Default,,0000,0000,0000,,We can keep doing this,
Dialogue: 0,0:02:04.54,0:02:06.96,Default,,0000,0000,0000,,continue along with this process, and we'll get
Dialogue: 0,0:02:06.96,0:02:12.45,Default,,0000,0000,0000,,a series of temperature values for a series of times.
Dialogue: 0,0:02:15.65,0:02:17.94,Default,,0000,0000,0000,,So, we continue this process,
Dialogue: 0,0:02:17.94,0:02:21.21,Default,,0000,0000,0000,,and we can put our results in a table.
Dialogue: 0,0:02:21.21,0:02:24.21,Default,,0000,0000,0000,,So these first 3 entries we've already figured out
Dialogue: 0,0:02:24.21,0:02:27.78,Default,,0000,0000,0000,,- the initial temperature is 5, then at time 2 it was 11,
Dialogue: 0,0:02:27.78,0:02:31.38,Default,,0000,0000,0000,,at 4, it was 14.6, and at 6,
Dialogue: 0,0:02:31.38,0:02:36.17,Default,,0000,0000,0000,,if when one follow this process along, one would get 16.76,
Dialogue: 0,0:02:36.17,0:02:39.33,Default,,0000,0000,0000,,and we could keep on going.
Dialogue: 0,0:02:39.33,0:02:42.43,Default,,0000,0000,0000,,So, let's make a graph - let's make a plot of these numbers
Dialogue: 0,0:02:42.43,0:02:47.04,Default,,0000,0000,0000,,and see what it looks like, and compare it to the exact solution.
Dialogue: 0,0:02:47.04,0:02:50.56,Default,,0000,0000,0000,,So, for this equation, it turns out one can use calculus to figure out
Dialogue: 0,0:02:50.56,0:02:55.02,Default,,0000,0000,0000,,an exact solution for this differential equation,
Dialogue: 0,0:02:55.02,0:02:57.82,Default,,0000,0000,0000,,and that shown as this solid line here.
Dialogue: 0,0:02:57.82,0:03:00.05,Default,,0000,0000,0000,,Towards the end of this sub unit, I'll talk a little bit about
Dialogue: 0,0:03:00.05,0:03:02.57,Default,,0000,0000,0000,,how one would get this solid line.
Dialogue: 0,0:03:02.57,0:03:05.42,Default,,0000,0000,0000,,The Euler solution - that's what we're doing here
Dialogue: 0,0:03:05.42,0:03:08.62,Default,,0000,0000,0000,,- are these squares - so we start at
Dialogue: 0,0:03:08.62,0:03:12.49,Default,,0000,0000,0000,,the initial condition, and then here at 11,
Dialogue: 0,0:03:12.49,0:03:16.74,Default,,0000,0000,0000,,a little bit less than 15, almost 17, and so on.
Dialogue: 0,0:03:16.74,0:03:19.18,Default,,0000,0000,0000,,So we can see that the Euler solution
Dialogue: 0,0:03:19.18,0:03:22.02,Default,,0000,0000,0000,,- the squares connected by the dotted line
Dialogue: 0,0:03:22.02,0:03:25.40,Default,,0000,0000,0000,,is not that close to the exact solution.
Dialogue: 0,0:03:25.40,0:03:28.38,Default,,0000,0000,0000,,It's not that bad, but it's not a perfect match
Dialogue: 0,0:03:28.38,0:03:31.14,Default,,0000,0000,0000,,and we wouldn't expect a perfect match
Dialogue: 0,0:03:31.14,0:03:35.80,Default,,0000,0000,0000,,because we had to do some pretending in order to get this.
Dialogue: 0,0:03:35.80,0:03:38.46,Default,,0000,0000,0000,,So, as is often the case, ignoring the problem
Dialogue: 0,0:03:38.46,0:03:40.26,Default,,0000,0000,0000,,- remember the problem was that:
Dialogue: 0,0:03:40.26,0:03:42.30,Default,,0000,0000,0000,,the derivative - the rate of change wasn't constant.
Dialogue: 0,0:03:42.30,0:03:46.18,Default,,0000,0000,0000,,Ignoring the problem actually wasn't a great solution
Dialogue: 0,0:03:46.18,0:03:51.44,Default,,0000,0000,0000,,because we have these errors here.
Dialogue: 0,0:03:51.44,0:03:56.62,Default,,0000,0000,0000,,For this example, I'd chose a step size of 2, a delta t of 2.
Dialogue: 0,0:03:56.62,0:04:00.85,Default,,0000,0000,0000,,I said: let's figure out the temperature, capital T, every 2 minutes,
Dialogue: 0,0:04:00.85,0:04:04.47,Default,,0000,0000,0000,,but it's this step size that got us into trouble
Dialogue: 0,0:04:04.47,0:04:08.22,Default,,0000,0000,0000,,because I had to pretend that a constantly changing rate
Dialogue: 0,0:04:08.22,0:04:12.36,Default,,0000,0000,0000,,was actually constant over this time of 2 minutes,
Dialogue: 0,0:04:12.36,0:04:15.25,Default,,0000,0000,0000,,and that's clearly not true,
Dialogue: 0,0:04:15.25,0:04:21.38,Default,,0000,0000,0000,,so, a way we could do better with this Euler method is to use a smaller delta t.