Presentation is loading. Please wait.

Presentation is loading. Please wait.

Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 02: The First Order Differential Equations.

Similar presentations


Presentation on theme: "Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 02: The First Order Differential Equations."— Presentation transcript:

1 Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 02: The First Order Differential Equations

2 First Order Differential Equations Study differential equations of first order, dy/dt = f (t, y), where f is a given function of two variables. Any differentiable function y = φ (t) that satisfies this equation for all t in some interval is called a solution. Develop methods for finding solutions or, if that is not possible, approximating them. Unfortunately, for an arbitrary function f, there is no general method to solve in terms of elementary functions. Describe several methods, each of which is applicable to a certain subclass of first order equations: linear equations, separable equations, exact equations, and autonomous equations (for which geometrical methods yield valuable information about solutions). Construct numerical approximations to solutions, and introduce algorithms

3 Chapter 2 - Chapter 2 - First Order Differential Equations 2.1 Separable Equations 2.2 Modeling with First Order Equations 2.3 Differences Between Linear and Nonlinear Equations 2.4 Autonomous Equations and Population Dynamics 2.5 Exact Equations and Integrating Factors 2.6 Accuracy of Numerical Methods 2.7 Improved Euler and Runge–Kutta Methods

4 2.1 Separable Equations Separable equations are the subclass of first order equations that can be solved by direct integration. The general first order equation dy/dx= f (x, y) is separable, if it can be written in the form M(x) + N(y)·dy/dx=0 or in differential form as M(x) dx + N(y) dy = 0.

5 Solving Separable Equations Integrate to obtain H 1 (x) + H 2 (y) = c, where c is an arbitrary constant. where H 1 and H 2 be any antiderivatives of M and N, respectively. That is, H 1 (x) = M(x), H 2 (y) = N(y).

6 Example Show that the equation y'=dy/dx= x 2 /(1 − y 2 ) is separable, and then find an equation for its integral curves. Answer: Separable since rewritable as − x 2 + (1 − y 2 )dy/dx= 0 Integrate to obtain − x 3 + 3y − y 3 = c, where c is an arbitrary constant.

7 Example (Ctd)

8 2.2 Modeling with First Order Equations Construction of the Model - translate the physical situation into mathematical terms Analysis of the Model - Find solutions using exact or approx. methods Comparison with Experiment or Observation - having obtained the solution (or at least some information about it), you must interpret this information in the context in which the problem arose

9 Example - A Car Loan Question: Suppose that a recent college graduate wishes to borrow $20,000 in order to purchase a new car (or perhaps for some other purpose). A lender is willing to provide the loan with an annual interest rate of 8%. The borrower wishes to pay off the loan in four years. What monthly payment is required to do this?

10 Example - A Car Loan (Ctd.) Answer: Let S(t) be the balance due on the loan at any time t. dS/dt= r S − 12k, where r is the annual interest rate and k is the monthly payment rate. The initial condition is S(0) = S 0, where S 0 is the amount of the loan. Now the example converts to: dS/dt = 0.08S − 12k, S(0) = 20,000.

11 Example - A Car Loan (Ctd.) Find the integrating factor and solve to obtain S = 20,000e 0.08t − 150k(e 0.08t − 1). To find the monthly payment needed to pay off the loan in four years, we set t = 4, S = 0, and solve for k. The result is k = 20,000/150· e 0.32 /(e 0.32 − 1)= $486.88. The total amount paid over the life of the loan is 48 times $486.88, or $23,370.24; thus the total interest payment is $3,370.24.

12 2.3 Differences Between Linear and Nonlinear Equations Existence and Uniqueness of Solutions THEOREM 2.3.1 If the functions p and g are continuous on an open interval I = ( α, β ) containing the point t = t 0, then there exists a unique function y = φ (t) that satisfies the differential equation y' + p(t)y = g(t) (1) for each t in I, and that also satisfies the initial condition y(t 0 ) = y 0, (2) where y 0 is an arbitrary prescribed initial value.

13 Continue… The general solution of Eq. (1) is We denote this by (3). To satisfy the initial condition (2), we must choose c = y 0. Thus the solution of the initial value problem (1), (2) is We denote this by (4). where

14 THEOREM 2.3.2 Let the functions f and ∂f/∂y be continuous in some rectangle α < t < β, γ < y < δ containing the point (t 0, y 0 ). Then, in some interval t 0 − h < t < t 0 + h contained in α < t < β, there is a unique solution y = φ (t) of the initial value problem y' = f (t, y), y(t 0 ) = y 0.

15 Example Question: Use Theorem 2.3.1 to find an interval in which the initial value problem ty' + 2y = 4t 2, y(1) = 2 has a unique solution. Answer: Rewriting the equation in the standard form, we have y' + 2/t·y = 4t, so p(t) = 2/t and g(t) = 4t. Thus, for this equation, g is continuous for all t, while p is continuous only for t 0. The interval t > 0 contains the initial point; consequently, Theorem 2.3.1 guarantees that the problem has a unique solution on the interval 0 0.

16 Summary of Section 2.3 The linear equation y' + p(t)y = g(t) has several nice properties that can be summarized in the following statements: 1. Assuming that the coefficients are continuous, there is a general solution, containing an arbitrary constant, that includes all solutions of the differential equation. A particular solution that satisfies a given initial condition can be picked out by choosing the proper value for the arbitrary constant.

17 Summary of Section 2.3 (Ctd.) 2. There is an expression for the solution, namely, Eq. (3) or Eq. (4) above. Moreover, although it involves two integrations, the expression is an explicit one for the solution y = φ (t) rather than an equation that defines φ implicitly. 3. The possible points of discontinuity, or ingularities, of the solution can be identified (without solving the problem) merely by finding the points of discontinuity of the coefficients. If the coefficients are continuous for all t, then the solution not only exists and is continuous for all t, but it is also continuously differentiable for all t.

18 2.4 Autonomous Equations and Population Dynamics An important class of first order equations are those in which the independent variable does not appear explicitly. Such equations are called autonomous and have the form dy/dt = f (y).

19 Example: Exponential Growth Let y = φ (t) be the population of the given species at time t. The simplest hypothesis concerning the variation of population is that the rate of change of y is proportional to the current value of y. For example, if the population doubles, then the number of births in a given time period should also double. Thus we have dy/dt = ry, where the constant of proportionality r is called the rate of growth or decline, depending on whether it is positive or negative. Here, we assume that r > 0, so the population is growing. Solving equation subject to the initial condition y(0) = y0, we obtain y = y 0 e rt.

20 Example - Logistic Growth dy/dt = h(y)y or dy/dt = (r − ay)y. This Equation is known as the Verhulst equation or the logistic equation or in the equivalent form dydt = r(1 − y/K)y, where K = r/a. The constant r is called the intrinsic growth rate.

21 Example - Logistic Growth Example: Consider the differential equation dy/dt =(1 − y/3)y. Without solving the equation, determine the qualitative behavior of its solutions and sketch the graphs of a representative sample of them. Solution: dy/dt =0, leads to constant solutions y = φ 1 (t) = 0 and y = φ 2 (t) = 3, also called equilibrium solutions (or critical points).

22 2.5 Exact Equations and Integrating Factors THEOREM 2.5.1 Let the functions M, N, M y, and N x, where subscripts denote partial derivatives, be continuous in the rectangular region R: α < x < β, γ < y < δ. Then, M(x, y) + N(x, y)y = 0, is an exact differential equation in R if and only if M y (x, y) = N x (x, y) at each point of R. That is, there exists a function ψ satisfying equations, ψ x (x, y) = M(x, y), ψ y (x, y) = N(x, y), if and only if M and N satisfy equation M y (x, y) = N x (x, y).

23 Example: Solve the differential equation (y cos x + 2xe y )+(sin x + x 2 e y − 1)y' = 0. Answer: M y (x, y) = cos x + 2xe y = N x (x, y), so the given equation is exact. Thus there is a ψ (x, y) such that ψ x (x, y) = y cos x + 2xe y = M(x, y), ψ y (x, y) = sin x + x2e y − 1 = N(x, y). Integrate to get: ψ (x, y) = y sin x + x2e y + h(y).

24 Example: Solve the differential equation (Ctd.) Find ψ y from this eq. and setting the result equal to N to get ψ y (x, y) = sin x + x 2 e y + h(y) = sin x + x 2 e y − 1. Thus h'(y) = − 1 and h(y) = − y. Hence solutions of problem are given implicitly by y sin x + x 2 e y − y = c.

25 Integrating Factors Sometimes a differential equation that is not exact can be converted into an exact equation by multiplying the equation by a suitable integrating factor. Multiply M(x, y) dx + N(x, y) dy = 0 by μ (x,y) to make it exact and use theorem 2.5.1. Hence exact if and only if ( μ M) y = ( μ N) x.

26 Integrating Factors (Ctd.) If ( μ M) y = ( μ N) x, it is necessary that d μ /dx= (M y − N x /N)· μ. If M y − N x /N is a function of x only, then there is an integrating factor μ that also depends only on x. Further, μ (x) can be found by solving above equation, which is both linear and separable.

27 Example Find an integrating factor for the equation (3xy + y 2 ) + (x 2 + xy)y'= 0 and then solve the equation. Answer: M y − N x /N =(3x+2y-(2x+y))/(x 2 + xy)y= (x+y)/x(x+y) =1/x. Thus d μ /dx= μ /x and μ (x)=x. Multiply the diff. eq. by μ to obtain (3x 2 y+xy 2 ) + (x 3 +x 2 y)y = 0. This is exact and solution is x 3 y + ½x 2 y 2 = c.

28 2.6 Accuracy of Numerical Methods In Section 1.3, we introduced the Euler, or tangent line, method for approximating the solution of an initial value problem y' = f (t, y), y(t 0 ) = y 0. This method involves the repeated evaluation of the expressions t n+1 = t n + h, y n+1 = y n + h f (t n, y n ) for n = 0, 1, 2,.... The result is a set of approximate values y 1, y 2,... at the mesh points t 1, t 2,.... We assume, for simplicity, that the step size h is constant, although this is not necessary. In this section, we will begin to investigate the errors that may occur in this numerical approximation process.

29 Errors in Numerical Approximations Convergence. As the step size h tends to zero, do the values of the numerical approximation y 1, y 2,..., y n,... approach the corresponding values of the actual solution? The difference E n between the solution y = φ (t) of the initial value problem above and its numerical approximation y n at t n is given by E n = φ (t n ) − y n and is known as the global truncation error.

30 Errors in Numerical Approximations (Ctd.) Global truncation error arises from two causes: First, at each step we use an approximate formula to determine y n+1 ; second, the input data at each step are only approximately correct. For example, in calculating y n+1, we use y n rather than (the unknown) φ (t n ), and, in general, φ (t n ) is not equal to y n. If we assume that y n = φ (t n ), then the only error in going one further step is due to the use of an approximate formula. This error is known as the local truncation error e n.

31 Round-off error R n The round-off error R n defined by R n = y n − Y n, where Y n is the value actually computed from the given numerical method. The absolute value of the total error in computing φ (t n ) is given by | φ (t n ) − Y n | = | φ (t n ) − y n + y n − Y n |. Making use of the triangle inequality, | φ (t n ) − Y n | ≤ | φ (t n ) − y n | + |y n − Y n | ≤ |E n | + |R n |. Thus the total error is bounded by the sum of the absolute values of the global truncation and round-off errors.

32 Local Truncation Error for the Euler Method. Let us assume that the solution y = φ (t) of the initial value problem has a continuous second derivative in the interval of interest. Then φ (t) = f [t, φ (t)]. By chain rule and Taylor series expansion φ (t n + h) = φ (t n ) + φ '(t n )h + 12 φ ''(t n )h 2,

33 Local Truncation Error for the Euler Method (Ctd.) Compute to obtain the local truncation error e n+1 e n+1 = φ (t n+1 ) − y n+1 = 12 φ ''(t n )h 2. A uniform bound, valid on an interval [a, b], is given by |e n | ≤ Mh 2 /2, if the local truncation error must be no greater than, then from above equation we have.

34 Example consider the problem y' = 1 − t + 4y, y(0) = 1 on the interval 0 ≤ t ≤ 2. Let y = φ (t) be the solution of the initial value problem. Then φ (t) = (4t − 3 + 19e 4t )/16 and therefore φ ''(t) = 19e 4t e n+1 = (19e 4tn h 2 )/2, t n < t n < t n + h. If h =0.05 e 1 ≤ 19e 0.2 (0.0025)/2≈0.02901.

35 2.7 Improved Euler and Runge–Kutta Methods Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0 and let y = φ (t) denote its solution. Recall from Section 2.6 that, by integrating the given differential equation from t n to t n+1, we obtain The Euler formula y n+1 = y n + h f (t n, y n ) is obtained by replacing f [t, φ (t)] in above by its approximate value f (t n, y n ) at the left endpoint of the interval of integration.

36 Improved Euler Formula (or Heun Formula) We replace the integrand above by the average of its values at the two endpoints y n+1 = y n + (f(t n,y n )+f(t n+1, y n+1 )h)/2 Simplify above to obtain y n+1 = y n + (f n + f (t n +h,y n +hf n )h)/2 where t n+1 has been replaced by t n + h.

37 Example Use the improved Euler formula to calculate approximate values of the solution of theinitial value problem y' = 1 − t + 4y, y(0) = 1. Answer: For this problem f (t, y) = 1 − t + 4y; hence f n = 1 − t n + 4y n and f (t n + h, y n + h f n ) = 1 − (t n + h) + 4(y n + h f n ). Further, t 0 = 0, y 0 = 1, and f 0 = 1 − t 0 + 4yv = 5. If h = 0.025, then f (t 0 + h, y 0 + h f 0 ) = 1 − 0.025 + 4[1 + (0.025)(5)] = 5.475. Then, from improved Euler formula y 1 = 1 + (0.5)(5 + 5.475)(0.025) = 1.1309375. Continue the procedure to get y 2, y 3, …

38 Example (Ctd.)

39 Runge–Kutta Method The Runge–Kutta method involves a weighted average of values of f (t, y) at different points in the interval t n ≤ t ≤ t n+1. It is given by

40 Example Question: Use Runge–Kutta method to calculate approximate values of the solution of the initial value problem y' = 1 − t + 4y, y(0) = 1. Answer: Taking h = 0.2, we have k 01 = f (0, 1) = 5; hk 01 = 1.0, k 02 = f (0 + 0.1, 1 + 0.5) = 6.9; hk 02 = 1.38, k 03 = f (0 + 0.1, 1 + 0.69) = 7.66; hk 03 = 1.532, k 04 = f (0 + 0.2, 1 + 1.532) = 10.928. Thus y 1 = 1 + (0.2/6)[5 + 2(6.9) + 2(7.66) + 10.928] = 1 + 1.5016 = 2.5016.

41 Example (Ctd.) Further results using the Runge–Kutta method with h = 0.2, h = 0.1, and h = 0.05 are given in Table

42 Chapter Summary In this chapter we discuss a number of special solution methods for first order equations dy/dt = f (t, y). The most important types of equations that can be solved analytically are linear, separable, and exact equations. For equations that cannot be solved by symbolic analytic methods, it is necessary to resort to geometrical and numerical methods. Some aspects of the qualitative theory of differential equations are also introduced in this chapter: existence and uniqueness of solutions; stability properties of equilibrium solutions to autonomous equations.

43 Section 2.1 Separable Equations M(x) + N(y)dy/dx = 0 can be solved by direct integration. We discuss mathematical models for several types of problems that lead to either linear or separable equations: mixing tanks, compound interest, projectile motion, heating and cooling, and radioactive decay. Section 2.2

44 Section 2.3 Qualitative Theory Discussed existence and uniqueness of solutions to initial value problems. Conditions guaranteeing existence and uniqueness of solutions are given in Theorems 2.3.1 and 2.3.2 for linear and nonlinear equations, respectively. We show examples of initial value problems where solutions are not unique or become unbounded in finite time.

45 Section 2.4 Qualitative Theory Discussed autonomous equations, equilibrium solutions, and their stability characteristics. Autonomous equations are of the form dy/dt = f (y). Critical points (equilibrium solutions) are solutions of f (y) = 0. Whether an equilibrium solution is asymptotically stable or unstable determines to a great extent the long-time (asymptotic) behavior of solutions.

46 Section 2.5 Exact Equations M(x, y)dx + N(x, y)dy = 0 is exact if and only if ∂M/∂y = ∂N/∂x. Direct integration of an exact equation leads to implicitly defined solutions F(x, y) = c where ∂F/∂x = M and ∂F/∂y = N. Some differential equations can be made exact if a special integrating factor can be found.

47 Section 2.6 Numerical approximations to solutions of initial value problems involve two types of error: (i) truncation error (local and global), and (ii) round-off error. For the Euler method, the global truncation error is proportional to the step size h and the local truncation error is proportional to h 2.

48 Section 2.7 Two numerical approximation methods more sophisticated and efficient than the Euler method, the improved Euler method and the Runge–Kutta method, are described and illustrated by examples.


Download ppt "Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 02: The First Order Differential Equations."

Similar presentations


Ads by Google