Differential Equations Ii 1
Total Page:16
File Type:pdf, Size:1020Kb
FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING Lectures MODULE 12 DIFFERENTIAL EQUATIONS II 1. Revision of material in Differential Equations I 2. Separable first order equations dx x 3. = f dt t 4. Exact equations 5. Linear equations 6. Concluding comments 1. Revision of material in Differential Equations I Notation and classification: dx e.g. + t2 x =0 dt ordinary differential equation (ODE) (only ordinary derivatives in the equation) first order (highest derivative is first order) linear (no powers, or products, of x and derivatives of x ) homogeneous dependent variable x independent variable t @2y 1 @2y − = y2 @x2 c2 @t2 partial differential equation (PDE) (partial derivatives appear) second order (highest derivative is second order) nonlinear (because of y2 term) dependent variable y two independent variables x and t dx In this module we consider FIRST ORDER ODEs of the form = f(x; t). dt Four main types of this equation will be solved analytically. 2. Separable first order equations These equations were considered in Differential Equations I. For this type of equation the function f(x; t) is the product of a function of x only and a function of t only, i.e. f(x; t)=g(x)h(t). The ODE then becomes dx = g(x) h(t); dt and on cross-multiplying (or more accurately by dividing by g(x), integrating both sides of the equation with respect to t and changing the variable on the left-hand side (LHS) to x)weobtain Z Z dx = h(t) dt : g(x) 1 Clearly the LHS of the above depends only on x, whereas the right-hand side (RHS) depends only on t. Therefore, it is straightforward in principle to integrate both sides with respect to the named variables and hence find the solution to the ODE. Let us illustrate the method with an example. dx Ex 1. Solve + t2 x =0. dt Writing this equation in the general form by moving t2x to the RHS clearly shows that f(x; t)=−t2x, and so the function is a product of terms which depend only on t and x respectively. The given ODE is therefore of separable type. Rearranging leads to Z Z dx = − t2 dt ; x t3 ln |x| = − + C; 3 and on taking exponentials this can be written 3 t 3 3 |x| =exp − +C =e−t =3eC =Ae−t =3: 3 Since A is an arbitrary constant it is possible to remove the modulus sign from the LHS (without loss of generality) and so the general solution can be written 3 x = Ae−t =3 : 3. dx=dt = f(x=t) This is the second main class of equation. Here the RHS depends on the variables x and t only through the ratio x=t . x x2 t2 x t Examples are ; + ; sin ; ::: t t2 x2 t x x The solution procedure for this type of equation is to introduce a new variable y ,where y= ,andthen t rewrite the equation in terms of the variables y and t (instead of x and t as in the original equation). dx x General case: = f . dt t x Introduce y = , i.e. x = yt. t Differentiating the latter equation with respect to t (using the product rule) gives dx dy dy = t + y:1= t + y: dt dt dt Substituting this into the original equation leads to dy t + y = f(y) dt dy t = f(y) − y; which is separable so Z dt Z dy dt = : f(y) − y t In principle, therefore, a solution has been found. It should be emphasised that the substitution y = x=t ALWAYS produces a separable equation (although the integrals may be difficult to evaluate, of course). 2 dx x x2 Ex 2. Solve = + . dt t t2 [N.B. You should not remember the general formula for the solution, simply work from first principles each time.] x dx dy dy Put y = , i.e. x = yt,so = t + y:1= t + y . t dt dt dt Substituting into the original equation leads to dy x x2 t + y = + = y + y2 ; dt t t2 dy t = y2 ; Z dt Z dy dt = ; y2 t 1 − =ln|t|+C; y t i.e. − =ln|t|+C; in original variables : x 4. Exact equations Before considering the theory of exact equations two topics need to be looked at. (a) Partial differentiation First order partial derivatives were defined in module 4, and second and higher order partial derivatives can be obtained with an obvious generalisation of the procedures for ordinary derivatives:- @f @f e.g. f(x; y)=x2y2, =2xy2 ; = x2(2y)=2x2y @x @y and higher derivatives are then obtained, using an obvious notation, by @2f @ @f @ = = 2xy2 =2y2; @x2 @x @x @x @2f @ @f @ = = 2x2y =4xy ; @x@y @x @y @x @2f @ @f @ = = 2xy2 =2x(2y)=4xy : @y@x @y @x @y @2f @2f For the particular choice f(x; y)=x2y2 we have shown above that = , @x@y @y@x i.e. the mixed second order partial derivatives are equal. One can show that this result holds for ALL \reasonable" functions f (i.e. all functions that are sufficiently smooth { precise mathematical conditions can be written down). (b) Chain rule You have used the chain rule for functions of one variable: dy dy dx df dg e.g. if y = f(x)andx=g(u)then = = . du dx du dx du [The picture y − x − u can be helpful.] The chain rule can also be applied to functions of more than one variable. Introduce the function h(x(t);t), then dh @h dx @h = + : dt @x dt @t 3 This result is considered in more detail in Further Calculus II (module 19). Note the types of derivative appearing in the above identity. The variable x depends only on t , so differentiating it with respect to t gives the ordinary derivative dx=dt . On the other hand h depends on the two variables x and t so differentiation of h leads to the partial derivatives @h=@x and @h=@t. Finally, after use of x(t), h can be expressed as a function of t only and hence we can use the derivative dh=dt on the LHS of the equation. After that digression let us return to exact first order ODEs. The comments in (a) and (b) allow us to state the following result:- If a first order ODE has the form dx p(x; t) + q(x; t)=0 (1) dt and if there exists a function h such that @h @h = p; = q; (2) @x @t dh then (1) can be written = 0 , with solution h = constant . dt Important question: does h exist? It can be shown that a necessary condition for the existence of h is @p @q = ; (3) @t @x @2h @2h which is equivalent to = . @t@x @x@t Solution procedure for exact equations: (a) check that the given ODE has the general form (1) and hence determine the functions p and q ; (b) check that equation (3) is satisfied, so that the equation is exact; (c) solve equations (2) to determine h(x; t); (d) state the solution, h = constant . dx Ex 3. Solve (x − xt2) +8t−x2t=0. dt For this equation @p p = x − xt2 ; =0−2xt = −2xt ; @t @q q =8t−x2t; =0−2xt = −2xt : @x Since the two calculated partial derivatives are equal the given ODE is exact, and we must now find h . In order for the LHS of the given ODE to be expressed in the form dh=dt it is necessary to satisfy the equations @h @h = p = x − xt2 and = q =8t−x2t; @x @t which on integrating give x2 x2t2 x2t2 h = − + f(t)andh=4t2− +g(x); 2 2 2 respectively. Note that the equations being integrated both involved partial derivatives and so the usual constant of integration has to be a general function of the other variable. The equations stated above give 4 two expressions for the same function h , and so it is necessary to spot the form of h which is consistent with both equations. The simplest form, omitting the constant which could be added, is x2 x2t2 h(x; t)= − +4t2: 2 2 [Observe that this equation is consistent with the two expressions for h given earlier.] The solution of the original ODE is h = constant , which can therefore be written x2 x2t2 − +4t2 = constant : 2 2 5. Linear equations The most general first order linear ODE has the form dx + p(t) x = r(t) ; dt where p(t)andr(t) are any functions of t . The solution procedure involves multiplying the equation by a function g(t) chosen so that the resulting equation is exact. Let us first derive the general formula for g(t) . On multiplication by g(t) the original ODE becomes dx g(t) + g(t) p(t) x = g(t) r(t) ; dt dx i.e. g(t) +(gpx − gr)=0: dt @p @q Using the main result from section 4, the above equation is exact provided = ,where p(t)=g(t) @t @x and q(t)=g(t)p(t)x−g(t)r(t). Hence the equation is exact if @ @ dg (g(t)) = (g(t)p(t)x − g(t)r(t)) ; i.e. = g(t)p(t) : @t @x dt The latter equation is separable and so an expression for g(t) can easily be found Z Z dg = p(t) dt ; g Z ln |g| = p(t) dt + C; R R R p(t)dt+C p(t) dt p(t)dt |g|=e = e eC = Ae ; R p(t)dt or g(t)=Ae : It is usual to choose A = 1 for simplicity.