### SlideShare for iOS

by Linkedin Corporation

FREE - On the App Store

- Total Views
- 308
- Views on SlideShare
- 308
- Embed Views

- Likes
- 0
- Downloads
- 10
- Comments
- 0

No embeds

Uploaded via SlideShare as Adobe PDF

© All Rights Reserved

- 1. Solution Strategies for First Order Ordinary Diﬀerential Equations MATH 1951: Techniques in Calculus and Diﬀerential Equations Agatha C. Walczak-Typke University of Leeds School of Mathematics These notes are intended to be an aid for completing Exercise list 4. I give the general strategies for solving equations of various kinds, together with general formulas and their derivations. Then, I give model examples of how to solve various equations. Please read this critically, as there is a high likelyhood of typos in the text. Equations of the form M (x, y)dx + N (x, y)dy = 0 1 1.1 Separation of variables A ﬁrst order DE M (x, y)dx + N (x, y)dy = 0 is said to be separable if M (x, y) = p(x)q(y) and N (x, y) = r(x)s(y). Then it can be put into the form f (x)dx = g(y)dy, where f (x) = p(x)/r(x) and g(y) = −s(y)/q(y). A family of solutions can be obtained by integration to yield f (x) dx = g(y) dy + C1 where C1 is an arbitrary constant. The integrals are evaluated, and a function for y in terms of x is found. This general technique is called the method of separation of variables. Example 1. Find the general solution of (1 − x)dy + ydx = 0. Solution: First, we separate the variables to yield: dx dy = , y x−1 where x = 1 and y = 0. Second, we integrate both sides to yield: ln |y| + C1 = ln |1 − x| + C2 . Thirdly (this step optional) we solve for y: ln |y| + C1 = ln |1 − x| + C2 eln |y|+C1 = eln |1−x|+C2 yeC1 = (1 − x)eC2 y = C(1 − x). Thus, y = C(1 − x) is the general solution. 1
- 2. 1.2 “Homogeneous” equations Sometimes, the best way of solving a DE is a to use a change of variables that will put the DE into a form whose solution method we know. We now consider a class of DEs that are not directly solvable by separation of variables, but, through a change of variables, can be solved by that method. First a deﬁnition: If a function M (x, y) has the property that M (tx, ty) = tn M (x, y), then we say the function M (x, y) is a “homogeneous” function of degree n. The word homogeneous is put in quotes because the same word is unfortunately used in a diﬀerent context later on. A diﬀerential equation M (x, y)dx + N (x, y)dy = 0 is said to be a “homogeneous” diﬀerential equation if both functions M (x, y) and N (x, y) are homogeneous functions of (the same) degree n. In this case, we can represent the functions as M (x, y) = xn M (1, y/x) N (x, y) = xn N (1, y/x) Thus, we can write the diﬀerential equation as dx M (x, y) xn M (1, y/x) =− =− n = F (y/x). dy N (x, y) x N (1, y/x) Thus, we can substitute y = vx (substitution for “homogeneous” equations) where v is a new variable. By diﬀerentiating by x and the application of the product rule, we see that dy dv =x + v. dx dx Thus, the diﬀerential equation becomes x dv + v = F (v). dx Now, the variables can be separated to yield: dx dv = . F (v) − v x Example 2. Solve (x4 + y 4 )dx + 2x3 y dy = 0 Solution: First we check that the functions M (x, y) = x4 + y 4 and N (x, y) = 2x3 y are both “homogeneous” to the same degree. M (tx, ty) = (tx)4 + (ty)4 = t4 M (x, y) and N (tx, ty) = 2(tx)3 ty = t4 N (x, y). Thus we see that both functions are “homogeneous” of degree 4. Second, we perform the substitution y = vx. The diﬀerential equation becomes: (x4 + x4 v 4 ) dx + 2x4 v(v dx + x dv) = 0. If x = 0, then we divide to obtain: (1 + 2v 2 + v 4 ) dx + 2xv dv = 0.
- 3. Thirdly, we separate the variables: dx 2v dv = 0. + 2 x (v + 1)2 We integrate to get ln |x| − (v 2 + 1)−1 = C1 . Fourthly, we undo the substitution from earlier using the replacement v = y/x, where x = 0 to get: x2 ln |x| − 2 = C1 . x + y2 Note that here it is not so easy to get the solution y as a function in terms of x. Thus, this is our solution. 1.3 Exact equations If there is a function in two variables f (x, y) such that in the equation M (x, y)dx + N (x, y)dy = 0 it is true that ∂f ∂x ∂f N (x, y) = ∂y M (x, y) = then we call the diﬀerential equation an exact equation. In such a case, the family of solutions of the equation is given by f (x, y) = C1 . To check if a given equation of the form M (x, y)dx + N (x, y)dy = 0 is exact, it is enough to show that ∂N ∂M = ∂y ∂x (conclusive test for exactness) This stems from the fact that for a continuous function f in two variables, To ﬁnd the function f (x, y) for a given exact equation, we integrate f (x, y) = ∂2f ∂x∂y = ∂2f ∂y∂x M (x, y) dx + g(y) where the function g serves as the “constant” of integration (constant with respect to x). The function g(y) is determined using the function N (x, y): N (x, y) = ∂f ∂ = ( ∂y ∂y M (x, y) dx + g(y)) = Thus, g ′ (y) = N (x, y) − ∂ ( ∂y And so, g(y) = N (x, y) dy − ( ∂ ( ∂y M (x, y) dx) + g ′ (y). M (x, y) dx) ∂ ( ∂y M (x, y) dx)) dy Finally, we have (a somewhat messy looking) solution f (x, y) = M (x, y) dx + N (x, y) dy − ( ∂ ( ∂y M (x, y) dx)) dy = C1
- 4. I haven’t put a box around this formula, since you really shouldn’t try to memorize such a thing. The above is just a semi-formal way of showing that f (x, y) is the integral of M (x, y) by x plus the terms that only involve y in the integral of N (x, y) by y. Hopefully an example may make things clearer: Example 3. Show that the following diﬀerential equation is exact, and ﬁnd its family of solutions (4x − 2y + 5) dx − (2x − 2y) dy = 0 Solution: First, we check that the equation is exact. We identify M (x, y) = (4x − 2y + 5) and N (x, y) = −(2x − 2y) . We calculate that ∂M ∂N = −2 = . ∂y ∂x Thus, the equation satisﬁes the test for exactness. We now know that there is a function f (x, y) such that ∂f = 4x − 2y + 5 ∂x and ∂f = −(2x − 2y). ∂y To ﬁnd f , we second, integrate M (x, y) by x to get: f (x, y) = 2x2 − 2xy + 5x + g(y) where g is as described above. We will use N (x, y) to ﬁnd g. Third, we integrate N (x, y) by y to get: f (x, y) = y 2 − 2xy + h(x) Here the function h(x) appears for the same reasons as g(y) above. Fourth, we compare these two results for f to see that g(y) = y 2 (and h(x) = 2x2 + 5x). Thus, the solution is 2x2 − 2xy + 5x + y 2 = C1 . 2 Linear diﬀerential equations y ′ + a0 (x)y = f (x) First order linear diﬀerential equations have the normal form: y ′ + a0 (x)y = f (x). If f (x) ≡ 0, then the equation is called homogeneous. Otherwise, it is called nonhomogeneous. 2.1 Homogeneous equations We look for solutions of the homogeneous equation y ′ + a0 (x)y = 0. One feature of homogeneous linear DEs in general is that y = 0 is a solution. We call this solution the trivial solution. However, we are more interested in nontrivial (e.g. non-zero) solutions. Here we can separate variables: dy = −a0 (x) dx, y y = 0.
- 5. Solving as above by integrating and isolating y, we obtain the family of solutions y = C1 y1 (x) = C1 e− Ê a0 (x) dx (Formula for general solution of homogeneous linear equation). This is called the general solution of the equation. Example 4. Find the general solution of y ′ + 2xy = 0. Solution: We separate the variables: dy = −2x dx y integration of which yields ln |y| = −x2 + C. We solve for y: 2 y = C1 e−x to get the general solution. 2.2 Nonhomogeneous equations We now consider the nonhomogeneous equation y ′ + a0 (x)y = f (x). Every solution of this equation is called a particular solution. Suppose that y = yP (x) is a particular solution of the equation. Then, if y = yH (x) = C1 y1 (x) is the general solution of the associated homogeneous equation y ′ + a0 (x)y = 0, then the linear combination of solutions y = yH (x) + yP (x) = C1 y1 (x) + yP (x) is also a solution of the nonhomogeneous equation. We refer to this linear combination as the general solution of the nonhomogeneous equation. To calculate a particular solution, we use a method called variation of parameters: We assume a particular solution of a nonhomogeneous equation exists, and has the form yP = u(x)y1 (x), where u(x) is the function to be determined and y1 is the general solution of the associated homogeneous equation, with the constant C1 taken to be equal to 1. In other words, the constant from the general solution of the associated homogeneous equation is replaced by an unknown function u(x). The substitution of yP = u(x)y1 (x) into the left hand side of the nonhomogeneous equation y ′ + a0 (x)y = f (x) yields d [u(x)y1 (x)] + a0 (x)u(x)y1 (x) dx ′ = u′ (x)y1 (x) + u(x)[y1 (x) + a0 (x)y1 (x)] ′ yP + a0 (x)yP = = u′ (x)y1 (x) + 0
- 6. ′ where we used the fact that y1 satisﬁes the associated homogeneous DE, and so y1 +a0 (x)y1 (x) = 0. From the above calculation, it is clear that if yP is a solution of the nonhomogeneous equation, then the function u(x) must be chosen so that u′ (x)y1 (x) = f (x). Upon integration, we get u(x) = f (x) dx + C. y1 (x) Technically, any constant C can appear in the above equation. However, it is customary to set this constant to be 0. Thus, we write simply that the particular solution is yP = y1 (x) f (x) dx. y1 (x) Finally, we obtain the general solution of the nonhomogeneous equation y = yH + yP by f (x) dx, y1 (x) y = C1 y1 (x) + y1 (x) where y1 is as deﬁned in the general solution of the associated homogeneous equation. Thus, we have y = C1 (e− Ê a0 (x) dx ) + (e− Ê a0 (x) dx f (x) ) (e− Ê a0 (x) dx ) dx (Formula for general solution of nonhomogeneous linear equation). Note that this is the same solution as would be found by the integrating factor method below. Example 5. Find a general solution of xy ′ + (1 − x)y = xex Solution: First we rewrite the DE in normal form for linear DEs: y′ + ( 1 − 1)y = ex , x x = 0. Second, we ﬁnd the solution of the associated homogeneous equation y′ + ( 1 − 1)y = 0 x by separation of variables. Thus −1 dy = − 1 dx y x ln |y| = − ln |x| − x + C ex y = C1 x Thus the homogeneous solution is yH = C1 y1 (X) = C1 ex . x Thirdly, we use the homogeneous solution to ﬁnd the particular solution. From the normal form of x the nonhomogeneous equation, we have f (x) = ex . Hence, the particular solution is yP = u(x) ex , where, by above calculations, u(x) = y1 (x) f (x) dx = y1 (x) ex x−1 ex dx = x dx = x2 . 2
- 7. Thus, the particular solution is yP = u(x)y1 (x) = x2 ex = 1/2xex . 2 x Fourthly and ﬁnally, we write the general solution of the nonhomogeneous equation: y = yH + yP = (C1 2.3 1 1 + x)ex , x 2 x=0 Bernoulli’s equation Bernoulli’s equation is a nonlinear ﬁrst order diﬀerential equation of the form y ′ + a0 (x)y = f (x)y n , n = 0, 1. Equations of this form can be reduced to a linear equation through a suitable change of variable. We make the change of variable z = y 1−n (Change of variable for Bernoulli equation) Then, z ′ = (1 − n)y −n y ′ . Substituting this into the Bernoulli equation y ′ +a0 (x)y = f (x)y n yields Upon simplifying, we get z ′ + (1 − n)a0 (x)z = (1 − n)f (x). yn z′ n 1−n +a0 (x)y z = f (x)y n . Now, this linear equation can be solved using the previous methods. Example 6. Solve the Bernoulli equation 2 dy + 2xy dx = xe−x y 3 dx. Solution: First we put the equation in standard form by dividing by dx to get 2 y ′ + 2xy = xe−x y 3 . This is recognizable as a Bernoulli equation with n = 3. Therefore, we can (second) substitute z = y 1−n = y −2 from which we obtain the linear DE 2 z ′ − 4xz = −2xe−x . Third, using the formula for the solution of a nonhomogeneous equation, we get 2 2 z = C1 e2x + e2x 2 2 2 1 (−2xe−3x ) dx = C1 e2x + e−x . 3 Fourth and ﬁnally, we change back to the original variable y, and get the implicit solution: 2 2 3y −2 = Ce2x + e−x , where C is an arbitrary constant.
- 8. 2.4 Solving linear equations using integrating factors Here is another way of solving linear ﬁrst order diﬀerential equations. This produces the same results as before, but has an easier formula. However, this method cannot be extended to higher order equations. Here, our goal is to reduce the linear equation to an exact equation. Assume we are given a linear diﬀerential equation of the form y ′ + a0 (x)y = f (x). We want to try to solve this using the method for exact equations, so we ﬁrst put it in a more usable form: [a0 (x)y − f (x)] dx + dy = 0. Then, we test for exactness, and ﬁnd that (where M (x, y) and N (x, y) are deﬁned as in the section on exact equations:) ∂M = ∂N , if and only if a0 (x) ≡ 0. However, we can make this equation exact ∂y ∂x by multiplying it by a suitable integrating factor µ(x) which depends only on x. Doing so gives us [µ(x)a0 (x)y − µ(x)f (x)] dx + µ(x)dy = 0. Now, we ﬁnd that ∂N = µ′ (x). ∂x ∂M = µ(x)a0 (x), ∂y Thus, for exactness, we need to select a µ(x) such that µ′ (x) = a0 (x)µ(x). By assuming that µ(x) > 0 and separating the variables, it follows that one possible solution for µ(x) is (ignoring the constant of integration) ln µ(x) = a0 (x) dx , which through exponentiation leads to the explicit form Ê µ(x) = e a0 (x) dx (formula for integrating factor for a linear equation) Now we can solve the equation. We return to the form of the equation when multiplied by µ(x): [µ(x)a0 (x)y − µ(x)f (x)] dx + µ(x)dy = 0, which upon rearranging yields µ(x)y ′ + µ(x)a0 (x)y = µ(x)f (x). By the above deﬁnition of µ′ (x), we can rewrite this further as µ(x)y ′ + µ′ (x)y = µ(x)f (x). Notice that the left hand side of the above equation is simply the product rule for diﬀerentiation of the function µ(x)y. Therefore, we can write the equation in the more suggestive form d [µ(x)y] = µ(x)f (x) dx . Direct integration of this leads to µ(x)y = µ(x)f (x) dx + C1 where C1 is the constant of integration. We solve for y to get the family of general solutions: y= 1 [ µ(x) µ(x)f (x) dx + C1 ] (Formula for the general solution of a linear equation using the integrating factor method. ) Here of course µ(x) is the integrating factor as deﬁned above.
- 9. Example 7. Solve xy ′ − 5y = 3x6 ex Solution: First we get the equation in normal form y′ = 5 y = 3x5 ex , x x = 0. Second, we calculate the integrating factor µ(x) = e−5 Ê dx x = e−5 ln x = x−5 . Third, recognizing that f (x) = 3x5 ex , we can use the formula for the general solution to ﬁnd x−5 y = x−5 (3x5 ex ) dx + C1 = 3 Or, upon simpliﬁcation, y = x5 (3ex + C1 ) ex dx + C1

Full NameComment goes here.