* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download 2 methods for solving first order odes
Survey
Document related concepts
Schrödinger equation wikipedia , lookup
Two-body problem in general relativity wikipedia , lookup
Debye–Hückel equation wikipedia , lookup
Unification (computer science) wikipedia , lookup
BKL singularity wikipedia , lookup
Derivation of the Navier–Stokes equations wikipedia , lookup
Equation of state wikipedia , lookup
Equations of motion wikipedia , lookup
Perturbation theory wikipedia , lookup
Computational electromagnetics wikipedia , lookup
Heat equation wikipedia , lookup
Schwarzschild geodesics wikipedia , lookup
Exact solutions in general relativity wikipedia , lookup
Transcript
CHAPTER 2 METHODS FOR SOLVING FIRST ORDER ODES 2.1 2.1.1 Separable First Order ODE Separable Equations and How to Solve Them Separable First Order ODE A first differential equation is called separable if it can be rewritten in the form g(y) dy = f (x) dx (2.1) where g(y) is a function of y (which includes the case of g(y) equalling a constant) and f (x) is a function of x (which includes the case f (x) equalling a constant). 11 12 CHAPTER 2. METHODS FOR SOLVING FIRST ORDER ODES Note that if a differential equation can be rewritten in the form of equation (2.1.1) by changing the names of the variables, then it is separable. Not all first order differential equations are separable. The reader should verify that dy = x + y is not separable. dx Solving a separable first order differential equation amounts to integrating both sides with respect to their respective variables as shown below. Solving Separable First Order ODE Suppose that G(y) is an antiderivative of g(y) and that F (x) is an antiderivative of f (x). Then G(y) = F (x) + C solves the separable differential equation g(y) dy = f (x) dx Proof: By implicitly differentiating G(y) = F (x) + C with respect to x we get G0 (y) or dy = F 0 (x) dx g(y) dy = f (x) dx ¤ Example 2.1 Find all solutions to dy = 3y dx Solution: We rewrite the DE in differential notation and note that it is separable (with g(y) = y1 and f (x) = 3). 1 dy = 3 dx y (Note that this is only valid, so long as y 6= 0). Next, we antidifferentiate both sides: Z Z 1 dy = 3 dx y 2.1. SEPARABLE FIRST ORDER ODE 13 and obtain ln |y| = 3x + C, dy = 3y, where C is an arbitrary constant. dx This solution can be solved explicitly for y as which is an implicit solution to |y| = e3x+C so |y| = eC e3x or |y| = Ke3x , where K = eC is an arbitrary positive constant. Solving for y we obtain y = ±Ke3x . Noting that ±K is an arbitrary non-zero constant, we relabel it as K, dropping the condition that K be positive, or y = Ke3x . We can see by simply plugging into the DE that the constant function y = 0 also solves the DE, so y = Ke3x , where K is any arbitrary constant yields a solution to the DE. ¤ Note 1: In the previous example, when writing the DE in differential notation, we saw that y 6= 0, but in fact we saw that the constant function y = 0 itself solved the DE. This is the case in general, for if y = c is a zero 1 1 of g(y) (i.e., g(c) = 0) then y = c solves g(y) dy = f (x) dx. Note 2: In the previous example, after antidifferentiating both sides, only ONE constant of integration is required (why?). dy = xy 2 ; y(1) = Example 2.2 Find a solution to the initial value problem dx 2 14 CHAPTER 2. METHODS FOR SOLVING FIRST ORDER ODES Solution: We rewrite the DE in differential notation and note that it is separable. 1 dy = x dx y2 (Note that this is only valid, so long as y 6= 0). Next, we antidifferentiate both sides: Z Z 1 dy = x dx y2 and obtain 1 −y −1 = x2 + C 2 Plugging in the initial condition, we obtain 1 1 − = 12 + C 2 2 or C = −1. So 1 −y −1 = x2 − 1 2 solves the initial value problem. This can be solved explicitly for y as y= 1 ¤ 1 − 21 x2 Note that in the above example, we could have solved explicitly for y first, then obtained C. 2.1.2 Changing Variables to a Separable Equation Often in mathematics, a change of variables can be used to transform a problem into one that can more readily be solved. We provide a few examples that can be solved by a change of variables. Example 2.3 Solve the DE y y dy = sin( ) + dx x x 2.1. SEPARABLE FIRST ORDER ODE 15 Solution: Note that the DE is not separable. Consider the change of variable v = xy (or vx = y). Differentiating vx = y with respect to x we see that v+ dv dy x= dx dx So by substitution: v+ dv x = sin(v) + v dx We obtain dv x = sin(v), dx which is separable. csc(v) dv = 1 dx, x and − ln |csc v + cot v| = ln |x| + C So an implicit solution to the original DE is given by ¯ y ¯¯ y ¯ − ln ¯csc( ) + cot( )¯ = ln |x| + C ¤ x x In general, this technique works if Specifically, dy dx can be expressed as a function of xy . Suppose there is a differentiable function F (v) so that dy = F (y/x) dx Then the change of variables v = xy (or vx = y) will transform the differential equation into a separable differential equation in v and x. In Example (2.3), the function F (v) = sin v + v. 16 CHAPTER 2. METHODS FOR SOLVING FIRST ORDER ODES Exercises Solve each of the following: 1. dz = zt dt 2. dy x = dx y 3. dy = (y 2 + 1)x dx 4. dy = y(y + 1) dx 5. z 0 = z 2 6. dz = t sin z dt 7. x2 y dx + y 3 x dy = 0 8. ³z ´ dz ³ z ´2 = +2 dx x x Find solutions for the following initial value problems 9. dy √ = y; y(1) = 4 dx 10. dy = 3yx; y(1) = 2 dx 11. dy = 3yx; y(1) = 0 dx 12. θ dr = dθ; r(π) = 1 2 13. y dy − 2x csc y dx = 0; y(1) = r π 2