Chapter 1 First Order Differential Equations §1 What is a differential

advertisement

Chapter 1

First Order Differential Equations

§

1 What is a differential equation?

Discussion: A differential equation is an equation involving derivatives.

EXAMPLES: d 2 y dx 2 dy

= 2 x

2

+ 3 y dx dy

+ 2 x dx

+ sin( x ) y dy sin( dx

) + y

2

=

= e x x

+ tan( x )

In the first example, y is to be a function of x whose derivative is 2 x

2 plus 3 times the original function y . Note that we write y instead of y ( x ). We will usually not distinguish between functions and variables in our notation. It will actually make things easier in some problems to just think of functions as variables and treat them accordingly. We will use both the notations dy/dx and y

0

( x ) to express the derivative of y with respect to x in this class, though we will often abbreviate y

0

( x ) as just y

0

, just as we write y instead of y ( x ).

The order of a differential equation is the highest order of derivative that occurs in the equation. The first and third examples are first order while the second example is second order. In this first chapter, we will consider first order equations. Selected equations of higher order will be considered in subsequent chapters.

Consider the first order equation y

0

= x − y . We can interpret this equation both algebraically and geometrically. Algebraically, it means we are looking for a function, y ( x ), whose derivative is equal to the variable x minus the function y ( x ) itself. To interpret the equation geometrically, we recall that the derivative y

0 is the slope of a curve. So this equation means we are looking for a curve whose slope at the point ( x, y ) is x − y . It is easiest to understand what this geometric condition means using a type of graph called a

1

Chapter 1: First Order Differential Equations slope field. We draw a small line segment at each point ( x, y ) with slope f ( x, y ). These form a “slope” field. Figure 1 shows the slope field for the equation dy/dx = x − y .

Figure 1

Of course, we can’t actually draw a line segment at every point ( x, y ), that would be infinitely many line segments. Indeed, it’s a lot of work to just draw line segments for a

13 × 13 grid. But that sort of tiresome repetitive task is exactly what computers were made for. A slope field is similar to a vector field, which you studied in Calculus 3, except that in a vector field we plot vectors which have both a length and a direction, while in a slope field we are just concerned with slope, that is direction, and not with length.

A particular solution to a differential equation is a function that satisfies the equation.

Example: y = x − 1 is a particular solution to y

0

= x − y.

Algebraically, it is easy to check that y ( x ) = x − 1 is a solution to y

0

= x − y . Just compute y

0

= 1 = x − ( x − 1) = x − y . Geometrically, the solution curve, y = x − 1 must run tangent to the slope field since at every point the solution curve has the same slope as the slope field, as illustrated in figure 2. A curve that runs tangent to the slope field at every

2

§ 1 What is a differential equation?

Figure 2 point is called an integral curve of the slope field (or an integral curve of the differential equation).

The reason for emphasizing that y = x − 1 is a particular solution, rather than just calling it a solution, to y

0

= x − y , is that the differential equation actually has lots of different solutions and we want to emphasize that y = x − 1 is just one particular solution out of infinitely many possibilities.

Examples: y = e

− x

+ x − 1 is a particular solution to y

0

= x − y y = 2 e

− x

+ x − 1 is a particular solution to y

0

= x − y

Looking at the slope field, it is easy to see that we could draw infinitely many different curves along the arrows, each of which corresponds to a solution of the equation (see figure

3).

There are two common approaches to dealing with the fact that we have infinitely many different solutions. One is to ask for the general solution instead of the particular solution.

A general solution is a set of solutions to a differential equation with as many arbitrary constants as the order of the equation.

3

Chapter 1: First Order Differential Equations

Figure 3

EXAMPLE: y = ke

− x

+ x − 1 is the general solution to y

0

= x − y.

For any choice of the arbitrary constant k we get a solution to the equation. The three solutions above come from choosing k = 0, k = 1 and k = 2. The equation is first order so we only expect one arbitrary constant. In many cases the general solution gives all the solutions but this need not be the case. A singular solution is a particular solution to an equation which is not an instance of the general solution. We will see examples of this later. (The term singular solution is sometimes given a more restrictive and technical meaning in advanced courses.)

A second approach to dealing with the non-uniqueness of solutions is to narrow the problem. We ask not for any old solution to the problem but rather for a solution which also has some additional properties. One common situation is an initial value problem where one wants the solution to a differential equation which takes a specified value at a given point.

EXAMPLE: The unique solution to the initial value problem y

0 y = (4 e

3

) e x

+ x − 1.

= x − y , y ( − 3) = 0 is

4

§ 1 What is a differential equation?

The condition y ( − 3) = 0 means that when x = − 3, y = 0. Geometrically, this means that we are looking for a curve that runs along the slope field, passing through the point

( x, y ) = ( − 3 , 0) (see figure 4). It should be clear from the picture that the solution is unique, that is to say, there is only one solution to the initial value problem. Once we have picked a point on the figure, then the curve must move along the arrows so there is only one way it can go (see figure 4).

Figure 4

Let’s finish this introduction with the question of why one might want to solve differential equations. Differential equations arise in a great many applications. Consider Newton’s second law of motion

Force = dp dt where p is momentum and t is time. This is probably more familiar to you as F = ma , where we have made the assumption that mass is constant. Suppose you are told the acceleration of gravity on the moon is 1 .

6m / sec

2

. If you drop a mass above the surface of the moon (“drop” implying released gently with initial velocity 0), how far will it fall in 1 second? Here you know acceleration, but what you want to know is distance. If we let x ( t ) be the distance fallen after time t seconds, then the acceleration is the second derivative of the distance, so x

00

= 1 .

6. Furthermore, when t = 0 the mass has not yet

5

Chapter 1: First Order Differential Equations fallen any distance, so x (0) = 0 and since the velocity at time t = 0 is 0, we also have x

0

(0) = 0. Thus we must solve the second order initial value problem, x

00

= 1 .

6, x (0) = 0, x

0

(0) = 0. Since force is defined using derivatives, in any physical situation where you know the forces acting on an object and then have to determine the future behavior of the object you will have a differential equation. Of course differential equations occur in many other subjects besides physics. Many situations can be pictured as slope fields, where you can tell how things are changing in the short run given knowledge about where you are right now. Working out how things change over the long run is then finding an integral curve for the slope field, or equivalently, solving a differential equation.

§

2 Separable Equations

Discussion: A first order differential equation is separable if the two variables can be separated, that is all the x ’s on one side of the equation and all the y ’s on the other side of the equation. We then solve the problem by integrating both sides of the equation. This is our first case where it will be convenient to forget that y is a function and treat it as a variable. Consider the following example.

dy dx

= xy

2

+ x.

We separate the variables by factoring the right hand side and then dividing through by y

2

+ 1 to get dy y 2 + 1

= x dx

We then integrate both sides to get an implicit solution arctan( y ) = x

2

+ C . Finally we

2 solve for y to get y ( x ) = tan( x

2

2

+ C ) .

You can check that this is a solution to the differential equation. This process should be a little disturbing.

dy/dx is a notation for the derivative of y with respect to x , but the terms dy and dx are just part of the notation and have no independent meaning.

Yet we just manipulated them like any other algebraic quantity. It is possible to prove that the technique given will always work, but I won’t bother to go through the details

(if you’re curious, stop by my office sometime).

dy and dx are called differentials . We will often find it convenient to manipulate differentials rather than whole derivatives; this

6

§ 2 Separable Equations is why the subject is called differential equations rather than derivative equations. This manipulation of differentials can be thought of as a useful mnemonic to remember how to solve these equations. The fact that the “obvious” manipulations produce correct answers is a large part of the reason why the dy/dx notation was adopted. Another point is that we included the constant of integration C for the x integral but not for the y integral.

We did that because if we included both constants of integration, the next step would have been to subtract the y –constant of integration from both sides of the equation and we would have had the same expression, except with x –constant minus y –constant instead of C. But the difference of two arbitrary constants is just another arbitrary constant so why bother. Finally, there is a common algebraic error waiting to mug unwary students in these equations. Consider the following example: dy dx

= y

2

− 1 .

We solve this in the same manner as earlier by dividing through by y

2 − 1 to get the separated equation dy y 2 − 1

= dx and then integrate both sides to get the implicit solution

1

2 log y − 1

= x + C (note that y + 1 in this text we will use log for natural logarithms as they are they only sort of logarithms we will consider). We now solve for y in terms of x to get the general solution. First we y − 1 multiply by 2 and exponentiate both sides to get = e

2 C e

2 x

. We then remove the | y + 1

| signs by taking ± the right hand side and solve for y to get the explicit solution

1 + ke

2 x y ( x ) =

1 − ke 2 x

(where k = ± e

2 C

). This is the general solution; it is a solution with one arbitrary constant, k, to a first order equation. But it doesn’t give all the solutions! You can quickly check that y = − 1 is a solution, but there is no choice of k that gives this solution. A solution not part of the general solution is called a singular solution . So where did we lose this solution? In the first step when we divided by y

2 − 1. If y = − 1, then we divided by

0 which is always trouble. A general rule of algebra, which students often miss, is that whenever you divide by an expression involving a variable, you must check separately to see if the expression = 0 is a solution. You might also note that y = 1, corresponding to k = 0 is also a solution. Since k = ± e

2 C

, it should not be the case that k = 0. This is an example of a singular solution for the implicit solution reappearing in the explicit

7

Chapter 1: First Order Differential Equations solution. Basically we lost a solution via careless algebraic manipulations in finding the implicit solution but we got it back by making careless algebraic manipulations (letting k = 0) in finding the explicit solution. This happy accident is not uncommon and I won’t comment on it in the future. You should note that singular solutions are real solutions and are just as natural as the general solution. The distinction between the singular and the general solution is just an algebraic distinction.

We are now ready to give the paradigm for solving separable equations.

Paradigm: Find all the solutions to dy dx y

= xy + x

STEP 1: Separate the variables dy dx dy

= ( x + 1 /x ) y

= ( x + 1 /x ) dx y

STEP 2: Integrate both sides

Z dy Z

= x + 1 /x dx y log | y | = x

2

+ log | x | + C

2

STEP 3: Solve for the explicit solution (if possible)

(Implicit Solution)

| y | = e

C | x | e x

2

/ 2 y = ± e

C xe x

2

/ 2

= kxe x

2

/ 2

( k = ± e

C

)

STEP 4: Check for singular solutions.

We divided by y and y = 0 is clearly a solution. But it is already part of the general solution with k = 0, so there are no singular solutions.

EXAMPLE: Find all the solutions of dy dx

= cos( x ) cos( y ) + cos( y )

STEP 1: dy cos( y )

= (cos( x ) + 1) dx

STEP 2: log | sec( y ) + tan( y ) | = sin( x ) + x + C

STEP 3: I can’t begin to solve this for y , so I will just leave it with the implicit solution.

8

§ 3 Initial Value Problems

STEP 4: We divided by cos( y ) and cos( y ) = 0 when y = (2 n + 1) π/ 2 with n any integer.

These are all solutions, as you should check, and none of these are examples of the general solution so they are all singular solutions.

Exercises: Determine which of the following equations are separable. If the equation is separable, find all solutions.

(1) dy

= xy dx dy

(3) = y

3

+ 3 y

2

+ 2 y dx dy

(5) = x

3 y

3

+ xy dx

(7) x + dy

= xe y dx

(9) dx dy

(11) x dx dy

(13) dy

− y

2 e x

+ y

= cos(

= 0

+ xy = 1 x ) + e x

(15) dx dy

= x

2

+ 2 x + 4 dx

(17) dy dx

(19) e y

= sin( x/y ) dy dx

− e x

= 1

+ cos( x ) y

2

(2) dy

= x

3

+ sin( x ) dx dy

(4) = sin( y ) dx dy

(6) = x

2 y + y/x dx

(8) e x

+

(10)

(12)

(14)

(16)

(18) dy

= y dx dy

= ye x

2 dx dy dx dy

= e x + y dx dy

+ xy = y

+ x

2 y + y = 0 dx dy

= sin( x ) dx sin( y )

(20) dy dx

= x + y y

§

3 Initial Value Problems

Discussion: All the examples we have worked so far have been to find all the solutions. We dy will now consider how to solve an initial value problem. Consider the example = xy − x , dx y (0) = 2. We know how to find all the solutions, but we want to find the particular solution that satisfies y (0) = 2. To do this we just take the general solution, which is y ( x ) = ke x

2

/ 2

+ 1 and plug in the condition y (0) = 2. This yields 2 = k + 1. We solve this equation for k to get k = 1 and the solution to the initial value problem is y = e x

2

/ 2 + 1.

This technique works not just for separable equations but for all initial value problems.

Paradigm: Solve the initial value problem dy dx

= xy + x

2 y, y (0) = 2

9

Chapter 1: First Order Differential Equations

FIRST: Find the general solution

Step 1: dy y

= x + x

2 dx

Step 2:

Z dy

=

Z x + x

2 dx y log | y | = x

2

/ 2 + x

3

/ 3 + C

Step 3: y = ke x

2

/ 2+ x

3

/ 3

( k = ± e

C

)

Step 4: We divided by y and y = 0 is a solution, but it is included in the general solution with k = 0. There are no singular solutions.

SECOND: Plug in the initial value and solve for the arbitrary constant.

y (0) = ke = 2 k = 2

So y ( x ) = 2 e x

2

/ 2+ x

3

/ 3

.

EXAMPLE: Solve the initial value problem dy dx

= xe y

, y (0) = 1.

FIRST: Find the general solution.

Step 1: e

− y dy = x dx .

Step 2:

Z e

− y dy =

Z x dx

− e

− y

= x

2

/ 2 + C

Step 3: y = − log( − x

2

/ 2 − C ).

SECOND: Plug in initial value and solve for the arbitrary constant.

y (0) = − log( − 0

2

− C ) set

= 1 log( − C ) = − 1

− C = e

− 1

C = − e

− 1

10

§ 3 Initial Value Problems

So y ( x ) = − log(

− x

2

2

+ e

− 1

).

Exercises: Solve the following initial value problems.

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

(11)

(12)

(13)

(14)

(15)

(16)

(17)

(18)

(19)

(20) dy

= y

2

− 9 , y (0) = 1 dx dy

= cos( e x

) , y (1) = 2 dx dy

= xy − 3 x, y (0) = 0 dx dy

= x

2 y + ln( x ) y, y (0) = 0 dx dy

= xy − x − y + 1 , y (3) = − 3 dx dy

= e x

( y

2

+ 4) , y ( − 2) = 1 dx dy

= y

2

− 5 y + 6 , y (0) = 2 dx dy

= x

2 y − 2 xy + y, dx dy dx dy

= xy

2

= xy

2 dx

− 8 x − 2 xy,

− x + y

2

− 1 , y (0) = y (1) = y

− 5

− 2

(0) = 3 dy dx

= x

, y y (0) = 1 dy dx

= x

, y y (1) = 2 dy dx dy

= cos

2

( y ) ,

= cos

2

( y ) , dx dy

= x

2 y + 4 y, dx dy

= x

2 y + 4 y, dx dy

= e x − y

, dx dy

= e x − y

, dx dy

= xy

2 y y (

− x + 2 y y y

2

(0) =

(0) = 0 y y

(0) = 1

( −

(0) = 1

π

2) = 1

) = 1

− 2 ,

π/ 2 y (0) = 1 dx dy

= xy

2

− x + 2 y

2

− 2 , y (0) = − 1 dx

11

Download