MATH219 Lecture 1

download MATH219 Lecture 1

of 15

description

differential equations lecture notes

Transcript of MATH219 Lecture 1

  • MATH 219Fall 2014

    Lecture 1

    Content: Introduction, Direction Fields, Separable Equations (parts of sections1.1 and 1.3, section 2.2 (homogenous equations as described in problem 30 is alsocovered)).

    Suggested Problems:

    1.1: 6, 8, 15-20,

    1.3: 1, 2, 5, 9, 10, 16, 24, 28,

    2.2: 3, 5, 7, 11, 12, 23, 31, 34, 37

    1 Introduction

    A differential equation is an equation containing derivatives and algebraic oper-ations. We have one or more dependent variables which are functions of one ormore independent variables. The differential equation implicitly describes whatthese functions can be, through the given equation. If we have more than one de-pendent variable, we might also have a system of differential equations rather thana single equation.

    Example 1.1 Say x depends on a single variable t. Consider the differential equa-tion

    dx

    dt+ 5x = et.

    The equation says that the derivative of x with respect to t plus 5 times x should beequal to et. This is a constraint on the function x(t). The aim would be to find allfunctions x(t) that satisfy this constraint.

    Example 1.2 Say x and y both depend on a single variable t. Consider the systemof differential equations below:

    1

  • dx

    dt+ y = t

    dy

    dt+ xy = sin(t)

    Here, x and y are both functions of t subject to the two equations above. Thereforea solution will consist of a pair of functions (x(t), y(t)). It is not very meaningfulto say of x(t) (alone) is a solution etc.

    Example 1.3 This time, suppose that u is a function depending on both x andy. Since u is a multivariable function, it makes more sense to consider partialderivatives of u. Say

    u

    x+ u

    u

    y= x+ y.

    This is a single differential equation that relates the partial derivatives of u withrespect to x and y.

    Definition 1.1 A differential equation in which there is only one independent vari-able is called an ordinary differential equation, and is abbreviated by the lettersODE. A differential equation in which there is more than one independent variable(therefore, partial derivatives) is called a partial differential equation, and isabbreviated by the letters PDE.

    Example 1.4 Let x be a function of t. Consider the differential equation

    d2x

    dt2+ x

    dx

    dt+ x2 = 1.

    This time not only the first derivative, but also the second derivative of x appearsin the equation. The equation constrains the function x(t) by relating its second andfirst derivatives and the function itself.

    Definition 1.2 The highest derivative appearing in a differential equation is calledthe order of that equation.

    2

  • Example 1.5 The equationd2x

    dt2+ x

    dx

    dt+ x2 = 1 has order 2. The first example

    above is a first order ODE, the second example is a system of first order ODEs andthe third one is a first order PDE. The equation

    (dx

    dt

    )5+d3x

    dx3+ x = 0

    has order 3 (not 5. The 5th power is an algebraic operation, so it doesnt count).

    2 Solutions of First Order ODEs

    Let us now concentrate on the simplest possible case: A single first order ODE.Therefore we have one dependent variable (say y) and one independent variable(say t) related by a single differential equation. A function y(t) that satisfies theequation at all points t in an open interval (a, b) will be called a solution of thisODE. Note that, y(t) must be differentiable (and therefore continuous) in order forthe equation to make sense.

    Recall from calculus that a very effective way to understand the behaviour of afunction y(t) is by sketching its graph. Same is true for solutions of an ODE. Wecall such a graph a solution curve for the ODE.

    Example 2.1 An ODE may have many solutions. For example, consider the equa-tion

    dy

    dt= sin(t).

    This is an extremely simple differential equation since on the left hand side we havea first derivative and on the right hand side we have a function of t only. This isactually a calculus question. In order to find y(t), integrate the right hand side.

    y(t) =

    sin(t)dt = cos(t) + c.

    These are all solutions of the differential equation. Because of the +c term, thereare infinitely many solutions, depending on c. If we try to graph some of the solu-

    3

  • tions, we see that any two differ by a constant. The graph below shows three solutioncurves for three different values of c (and t belonging to the interval (0, 2)).

    Example 2.2 Next, consider the differential equation

    dy

    dt= y.

    We cannot solve this example directly with the method used in the last example (ifwe try to integrate the right hand side with respect to t, notice that we do not knowwhat to integrate, so we are stuck at this step). We will see how to find all solutionsof this equation soon, but for now just notice that the equation asks for a functionwhich is equal to its own derivative. We know such a function from calculus, namelyy(t) = et. Furthermore, if we multiply this function by a constant, observe that it

    4

  • is still a solution, so y(t) = cet is a solution for any value of the constant c. Weagain have infiinitely many solutions depending on c. But this time, the constant cappears multiplicatively rather than additively. Let us graph a few solutions again.The ratio of any two solutions is a constant, but their difference is not:

    In both examples above, we had infinitely many solutions. If an additional conditionwere given, such as y(0) = 1, then the solution would be unique. Say in the frstexample we had the condition y(0) = 1. Then we would need to have

    y(0) = cos(0) + c = 1,therefore c must be equal to 2. So the differential equation together with thiscondition has a unique solution y(t) = cos(t) + 2. On the graph, this means weare picking out the curve passing through the point t = 0, y = 1.

    5

  • Definition 2.1 Say we have a first order ODE with dependent variable y and in-dependent variable t. A condition of the form y(t0) = y0 is called an initial con-dition.

    3 Direction Fields

    Often, it is very difficult to find explicit solutions of an arbitrarily given differentialequation with pencil and paper. This is true even in the case of first order ODEs.For instance, we can easily bet that noone will ever be able to find formulas forexplicit solutions of an equation like

    dy

    dt= y3 + y cos(y) + sin(t3) +

    1

    ty y.

    Although in this generality, the task of finding all solutions of a differential equationis hopeless, the situation is not that bad. We mainly focus on two ways of dealingwith differential equations:

    How can we solve simple differential equations? For instance, ones that havesome structure in it? After all, the simpler the equation, the more often itappears in applications. Also, if we can solve large classes of equations withsome structure, they might give an idea about solutions of other equationslacking this structure.

    How can we say something about solutions of a differential equation withoutactually solving the equation?

    Answering the first question concerns the rest of this course. We will address thesecond question now for a first order ODE. Say we have

    dy

    dt= f(y, t)

    where f is an arbitrary function. This is the most general first order ODE inwhich the term dy

    dtis isolated. Solving the equation amounts to finding the solution

    curves. We can expect that there are again infinitely many of them, depending on aconstant c in some way or another. We do not yet know what these curves are, but

    6

  • the equation gives us some geometric information about them. At a point (t0, y0),

    the value ofdy

    dtwill give us the value of the slope of the tangent to the solution

    curve passing through this point. Hence we can do the following:

    First, plot line segments having these slopes (dydt

    (t0, y0) at (t0, y0)) for as many

    points (t0, y0) as possible. Sincedy

    dt(t0, y0) = f(t0, y0) we do not need to solve

    the ODE for this purpose but just to tabulate values of f(t0, y0).

    Then, sketch solution curves using the information that they must be tangentto these line segments at each point.

    This will give a rough idea about what the solution curves are like. We wont haveformulas for them, but we will see what they look like. The plot of the line segmentsis called a direction field.

    Example 3.1 Consider the differential equation

    dy

    dt= y(y 1).

    Here, f(t, y) = y(y 1) and it is special in the sense that it depends only on y butnot t. Let us find f(t, y) for a few values of y, listed in the table below:

    y f(t,y)-0.5 0.75

    0 00.5 -0.25

    1 01.5 0.75

    This means that on the direction field, for any point with y-coordinate 0.5, wewill place a line segment of slope 0.75 etc. Plotting these line segments results in adirection field as below:

    7

  • This plot was actually done using the subroutine dfield8 on Matlab, but it caneasily be done by hand given enough time. Now let us plot a few solution curveson the same graph; just follow the direction field. The solution curves should besketched in a way that they are tangent to the line segments at each point.

    8

  • Using this sketch, we can say several things about the solution curves even thoughwe dont have a single formula for any solution curve at this point:

    Solutions that have an initial value y(0) between 0 and 1 remain between 0 and1 and tend to 0 as t. These solutions are monotone decreasing.

    Solutions that have an initial value y(0) larger than 1 tend to infinity whent.These solutions are monotone increasing.

    Solutions that have an initial value y(0) less than 0 tend to 0 when t .These solutions are also monotone increasing.

    9

  • Of course, these are observations rather than proofs and care must be taken beforethey are seriously used. For instance, after this observation, one can go back andprove that the solutions are monotone increasing for y > 1 by looking at the sign ofy(y 1).

    4 Separable Equations

    The simplest way for solving a first order ODE is trying to integrate both sides ofthe equation. But this usually dramatically fails for a general equation of the formdy

    dt= f(t, y) since f cannot be integrated with respect to t unless we already know

    what y is, namely the solution of the problem itself! But in the following specialcase we can do something:

    Definition 4.1 Suppose that f(t, y) can be written in the formM(t)

    N(y)for some func-

    tions M and N . Then the differential equationdy

    dt=M(t)

    N(y)is called a separable

    differential equation.

    If our equation is separable, we can find all solutions to it as follows:

    dy

    dt=

    M(t)

    N(y)

    N(y)dy

    dt= M(t)

    N(y)dy

    dtdt =

    M(t)dt

    N(y) dy =

    M(t)dt

    (We can pass to the fourth equation from the third equation by means of chain rule.)In the last line, the left hand integral is purely with respect to y and the right handintegral is purely with respect to t. Therefore, in principle both can be evaluated

    10

  • and we obtain a relation between y and t. This is an implicit relation. In some caseswe can explicitly solve for y(t), but in many cases an implicit relation is sufficient.

    One can argue that the integrals obtained may be difficult to evaluate by hand. Thisis another type of difficulty, so at this stage we assume that the ODE is solved.In the worst case scenario one can evaluate the integrals by numerical methods.

    Example 4.1 Find all solutions of the ODE

    dy

    dt= tet

    2ln(y2).

    Solution: We can rewrite the equation as

    dy

    dt=tet

    2

    y2

    therefore it is separable. Multiply both sides by y2 and integrate.y2dy =

    tet

    2

    dt

    y3

    3=et

    2

    2+ c

    y =

    (et

    2

    2+ c

    ) 13

    There are a few things to note here. The right hand side integral can be obtainedusing the substitution u = t2. Only one c is enough since equality of the integrandsimplies that the antiderivatives differ by a constant. Also note that the constant cappears in the result in an awkward place.

    Example 4.2 Find all solutions of the ODE

    dy

    dt= y(y 2)t.

    Solution: This time we may rewrite the equation as

    11

  • dy

    dt=

    t

    1/y(y 2)but some care is needed. The two equations are equivalent if and only if y is differentfrom 0 or 2. We will take care of these cases separately. Now, for a moment assumethat y 6= 0 and y 6= 2. Then, as before,

    dy

    y(y 2)=

    tdt

    dy

    2(y 2)dy

    2y=

    tdt

    1

    2(ln |y 2| ln |y|) = t

    2

    2+ c

    ln

    y 2y = t2 + c

    y 2y

    = cet2

    y =2

    1 cet2

    Again, there are a few things to note. In order to pass from the first line to the

    second line, write1

    y(y 2)=

    A

    y 2+B

    yand solve for A,B. Then let us talk about

    the careless use of the constant c. Passing from line 3 to line 4, the constant c ismultiplied by 2, but it still takes all possible real values, therefore the new constantcan be written as c instead of 2c. Passing from line 4 to line 5, everything is expo-nentiated, so we should have ec instead. Lifting the absolute values gives ec. Thisis again an arbitrary constant, it can take all real values except for 0. So we shouldnote that in the last equation c is an arbitrary constant different from 0.

    What about y = 2 and y = 0? These constant functions are both solutions becaused2

    dt= 2(2 2)t and d0

    dt= 0(0 2)t are correct equations. Actually, the solution y =

    2 corresponds to the missing value c = 0 in the formula above. However, the solutiony = 0 does not correspond to any special value of c. It can rather be thought of asthe case c.

    12

  • There is a subtle point about the argument concerning y = 2 or y = 0. You mayrightfully ask if y(t) 6= 2 for some t can it not be equal to 2 for some other t?Would this not ruin the argument? The answer is that everything is alright becausetwo different solution curves cannot intersect at a point. However this depends ona deep result, the existence-uniqueness theorem which we will talk about later.

    5 Homogenous Equations

    Some first order ODEs are not separable, yet they become separable after a sub-stitution. In this section we will discuss one general class of examples: homogenousequations.

    Definition 5.1 A first order ODE is said to be homogenous if it can be writtenin the form

    dy

    dt= h

    (yt

    )for some function h.

    An equation may not be directly given in this form, but after some algebraic ma-nipulation one may see that it is homogenous. A quick test for homogeneity is as

    follows: Ifdy

    dt= f(t, y) = h

    (yt

    ), then f(t, y) = h

    (yt

    )= h

    (yt

    )= f(t, y) for any

    . Therefore, if f(t, y) 6= f(t, y) even for one value of , then the ODE is nothomogenous.

    Example 5.1 Letdy

    dt= t+ y.

    Then f(t, y) = (t+ y) 6= t+ y for almost all values of . Therefore this ODE isnot homogenous.

    Example 5.2 Letdy

    dt=t+ y

    t y.

    13

  • Then, we can rewrite this equation as

    dy

    dt=

    1 + yt

    1 yt

    .

    If we set h(v) =1 + v

    1 vthen

    dy

    dt= h

    (yt

    )therefore the equation is homogenous.

    Suppose now that we have a homogenous equation dydt

    = h(yt

    ). Substitute v = y/t.

    The right hand side will clearly be h(v). In order to compute the left hand side,notice that y = vt.

    dy

    dt=d(vt)

    dt= v + t

    dv

    dt

    Therefore the equation can be written as

    v + tdv

    dt= h(v)

    dv

    dt=h(v) v

    t

    therefore it is separable.

    Example 5.3 Let us solve the equation

    dy

    dt=

    1 + yt

    1 yt

    .

    14

  • Setting h(v) =1 + v

    1 vas above, we obtain

    dv

    dt=h(v) v

    tdv

    h(v) v=

    dt

    tdv

    1+v1v v

    =

    dt

    t(1 v)dv

    1 + v2= ln |t|+ c

    arctan(v) 12

    ln |1 + v2| = ln |t|+ c.

    Finally, plugging in v =y

    tgives us an implicit relation between y and t. It seems

    extremely difficult to write y in terms of t alone in this problem.

    15