ENGI 3424 First Order ODEs Page 1-01

Similar documents
ENGI 2422 First Order ODEs - Separable Page 3-01

ENGI Second Order Linear ODEs Page Second Order Linear Ordinary Differential Equations

ENGI 9420 Lecture Notes 1 - ODEs Page 1.01

Basic Theory of Differential Equations

Ordinary Differential Equations (ODEs)

1985 AP Calculus AB: Section I

ENGI 3424 Engineering Mathematics Problem Set 1 Solutions (Sections 1.1 and 1.2)

Ordinary Differential Equations (ODE)

AP Calculus Testbank (Chapter 6) (Mr. Surowski)

Use separation of variables to solve the following differential equations with given initial conditions. y 1 1 y ). y(y 1) = 1

Math Applied Differential Equations

Introduction to First Order Equations Sections

EXACT EQUATIONS AND INTEGRATING FACTORS

Practice Midterm 1 Solutions Written by Victoria Kala July 10, 2017

(a) Show that there is a root α of f (x) = 0 in the interval [1.2, 1.3]. (2)

Differential Equation (DE): An equation relating an unknown function and one or more of its derivatives.

dy dx and so we can rewrite the equation as If we now integrate both sides of this equation, we get xy x 2 C Integrating both sides, we would have

Solutions to the Review Questions

ENGI Partial Differentiation Page y f x

Systems of Linear ODEs

ENGI 3424 Mid Term Test Solutions Page 1 of 9

Solutions. 1. Use the table of integral formulas in Appendix B in the textbook to help compute the integrals below. u du 9 + 4u + C 48

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

= f (x ), recalling the Chain Rule and the fact. dx = f (x )dx and. dx = x y dy dx = x ydy = xdx y dy = x dx. 2 = c

ENGI Partial Differentiation Page y f x

D1.3 Separable Differential Equations

SOLUTIONS BY SUBSTITUTIONS

UCLA: Math 3B Problem set 8 (solutions) Fall, 2016

Ordinary Differential Equations

Solutions to the Review Questions

XXIX Applications of Differential Equations

(competition between 2 species) (Laplace s equation, potential theory,electricity) dx4 (chemical reaction rates) (aerodynamics, stress analysis)

Definition of differential equations and their classification. Methods of solution of first-order differential equations

Section B. Ordinary Differential Equations & its Applications Maths II

MATH 1231 MATHEMATICS 1B Calculus Section 3A: - First order ODEs.

Chapter1. Ordinary Differential Equations

need not, however, correspond to the same point on the spoke.) At a certain time, consider a spoke in the lower half of the wheel. A short time later,

Mixing Problems. Solution of concentration c 1 grams/liter flows in at a rate of r 1 liters/minute. Figure 1.7.1: A mixing problem.

VII. Techniques of Integration

sections June 11, 2009

Sample Questions, Exam 1 Math 244 Spring 2007

ANOTHER FIVE QUESTIONS:

Math Applied Differential Equations

1993 AP Calculus AB: Section I

Daily Lessons and Assessments for AP* Calculus AB, A Complete Course Page 584 Mark Sparks 2012

Fourier Analysis Fourier Series C H A P T E R 1 1

y=5 y=1+x 2 AP Calculus Chapter 5 Testbank Part I. Multiple-Choice Questions

Boyce/DiPrima/Meade 11 th ed, Ch 1.1: Basic Mathematical Models; Direction Fields

Section 4.4 The Fundamental Theorem of Calculus

Linear Second Order ODEs

Outline. Calculus for the Life Sciences. Malthusian Growth Model. Introduction. Lecture Notes Separable Differential Equations

171, Calculus 1. Summer 1, CRN 50248, Section 001. Time: MTWR, 6:30 p.m. 8:30 p.m. Room: BR-43. CRN 50248, Section 002

Study Guide and Intervention. The Quadratic Formula and the Discriminant. Quadratic Formula. Replace a with 1, b with -5, and c with -14.

Section 2.2 Solutions to Separable Equations

Solutions to Math 41 Final Exam December 9, 2013

9.3: Separable Equations

MATH 100, Section 110 Midterm 2 November 4, 2014 Page 1 of 7

UBC-SFU-UVic-UNBC Calculus Exam Solutions 7 June 2007

Answer Key 1973 BC 1969 BC 24. A 14. A 24. C 25. A 26. C 27. C 28. D 29. C 30. D 31. C 13. C 12. D 12. E 3. A 32. B 27. E 34. C 14. D 25. B 26.

Integral Curve (generic name for a member of the collection of known as the general solution)

Extra Practice Recovering C

Solutions to Section 1.1

Chapter 27 AB Calculus Practice Test

Math 308 Exam I Practice Problems

Nonlinear Oscillations and Chaos

CHAPTER 6 Differential Equations

Math 266: Ordinary Differential Equations

The Fundamental Theorem of Calculus: Suppose f continuous on [a, b]. 1.) If G(x) = x. f(t)dt = F (b) F (a) where F is any antiderivative

Homework 2 Solutions Math 307 Summer 17

MTH 3311 Test #1. order 3, linear. The highest order of derivative of y is 2. Furthermore, y and its derivatives are all raised to the

Calculus II. George Voutsadakis 1. LSSU Math 152. Lake Superior State University. 1 Mathematics and Computer Science

Differential Equation. Introduction Booklet - I With the help of this booklet you can easily follow the concepts of differential equations.

2. Higher-order Linear ODE s

Differential Equations

1998 AP Calculus AB: Section I, Part A

Applications of Second-Order Differential Equations

Predicting the future with Newton s Second Law

Maths A Level Summer Assignment & Transition Work

Chapter 5: Limits, Continuity, and Differentiability

MATH 12 CLASS 5 NOTES, SEP

Introductory Differential Equations

Student s Printed Name:

2. Find the value of y for which the line through A and B has the given slope m: A(-2, 3), B(4, y), 2 3

UCLA: Math 3B Problem set 7 (solutions) Fall, 2017

Old Math 330 Exams. David M. McClendon. Department of Mathematics Ferris State University

First order differential equations

Outline. Calculus for the Life Sciences. What is a Differential Equation? Introduction. Lecture Notes Introduction to Differential Equa

Differential Equations

AP Calculus Multiple Choice Questions - Chapter 7

CALCULUS APPLICATIONS OF DIFFERENTIATION LESSON PLAN. C3 Topic Overview

Mathematics 132 Calculus for Physical and Life Sciences 2 Exam 3 Review Sheet April 15, 2008

Examiner: D. Burbulla. Aids permitted: Formula Sheet, and Casio FX-991 or Sharp EL-520 calculator.

1969 AP Calculus BC: Section I

Math 123, Week 9: Separable, First-Order Linear, and Substitution Methods. Section 1: Separable DEs

y0 = F (t0)+c implies C = y0 F (t0) Integral = area between curve and x-axis (where I.e., f(t)dt = F (b) F (a) wheref is any antiderivative 2.

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

SMA 208: Ordinary differential equations I

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

2008 CALCULUS AB SECTION I, Part A Time 55 minutes Number of Questions 28 A CALCULATOR MAY NOT BE USED ON THIS PART OF THE EXAMINATION

Math 308, Sections 301, 302, Summer 2008 Review before Test I 06/09/2008

Transcription:

ENGI 344 First Order ODEs Page 1-01 1. Ordinary Differential Equations Equations involving only one independent variable and one or more dependent variables, together with their derivatives with respect to the independent variable, are ordinary differential equations (ODEs). Similar equations involving derivatives and more than one independent variable are partial differential equations (to be studied in a later term). Contents: 1.1 First Order Separable ODEs 1. Eamples for First Order Separable ODEs 1.3 First Order Linear ODEs 1.4 Reduction of Order 1.5 Numerical Methods for First Order First Degree ODEs Appendi [not eaminable] 1.6 Eact First Order ODEs 1.7 Integrating Factor 1.8 Derivation of the General Solution of First Order Linear ODEs Additional Material: 1.9 Integration by Parts [Tutorial in Week 1 or ] There is also a tutorial in Week 1 or on partial fractions. That material will be posted on the web site for this course after the tutorial has taken place.

ENGI 344 1.1 First Order Separable ODEs Page 1-0 1.1 Separation of Variables Eample 1.1.1 Unconstrained population growth can be modelled by With (current rate of increase) is proportional to (current population level). t = number in the population at time t, This is a first order, first degree ODE that is both linear and separable. The order of an ODE is that of the highest order derivative present. The degree of an ODE is the eponent of the highest order derivative present. An ODE is linear if each derivative that appears is raised to the power 1 and is not multiplied by any other derivative (but possibly by a function of the independent variable), that is, if the ODE is of the form n k 0 k d y ak R k d A first order ODE is separable if it can be re-written in the form f y dy g d The solution of a separable first order ODE follows from Solution of Eample 1.1.1: f y dy g d

ENGI 344 1.1 First Order Separable ODEs Page 1-03 Eample 1.1.1 (continued) Eample 1.1. One of the simplest constrained growth (or predator-prey) models assumes that the rate of increase in, (the population as a fraction of the maimum population), is directly proportional to both the current population and the current level of resources (or room to grow). In turn, the level of resources is assumed to be complementary to the population: 1. resources This leads to the constrained population growth model d dt k 1 Classification of this ODE:

ENGI 344 1.1 First Order Separable ODEs Page 1-04 Eample 1.1. (continued)

ENGI 344 1.1 First Order Separable ODEs Page 1-05 Eample 1.1. (continued)

ENGI 344 1.1 First Order Separable ODEs Page 1-06 In this course, the only first order ODEs to be considered will have the general form with the following classification: Type Separable M, y d N, y dy 0 Reducible to separable Eact Feature M(, y) = f () g(y) and N(, y) = h() k(y) M(t, ty) = t n M(, y) and N(t, ty) = t n N(, y) for the same n M N y Linear M/N = P()y R() or N/M = Q(y) S(y) Bernoulli M/N = P()y R()y n or N/M = Q(y) S(y) n [Only the separable and linear types will be eaminable.] Eample 1.1.3 Terminal Speed A particle falls under gravity from rest through a viscous medium such that the drag force is proportional to the square of the speed. Find the speed vt at any time t > 0 and find the terminal speed v.

ENGI 344 1.1 First Order Separable ODEs Page 1-07 Eample 1.1.3 (continued)

ENGI 344 1.1 First Order Separable ODEs Page 1-08 Eample 1.1.3 (continued)

ENGI 344 1.1 First Order Separable ODEs Page 1-09 Eample 1.1.4 A block is sliding down a slope of angle, as shown, under the influence of its weight, the normal reaction force and the dynamic friction (which consists of two components, a surface term that is proportional to the normal reaction force and an air resistance term that is proportional to the speed). The block starts sliding from rest at A. Find the distance s t travelled down the slope after any time t (until the block reaches B). AP s t AB L Friction = surface + air Starts at rest from A Forces down-slope: Separation of variables method:

ENGI 344 1.1 First Order Separable ODEs Page 1-10 Eample 1.1.4 (continued)

ENGI 344 1.1 First Order Separable ODEs Page 1-11 Eample 1.1.4 (continued) The terminal speed v is The object will not begin to move unless 3 1 For a 10 kg block sliding down a slope of angle 30, with and k, with 4 g 9.81 ms, the terminal speed is just over 4.51 ms 1 and the graphs of speed and position are

ENGI 344 1. First Order Separable ODEs Page 1-1 1. Eamples for Separable First Order ODEs Orthogonal trajectories A family of curves in can be represented by the ODE dy f, y d Any curve, whose intersection with any member of that family occurs at right angles, must satisfy the ODE Another family of curves, all of which intersect each member of the first family only at right angles, must also satisfy the ODE Eample 1..1 Find the orthogonal trajectories to the family of curves y c

ENGI 344 1. First Order Separable ODEs Page 1-13 Eample 1..1 (continued)

ENGI 344 1. First Order Separable ODEs Page 1-14 Eample 1.. Find the orthogonal trajectories to the equipotentials of the electric field, Q V, y c, 4 r where r y. Lines of force and equipotential curves are eamples of orthogonal trajectories. Taking the inverse case to Eample 1.., for a central force law, the lines of force are radial dy y lines y k. All of these lines satisfy the ODE. The equipotential curves d must then be solutions of the ODE dy y y dy d c d y The general solution can be re-written as a family of concentric circles. y r, which is clearly the equations of

ENGI 344 1. First Order Separable ODEs Page 1-15 Newton s Law of Cooling t = temperature and If t = time, f = ambient [surrounding] temperature, then the rate at which the temperature of an object decreases, when it is immersed in some other substance whose steady temperature is difference: Eample 1..3 f 0 d k t k dt f, is proportional to the temperature An object is removed from boiling water (at 100 C) and is left in air at room temperature (0 C). After ten minutes, its temperature has fallen to 60 C. Find its temperature t.

ENGI 344 1. First Order Separable ODEs Page 1-16 Eample 1..4 A right circular cylindrical tank is oriented with its ais of symmetry vertical. Its circular cross-sections have an area A (m ). Water enters the tank at the rate Q (m 3 s 1 ). Water leaves through a hole, of area a, in the base of the tank. The initial height of the water is h. Find the height ht and the steady-state height h. o Torricelli: v gh Change of volume: Change = IN OUT

ENGI 344 1. First Order Separable ODEs Page 1-17 Eample 1..4 (continued)

ENGI 344 1.3 First Order Linear ODEs Page 1-18 1.3 First Order Linear ODEs The general form of a first order linear ordinary differential equation is dy P y R d [or, in some cases, d Qy Sy ] dy The derivation of the solution of a first order linear ODE requires knowledge of eact ODEs and integrating factors, which in turn require familiarity with partial differentiation (Chapter 4). Eact ODEs, integrating factors and the derivation of the solution of a first order linear ODE are presented in the appendi to this chapter. dy d The general solution of P y R is h h y e e R d C, where h P d The arbitrary constant of integration in the epression for h may be ignored safely. dy d : Let us verify that this is indeed a solution to P y R First note that dh d h

ENGI 344 1.3 First Order Linear ODEs Page 1-19 Eample 1.3.1 Solve y y 6e

ENGI 344 1.3 First Order Linear ODEs Page 1-0 Eample 1.3. : Find the current i t flowing through this simple RL circuit at any time t. The electromotive force is sinusoidal: E t E sint o The voltage drop across the resistor is Ri. The voltage drop across the inductor is Therefore the ODE to be solved is The integrating factor is therefore A two-step integration by parts and some algebraic simplification lead to h Eo Rt/ L e R dt e R sint L cost R L Details:

ENGI 344 1.3 First Order Linear ODEs Page 1-1 Eample 1.3. (continued) Introducing the phase angle, such that leads to and Also Therefore h R R L cos L R L sin sint cos cost sin sint E o e R dt e sin t R The general solution then becomes L Rt/ L L Rtan, ht ht it e e Rt dt C i t Rt/ L Eo sin t Ae R L steady - state transient For most realistic circuits, the current reaches 99% of its steady state value in just a few microseconds.

ENGI 344 1.3 First Order Linear ODEs Page 1- Eample 1.3.3 Find the general solution of the ODE y y sinh Note: sinh e e Therefore h h y e e R d C

ENGI 344 1.3 First Order Linear ODEs Page 1-3 Eample 1.3.4 Solve the ODE dy 1 e e d y y This ODE is neither separable nor linear for y as a function of. However, y dy y 1 e e d

ENGI 344 1.4 Reduction of Order Page 1-4 1.4 Reduction of Order Occasionally a second order ordinary differential equation can be reduced to a linked pair of first order ordinary differential equations. If the ODE is of the form f y, y, 0 (that is, no y term), then the ODE becomes the pair of linked first order ODEs f p, p, 0, p y If the ODE is of the form g y, y, y 0 (that is, no term), then the ODE becomes the pair of linked first order ODEs dp dy g p, p, y 0, p dy d d y d dy dp dp dy dp where the chain rule p d d d d dy d dy Eample 1.4.1 Find the general solution of the second order ordinary differential equation y y 4 3

ENGI 344 1.4 Reduction of Order Page 1-5 Eample 1.4.1 (continued) Note that the number of arbitrary constants of integration in the general solution matches the order of the ordinary differential equation. Eample 1.4. d y dy Solve. d d This second order ODE can be solved by either of the two methods of reduction of order. dy Let p d Method 1: The ODE becomes

ENGI 344 1.4 Reduction of Order Page 1-6 Eample 1.4. (continued) Method : The ODE becomes Note that linear ODEs never generate singular solutions, but non-linear ODEs sometimes do generate singular solutions.

ENGI 344 1.4 Reduction of Order Page 1-7 Eample 1.4.3 Solve y y y We need to quote some standard integrals: d a a a 1 arctan C, d 1 and C d 1 arctanh a a a C

ENGI 344 1.4 Reduction of Order Page 1-8 Eample 1.4.3 (continued)

ENGI 344 1.5 First Order ODEs - Numerical Methods Page 1-9 1.5 Numerical Methods for First Order First Degree ODEs Euler s Method Given an initial value problem, and dy f y y 0 y0 d, a simple method for finding the value of y at other values of is to follow a sequence of tangent lines along the unknown family of solution curves y y. At every point in the -y plane the slope of the tangent line is known: f, y.

ENGI 344 1.5 First Order ODEs - Numerical Methods Page 1-30 Eample 1.5.1 Given that dy y d and y 0 1, estimate the value of y at = 0.4. f, y y. We shall use Euler s method with a step size of h = 0.1. Euler s method is well-suited to evaluation in a spreadsheet [see "www.engr.mun.ca/~ggeorge/344/demos/e151euler.ls"] We require the value of y 4. Through techniques beyond the scope of this course - or using Maple software [see "www.engr.mun.ca/~ggeorge/344/demos/e151.mws"] - the eact solution to this initial value problem can be shown to be / z t y e 1 erf, where erf z e dt. 0 The correct value of y(0.4) is 1.105 318 953... The Euler method has produced an error of more than.7% in the value of y.

ENGI 344 1.5 First Order ODEs - Numerical Methods Page 1-31 Runge-Kutta (RK4) Method Many improvements on Euler s original method have been proposed over the past two centuries, based on combinations of values of the slope of the tangent at several points in the neighbourhood of n, y n. Among the most widely accepted is the RK4 method, y f, y, y y whose algorithm for the solution of the initial value problem at 0 nh is: 1 k f, y n 1 1, n n 1 1 1, 3 n n k f h, y h k 4 n n 3 n k f h y h k k f h y h k h yn 1 yn k k k k 6 1 3 4 0 0 For the same choice of step size h the RK4 method is much more accurate, but at the price of many more calculations. This algorithm is ideally suited for implementation in a spreadsheet [see "www.engr.mun.ca/~ggeorge/344/demos/e15rk4.ls"]. Eample 1.5. Given that at = 0.4. dy y d and y 0 1, use the RK4 method to estimate the value of y This is just the initial value problem of Eample 1.5.1. To illustrate the power of the RK4 method compared to the original Euler method, let us use a single step: h = 0.4 and n = 1

ENGI 344 1.5 First Order ODEs - Numerical Methods Page 1-3 Eample 1.5. (continued) The eact value is 1.105 318 953... The RK4 value is correct to five significant figures. The RK4 method has produced a negligible error of less than 0.01% in the value of y, despite using only one step instead of four steps. There are more eamples in the problem sets. Also see the tutorial eamples for partial fractions and ordinary differential equations on the web site for this course. Some of the eamples in the non-eaminable appendi do provide additional practice in separation of variables or linear ODEs. END OF CHAPTER 1

ENGI 344 1.6 Eact First Order ODEs Page 1-33 Appendi to Chapter 1 [not eaminable] 1.6 Eact First Order ODEs [requires partial differentiation, Chapter 4] Method: The solution to the first order ordinary differential equation can be written in the implicit form If M, y and, M, y d N, y dy 0 u, y c, (where c is a constant) u u du d dy 0. y N y can be written as the first partial derivatives of some function u with respect to and y respectively, then Clairaut s theorem, u u y y leads to the test for an eact ODE: M N y from which either u M d (and use uy N to find the arbitrary function of integration f y ) or u N dy (and use u M to find the arbitrary function of integration g ) Note that these anti-derivatives are partial: In u M d, treat y as though it were constant during the integration. In u N dy, treat as though it were constant during the integration. After suitable rearrangement, any separable first order ODE is also eact, (but not all eact ODEs are separable).

ENGI 344 1.6 Eact First Order ODEs Page 1-34 Eample 1.6.1 Find the general solution of dy y e d. Rewrite as y e d e dy 0 M N The test for an eact ODE is positive: M e y N u M d y e d y e f y where f y is an arbitrary function of integration. u e f y y N, y e f y 0 f y c But 1 Therefore u y e c c 1 The general solution is y A e Check: y 0 e A e y y e y y e

ENGI 344 1.6 Eact First Order ODEs Page 1-35 Eample 1.6.1 (alternative method) dy Find the general solution of y e d Rewrite as y e d e dy 0 M N The test for an eact ODE is positive:. u y M y e N N e u N dy e dy y e g where g is an arbitrary function of integration. u y e g But M ye g g c 1 u y e c c 1 y A e

ENGI 344 1.6 Eact First Order ODEs Page 1-36 Eample 1.6. dy Solve y 1. d 1 d M separable. y dy N 0 But M N 0 y Therefore the ODE is also eact. u M d ln f y u 0 f y y But N y f y y y f y c y u, y ln c c Check: y A ln 1 1 dy y 0 d 1 dy y 1 d

ENGI 344 1.6 Eact First Order ODEs Page 1-37 A separable first order ODE is also eact (after suitable rearrangement). hk ydy 0 f g y d f k y d dy h g y M N 0 M 0 y N Therefore eact! However, the converse is false: an eact first order ODE is not necessarily separable. A single counter-eample is sufficient to establish this. Eample 1.6.1: y y e is eact, but not separable.

ENGI 344 1.6 Eact First Order ODEs Page 1-38 Eample 1.6.3 Find the equation of the curve that passes through the point (1, ) and whose slope at any point (, y) is y /. Solution by the method of separation of variables: dy d y This ODE is separable. dy d ln y ln C (unless y 0, which is a solution) y C ln y ln A A e y A (family of parabolae; y 0 is included in this family). But (1, ) is on the curve = A (1) Therefore y Solution starting with the recognition of an eact ODE: dy d y y d dy 0 y which is not eact. y However, d 1 dy 0 is eact: y 1 0 y y

ENGI 344 1.6 Eact First Order ODEs Page 1-39 Eample 1.6.3 (continued) u M d d ln f y u 0 f y y But N 1 f y 1 y y ln 1 f y y c, ln ln 1 u y y c c ln y ln C ln ln A ln A y A (as before). In general, if an eact ODE is seen to be separable, (or separable after suitable rearrangement), then a solution using the method of separation of variables is usually much faster.

ENGI 344 1.6 Eact First Order ODEs Page 1-40 Find the complete solution of 3 y 4 d 4 3 y 3 dy 0, y when 1. 4 P 3 y and Q 3 3 4 y are both of the type f g y. Therefore the ODE is separable. 3 4 y 3 dy d 4 dy 3 d 4 3 y y 4ln y C 3ln 4 3 3 y C A A 3 ln ln ln ln ln 4 3 y A or 3 4 y A OR 3 P 1 y Q y Therefore the ODE is eact. Eact method: Seek u, y such that u 4 u 3 3 3 y and 4 y y 3 4 u y c c 1 The [implicit] general solution is 3 4 y A But (0.5, ) lies on the curve 3 4 1 A A Complete solution: 3 4 y

ENGI 344 1.6 Eact First Order ODEs Page 1-41 Eample 1.6.5 Solve y d 1 dy 0 P y y 1 and Q 1 are both of the type f g y. Therefore the ODE is separable. dy d y1 1 1 A ln y 1 ln 1 c1 ln 1 Therefore the general solution is OR 1 1 y A P Q y Therefore the ODE is eact. Eact method: u, y such that Seek u u y 1 and 1 y 1 1 u y A If one cannot spot the functional form for u, y, then u M d y 1 d y 1 d y 1 f y y u f y N 1 f y 1 f y y c But 1 u y 1 y c1 c, then 1 1 Let A c c1 1 y A

ENGI 344 1.6 Eact First Order ODEs Page 1-4 Eample 1.6.6 Solve cos y y sin y d cos y y sin y dy 0 cos y cannot be epressed in the form f g y This ODE is not separable. y. cos sin 1 sin 1sin 1cos P y y y P y y y y sin cos Q cos y y y Q sin y y y P Therefore the ODE is eact. Seek u, y such that u y u cos sin and cos sin y y y y y y y u = sin cos y y y A Occasionally another form of eact ODE arises, when one can spot the form d f, y g, whose solution is f, y g d d. Eample 1.6.7 Solve y y dy d cos This ODE is neither separable nor linear. However y y y d y cos y sin C d sin C y dy d d d

ENGI 344 1.7 Integrating Factor Page 1-43 1.7 Integrating Factor Before introducing the general method, let us eamine a specific eample. Eample 1.7.1 Convert the first order ordinary differential equation y d dy 0 into eact form and solve it, (without direct use of the method of separation of variables). [Note, this ODE is different from Eample 1.6.3.] The ODE is separable and we can therefore rearrange it quickly into an eact form: 1 d dy y 0 However, let us seek a more systematic way of converting a non-eact form into an eact form. I y be an integrating factor, such that {(the ODE) I, y } is eact: Let, y I d I dy 0 M N M I y I y N I I y We need a simplifying assumption (in order to avoid dealing with partial differential equations). Suppose that I I, then I 0 and I I y M N I 0 I I y

ENGI 344 1.7 Integrating Factor Page 1-44 Eample 1.7.1 (continued) di d I d I I d ln I ln C ln ln A ln A I A Multiplying the original ODE by I (), we obtain the eact ODE (different from the separable-and-eact form) y A d A dy 0 A is an arbitrary constant of integration. Any non-zero choice for A allows us to divide the new ODE by that choice, to leave us with the equivalent eact ODE y d dy 0 Therefore, upon integrating to find the integrating factor arbitrary constant of integration. I, we can safely ignore the If we notice that y y M and y y N then we can immediately conclude that u y c so that the general solution of the original ODE is y c

ENGI 344 1.7 Integrating Factor Page 1-45 Eample 1.7.1 (continued) If we fail to spot the form for the potential function u, then we are faced with one of the two longer methods: Either u M d y d y d y f y uy y f y f y y N f y 0 f y c But 1 1 u y c c y A y or A u N dy dy 1dy y g u y g y g M y g 0 g c But 1 1 u y c c y A y A The functional form for the integrating factor for an ODE is not unique. n1 n In eample 1.7.1, I, y A y is also an integrating factor, for any value of n and for any non-zero value of A. Proof: ODE y d dy 0 becomes n 1 n 1 n n A y d y dy 0 M N M 1 n 1 n n y y and N n 1 n M n y y the transformed ODE is eact.

ENGI 344 1.7 Integrating Factor Page 1-46 Eample 1.7.1 (continued) One can show that the corresponding potential function is y n1 u, y c1 c n 1 n 1, ln 1 u y y c c n both of which lead to y A y 1 A Checking our solution: dy 0 y A y d y d dy 0 Dividing by : y d dy 0 0 which is the original ODE.

ENGI 344 1.7 Integrating Factor Page 1-47 Integrating Factor General Method: Occasionally it is possible to transform a non-eact first order ODE into eact form. Suppose that P d Q dy 0 is not eact, but that I P d IQ dy 0 is eact, where I, y is an integrating factor. Then, using the product rule, M I P M I P P I y y y and N I Q N I Q Q I From the eactness condition M N I I P Q Q P I y y y If we assume that the integrating factor is a function of alone, then d I Q 0 I P Q d y 1 d I 1 P Q I d Q y This assumption is valid only if 1 P Q y Q R is a function of only. If so, then the integrating factor is I e R d [Note that the arbitrary constant of integration can be omitted safely.] Then R d u M d e P, y d, etc.

ENGI 344 1.7 Integrating Factor Page 1-48 If we assume that the integrating factor is a function of y alone, then di P Q 1 di 1 Q P 0 P I dy y I dy P y This assumption is valid only if 1 Q P P y Ry a function of y only. If so, then the integrating factor is R y dy I y e and R y dy u N dy e Q, y dy, etc. Eample 1.7. Solve the first order ordinary differential equation 1 3 y 6y y d 3 y dy 0 P Q The ODE is not separable. P 3 6 y y Q 6 0 P Therefore the ODE is not eact. y P Q 3 y y P y Q 3 y Q 3 y 1 R R d 1d I e e e [may ignore arbitrary constant of integration] Therefore an eact form of the ODE is 1 3 y 6y y e d 3 y e dy 0 M N

ENGI 344 1.7 Integrating Factor Page 1-49 Eample 1.7. (continued) M 3 6 y e y N 6 0 3 y e M Therefore the ODE is, indeed, eact. y If one cannot spot the potential function, 3 path to a solution is 3 1 u N dy e y y g 1, then the net fastest u y y y e [Note that an anti-differentiation of M with respect to would involve an integration by parts.] 3 1 6 0 u e y y y g But M 3 y y 6y e 1 0 1 g g c General solution: e 3 y y A 1

ENGI 344 1.7 Integrating Factor Page 1-50 Eample 1.7.3 [also Eample 1.1.4] A block is sliding down a slope of angle α, as shown, under the influence of its weight, the normal reaction force and the dynamic friction (which consists of two components, a surface term that is proportional to the normal reaction force and an air resistance term that is proportional to the speed). The block starts sliding from rest at A. Find the distance s(t) travelled down the slope after any time t (until the block reaches B). AP s t AB L W mg N Wcos Friction = surface + air vt F N kv ds dt Starts at rest from A v s 0 0 0 Forces down-slope: dv m W sin F mg sin mg cos kv dt dv k a bv, where a g sin cos and b dt m The separation of variables method was followed in Eample 1.1.4. Rewritten as dv bv a, it is obvious that this ODE is also linear. dt

ENGI 344 1.7 Integrating Factor Page 1-51 Eample 1.7.3 (continued) Integrating factor method: dv dt a bv bv a dt dv 0 This ODE is not eact. Assume that the integrating factor is a function of t only: I I t. P bv a Py b Q 1 Q 0 Py t " Py Q" Pv Qt b 0 b Q Q 1 R t R dt b 1dt bt I t e bt The ODE becomes the eact form bt bt bv a e dt e dv 0 bt, M bv a e N e We want a function u t, v such that u t bt bt u bv ae and e v One can easily spot that such a function is a bt a u v e A v Ae b b bt bt But a v0 0 (start from rest) 0 b A

ENGI 344 1.7 Integrating Factor Page 1-5 Eample 1.7.3 (continued) Therefore a bt 1 e v t b v ds a 1 dt b e bt a 1 bt s t e C b b But s0 0 a 1 0 0 b b C Therefore or a bt s bt e b 1 mg sin cos m kt/ m s t e 1 k k The terminal speed v then follows as in Eample 1.1.4.

ENGI 344 1.8 Linear ODE Derivation Page 1-53 1.8 Derivation of the General Solution of First Order Linear ODEs The general form of a first order linear ordinary differential equation is dy P y d R Rearranging the ODE into standard form, P y Rd 1dy 0 Written in the standard eact form with an integrating factor in place, the ODE becomes I P y R d I dy 0 Compare this with the eact ODE du M, y d N, y dy 0 M The eactness condition y di I P d di I P d Let h P d, then h ln I N and the integrating factor is h I e, where h P d. The ODE becomes the eact form h h 0 e Py R d e dy h h M e Py R, N e and h P. h h h h u M d e h y R d y h e d e R d h u y e e R d f y

ENGI 344 1.8 Linear ODE Derivation Page 1-54 u h e 0 f y y h But N e f y 0 h u y e e R d c c h y e e R d C h h 1 dy is d h h y e e R d C, where h P d Therefore the general solution of P y R A note on the arbitrary constant of integration in Let h m P d A h A and B e then 1 e e e B e e e e e B m h A h m h A h m m y e e R d C 1 h h h h C e B e R d C e e R d B B P d : A Therefore we may set the arbitrary constant in h including zero, without affecting the general solution of the ODE at all. P d to any value we wish,

ENGI 344 First Order ODEs Page 1-55 Review for the solution of first order first degree ODEs: P d Q dy 0 1. Is the ODE separable? If so, use separation of variables. If not, then. Can the ODE be re-written in the form y P y R? If so, it is linear. h h P d and y e e R d C Only the separable and linear types are eaminable in ENGI 344. Else 3. Is Py Q? If so, then the ODE is eact. u u Seek u such that P and Q. y The solution is u = c. Else h Py Q 4. Is a function of only? Q R d Py Q If so, the integrating factor is I e, where R. Q Then solve the eact ODE I P d + I Q dy = 0. Else, Q Py 5. Is a function of y only? P R y dy Q Py If so, the integrating factor is I y e, where R y. P Then solve the eact ODE I P d + I Q dy = 0. A first order ODE that does not fall into one of the five classes above is beyond the scope of this course.