English subtitles

← 02 05ComputationalSolutions1BHD

2.5 Computational Solutions (Video 1B)

Get Embed Code
7 Languages

Showing Revision 3 created 01/01/2018 by Hazm TALAB.

  1. So, let's continue with this example.
  2. We just found the T(2) was 11, or approximately 11
  3. because we had to do some make-believe to get this,
  4. but now let's see if we can figure out T(4).
  5. I can figure out how fast the temperature is changing
  6. at time 2, assuming that the temperature is 11.
  7. What's the rate of change? Well I just ask the equation
  8. - that's what the differential equation does - it's a rule that tells me how fast
  9. the temperature is changing, if we know the temperature.
  10. So let's do that.
  11. So we use the equation - we ask the equation:
  12. When the temperature is 11, what's the rate of change? what's the derivative?
  13. So, when time is 2, we plug in 11, so capital T is 11, 20 -11 is 9,
  14. times .2 is 1.8
  15. So now we know that when the temperature is 11,
  16. it is warming up at 1.8 degrees per minute.
  17. So now suppose we want to know T(4), 4 minutes in,
  18. again, we have the same problem
  19. - this rate isn't constant - it's changing all the time,
  20. as soon as a temperature changes we get a new rate,
  21. but as before, we'll ignore the problem
  22. and pretend that it's constant.
  23. So, again the problem is: the rate is not constant
  24. - our solution is to ignore the problem
  25. - not always a good way to go about things
  26. but for Euler's method, it turns out to work okay
  27. - we'll ignore the problem - pretend it is constant
  28. and then we can figure out the temperature at time 4, 4 minutes in,
  29. in these 2 minutes, that we're pretending:
  30. how much temperature increase do we have,
  31. well at 1.8 degrees per minute for 2 minutes, that's 3.6,
  32. 3.6 +11, where we started, gives us 14.6
  33. So now, I know the temperature at T equals 4 minutes.
  34. We can keep doing this,
  35. continue along with this process, and we'll get
  36. a series of temperature values for a series of times.
  37. So, we continue this process,
  38. and we can put our results in a table.
  39. So these first 3 entries we've already figured out
  40. - the initial temperature is 5, then at time 2 it was 11,
  41. at 4, it was 14.6, and at 6,
  42. if when one follow this process along, one would get 16.76,
  43. and we could keep on going.
  44. So, let's make a graph - let's make a plot of these numbers
  45. and see what it looks like, and compare it to the exact solution.
  46. So, for this equation, it turns out one can use calculus to figure out
  47. an exact solution for this differential equation,
  48. and that shown as this solid line here.
  49. Towards the end of this sub unit, I'll talk a little bit about
  50. how one would get this solid line.
  51. The Euler solution - that's what we're doing here
  52. - are these squares - so we start at
  53. the initial condition, and then here at 11,
  54. a little bit less than 15, almost 17, and so on.
  55. So we can see that the Euler solution
  56. - the squares connected by the dotted line
  57. is not that close to the exact solution.
  58. It's not that bad, but it's not a perfect match
  59. and we wouldn't expect a perfect match
  60. because we had to do some pretending in order to get this.
  61. So, as is often the case, ignoring the problem
  62. - remember the problem was that:
  63. the derivative - the rate of change wasn't constant.
  64. Ignoring the problem actually wasn't a great solution
  65. because we have these errors here.
  66. For this example, I'd chose a step size of 2, a delta t of 2.
  67. I said: let's figure out the temperature, capital T, every 2 minutes,
  68. but it's this step size that got us into trouble
  69. because I had to pretend that a constantly changing rate
  70. was actually constant over this time of 2 minutes,
  71. and that's clearly not true,
  72. so, a way we could do better with this Euler method is to use a smaller delta t.