Unit #16 : Differential Equations Goals: To introduce the concept of a differential equation. Discuss the relationship between differential equations and slope fields. Discuss Euler s method for solving a differential equation numerically. Discuss the method of separation of variables to solve a differential equation exactly. Reading: Sections 6.3, 11.1 11.4.
2 Differential Equations Reading: Section 6.3 and 11.1 A differential equation (DE) is an equation involving the derivative(s) of an unknown function. Many of the laws of nature are easily expressed as differential equations. For example, here is one way to define the exponential function: dy dt = y Write this mathematical formula as a sentence, and then find a solution to the equation.
Unit 16 Differential Equations 3 How can the solution you found be altered and still satisfy the DE dy dt = y?
4 Making a further alteration to the function y = e t, find a family of functions all of which satisfy the DE dy dt = ky.
Unit 16 Differential Equations 5 The differential equation dy dt that = ky, when expressed as an English sentence, says the rate at which y changes is proportional to the magnitude of y. If k > 0, this is one way of characterizing exponential growth. If k < 0, the rate of change becomes negative and we are dealing with exponential decay.
6 If a DE involves the second derivative of a function, it is called a second order differential equation. Try to think of two functions that satisfy the differential equation d 2 y dt 2 = y. Then, try to combine these two functions to get even more solutions for this DE.
Unit 16 Differential Equations 7 Sources of Differential Equations We study differential equations primarily because many natural laws and theories are best expressed in this format. Translate the following sentence into an equation: The rate at which the potato cools off is proportional to the difference between the temperature of the potato and the temperature of the air around the potato.
8 Translate the following sentence into an equation: The rate at which a rumour spreads is proportional to the product of the people who have heard it and those who have not.
Unit 16 Differential Equations 9 Translate the following sentence into an equation: The rate at which water is leaking from the tank is proportional to the square root of the volume of water in the tank.
10 Translate the following sentence into an equation: As the meteorite plummets toward the Earth, its acceleration is inversely proportional to the square of its distance from the centre of the Earth. The previous examples indicate how easily differential equations can be constructed. Unfortunately, starting with those equations, we have a lot of work to do before we can predict will happen given the equation.
Unit 16 Differential Equations 11 Slope Fields Reading: Section 11.2 in the textbook. Consider the differential equation dy dx = cosx. Recall how we would use this derivative information to sketch y: dy values give the slopes of the graph of y dx Said another way, we are looking for a function y(x) which has, at each point, a slope given by cos(x). Give the most general function y that satisfies dy dx = cos(x).
12 We are now going to introduce an alternate way to get to this solution through graphical techniques. These are an extension of our slope interpretation. Example: Below is a slope field graph for the DE dy dx it constructed? 3 = cos(x). How was 2 1 0 1 2 3 0 1 2 3 4 5 6 7 8 9 Sketch the functions y found earlier on the slope field.
Unit 16 Differential Equations 13 Slope fields are especially useful when we study more general differential equations, which can be written in the form d dx y = f(x,y). Examples are dy dx = x y, dy dx = xy, and dy dx = y x. Note: These forms cannot be directly integrated to find y(x). Try to solve for y given dy dx = 1 2 (x y)
14 Sketch the slope field for the differential equation dy dx = 1 (x y), and sketch 2 two solutions. 2 1 2 1 1 2 1 2 This sketch gives an idea of the form of y which satisfies dy dx = 1 (x y), without 2 needing to solve for y as a function.
Unit 16 Differential Equations 15 Example: (Logistic Growth) The growth of a population is often modeled by the logistic differential equation. For example, if bacteria are grown on a petri dish which really cannot support a bacterial culture larger than L, then a useful differential equation model for the population is dp = kp (L P), dt where P(t) is the size of the culture at time t. For what values of P is the function kp (L P) zero? largest? smallest?
16 Sketch the slope field associated with the differential equation dp = kp (L P). dt On the slope field, draw several solutions using different initial conditions.
Unit 16 Differential Equations 17 Euler s Method Reading: Section 11.3 in the textbook. We can extend the idea of a slope field (a visual technique) to Euler s method (a numerical technique). Euler s method can be used to produce approximations of the curve y(x) that satisfy a particular differential equation. Here is the idea: Knowing where you are in x and y, you look at the slope field at your location, set off in that direction for a small distance, look again and adjust your direction, set off in that direction for a small distance, etc.
18 Algorithmically, Start at a point (x i,y i ) Compute the slope there, using the DE dy dx = f(x i,y i ) Follow the slope for a step of x: x i+1 = x i + x y i+1 = y i + dy dx x }{{} y
Unit 16 Differential Equations 19 = x+y with initial con- Follow this procedure for the differential equation dy dx dition y(0) = 0.1. Use x = 0.1. x y slope y = slope x 0 0.1 0.1 (0.1)(0.1) = 0.01 0.1 0.11 0.2 0.3 0.4
20 Here is a picture of the slope field for dy = x+y. On this slope field, sketch dx what you have done in creating the table of values. From the picture, would you say the values for y(x) in your table are over-estimates or under-estimates of the real y values? 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Unit 16 Differential Equations 21 Separation of Variables Reading: Section 11.4 in the textbook. We have now considered both visual and approximate techniques for solving differential equations, which can be obtained with no calculus. The problem with those approaches is that they do not result in formulas for the function y that we want to identify. We (at last!) proceed to calculus-based techniques for finding a formula for y. Consider the differential equation dy dx = ky. Treating dx and dy as separable units, transform the equation so that only terms with y are on the left, and only terms with x are on the right. Place an integral sign in front of each side.
22 Evaluate the integrals. Solve for y. The solution gives a family of functions, one for each value of the integration constant. k is also a parameter, of course, but it is presumed to be specified in the differential equation.
Unit 16 Differential Equations 23 As soon as we are given an initial value, say y(0) = 10, the solution becomes unique. The solution with initial value y(0) = 10 is given by If y 0 > 0, this function describes exponential growth (k > 0) or decay (k < 0).
24 Use the method of separation of variables to solve the differential equation dr dx = 2R+3, and find the particular solution for which R(0) = 0.
Unit 16 Differential Equations 25 Classifying Differential Equations For any differential equation which is separable, we can at least attempt to find a solution using anti-derivatives. For equations which are not separable, we ll need other techniques. It is important, as a result, to be able to tell the difference! Indicate which of the following differential equations are separable. For those which are separable, set up the appropriate integrals to start solving for y. dy dx = x2 dy dx = ey x
26 dy dx = x+y dy dx = cos(x)cos(y)
Unit 16 Differential Equations 27 dy dx = cos(xy) A. Separable B. Not separable dy dx = ex +e y A. Separable B. Not separable dy dx = e(x+y) A. Separable B. Not separable
28 Note: all the original anti-derivatives we studied in first term are of the form dy dx = f(x) and so y = F(x) = f(x) dx. These are all immediately separable. The challenge is that most interesting scientific laws expressed in differential equation form aren t that easy to work with.