Notes - Full

Embed Size (px)

Citation preview

  • 8/6/2019 Notes - Full

    1/44

    A.C.Croft: MAA255 Ordinary Differential Equations 1

    Ordinary Differential Equations (ODEs)09MAA255

    ContentsPART A

    1. Introduction

    2. First order ordinary differential equations

    PART B

    3. General properties of linear ordinary differential equations

    4. Linear second order odes with constant coefficients

    5. Qualitative theory of differential equations

    6. Methods of reduction of order and variation of parameters

  • 8/6/2019 Notes - Full

    2/44

    A.C.Croft: MAA255 Ordinary Differential Equations 2

    Ordinary Differential Equations - PART AApril 24, 2011

    1 Introduction

    An Ordinary Differential Equation (ode) is an equation which involves at least one derivative of a

    function of a single variable and, possibly, the function itself and the independent variable.

    The order of an ode is the order of the highest derivative.

    e.g.d3y

    dx3+ 6x

    dy

    dx

    2+ y2 = 0 is an ode of order 3.

    A particular solution of an ode is a function which satisfies it.

    Solving an ode involves the process of integration.

    Each step of integration introduces an arbitrary constant.

    Thus the general solution of an nth order ode must include n arbitrary constants.

    Any particular solution may be obtained by taking particular values of the arbitrary constants.

    The arbitrary constants for any particular solution may be determined by boundary (or initial)

    conditions.

    1.1 Some examples

    Example 1. Consider the equationdy

    dx= A cos(nx).

    This is a first order ode which can be solved simply by integration to obtain

    y =A

    nsin(nx) + B

    where B is an arbitrary constant of integration.If it is known that y = y0 when x = 0, the constant of integration B must be equal to y0, and theparticular solution of the ode satisfying this initial condition is

    y = y0 +A

    nsin(nx).

    Example 2. Consider the motion of a particle of mass m subject to a force given by P ekt, where Pand k are constants.The equation of motion is mx = P ekt.(Note that a derivative with respect to time t is denoted by a dot. e.g. dxdt = x, and

    d2xdt2 = x.) Thus

    x =P

    mekt

    integrating this gives

    x = Pmk

    ekt + A

    where A is an arbitrary constant of integration. Integrating again gives

    x =P

    mk2ekt + At + B

  • 8/6/2019 Notes - Full

    3/44

    A.C.Croft: MAA255 Ordinary Differential Equations 3

    where B is an arbitrary constant of integration.If the particle is projected from the origin with speed V0 when t = 0.i.e. when t = 0, x = 0 and x = V0, then

    A = V0 +P

    mk, and B = P

    mk2.

    Thus

    x = V0t +P

    mk2

    ekt 1 + ktThis is the particular solution of the equation of motion subject to the given initial conditions.

    Notice that the general solution of this second order ode contains two arbitrary constants A, B.

    Example 3: Radioactivity.

    The rate of decay of a radioactive substance is proportional to the amount of the substance which

    remains. Denoting the amount of the substance by x, this implies that

    x = kx (1)

    where k is a positive constant.Equation (1) can be rewritten asdt

    dx= 1

    kx

    and this can be integrated with respect to x to give

    t = 1k

    dx

    x= 1

    klog x + c

    where c is an arbitrary constant.If x = x0 when t = 0, the constant c must be given by

    1k log x0. Thus

    kt = log x log x0 = log xx0and so

    x = x0 ekt.

    i.e. the amount of radioactive material exponentially decays.

    Example 4: Cooling.

    The rate of change of the temperature of a body is proportional to the difference in temperature between

    the body and its surroundings. Denoting temperature by , this implies that

    d

    dt = k( A) (2)where k is a positive constant and A is the temperature of the surroundings (assumed constant).Equation (2) can be rewritten as

    dt

    d= 1

    k( A)and so

    t = 1k

    d

    A = 1

    klog( A) + c

    where c is an arbitrary constant.Again, if = 0 when t = 0, we obtain

    kt = log

    A0 A

    or = A + (0 A)ekt.

  • 8/6/2019 Notes - Full

    4/44

    A.C.Croft: MAA255 Ordinary Differential Equations 4

    1.2 Notation

    An nth order ode can be expressed in the form

    f(x,y ,y, y, . . . , y(n)) = 0. (1)

    A general solution of this must contain n arbitrary constants. This may be expressed in the form

    g(x,y,c1, c2, . . . , cn) = 0. (2)

    Provided the n constants in an equation of the form (2) are independent, it is possible to construct annth order ode (1) which they must satisfy. This is obtained by differentiating (2) n times and using the nequations to eliminate the n arbitrary constants. Equation (2) is then called the primitive correspondingto the differential equation (1).

    e.g. Consider the primitive y = c log x, which contains one arbitrary parameter c. It can be seen thaty = cx1. We can then eliminate c by putting c = xy, to obtain y = xy log x, or

    dy

    dx=

    y

    x log x.

    It is usual to be given the differential equation (1) and be required to find the general solution (2).However, it is not always the case that a solution will exist or, if it does, that it will include all possible

    solutions.

    Example 5. Consider the first order ode

    x2 = k2(a2 x2) (3)for constants a and k. This can be written as

    dt

    dx= 1

    k

    a2

    x2

    ,

    which can be integrated to give

    kt = sin1

    x

    a

    + c or x = a sin(kt c). (4)

    This is the general solution of (3) containing the single arbitrary constant c.

    Note: There exist two special solutions of (3), namely x = a and x = a which are not containedin the general solution (4). These are known as singular solutions.

    (In this case, they are the envelopes of the family of solutions (4).)

    Questions concerning the existence and uniqueness of solutions, and the occurrence of singular solutions,are advanced topics that will not be considered in this module.

    2 First order ordinary differential equations

    Consider here equations that can be written in the form

    dy

    dx= F(x, y).

    Many different techniques exist for solving odes of this type. These depend crucially on the character ofthe function F(x, y).

  • 8/6/2019 Notes - Full

    5/44

    A.C.Croft: MAA255 Ordinary Differential Equations 5

    2.1 Separable equations

    We have already considered first order odes of the form

    dy

    dx= f(x) and

    dy

    dx= g(y)

    and shown that these can be solved by direct integration asdy =

    f(x) dx and

    dy

    g(y)=

    dx

    e.g.

    dy

    dx= cos x dy = cos x dx

    dy =

    cos x dx y = sin x + c.

    This approach can be extended to cases in which F can be written as the product of separate functionsof the dependent and independent variables. i.e. when the ode can be written in the form

    dy

    dx= f(x) g(y).

    In this case, the y- and x-dependent terms can be separated to give

    dy

    g(y)= f(x) dx,

    and a solution can be obtained by integration

    dyg(y) =

    f(x) dx.

    Example 1: Find the solution of the equationdy

    dx=

    y + 1

    x 1such that y = 1 when x = 0.

    Separating variables (and noting that we need the solution near x = 0) gives

    dy

    y + 1=

    dx

    1 x

    log |y + 1| = log |1 x| + A.Putting A = log C for convenience, we obtain

    y + 1 = C(1 x).

    But y = 1 when x = 0. Thus we require that C = 2, giving

    y + 1 = 2(1 x) or y = 1 2x.

  • 8/6/2019 Notes - Full

    6/44

    A.C.Croft: MAA255 Ordinary Differential Equations 6

    Example 2: Consider xdy

    dx+ cot y = 0.

    Separating variables gives

    tan y dy =

    dx

    x

    Thus

    log(cos y) = log x + log C

    orcos y = C x

    i.e.

    y = cos1(C x).

    Example 3: Considerdv

    dt= g k v2.

    This is the equation of motion for a body falling vertically under the action of a gravitational force mg anda resistance to the motion mkv2, which is proportional to the square of the speed: m dvdt = mg mkv2.Separating variables gives

    dv( gk v2)

    = k

    dt.

    Integrating this gives1gk

    tanh1

    vgk

    = k t + const.

    If the body is dropped from rest (i.e. if v = 0 when t = 0), then the constant must be zero, and weobtain

    v =

    g

    ktanh

    gk t

    .

    Thus, as t

    , v approaches the terminal speed ofgk

    .

    Example 4: Considerdy

    dx=

    x3

    y2.

    Separating variables gives y2dy =

    x3dx.

    Integrating this givesy3

    3=

    x4

    4+ c

    or

    y =

    34 x4 + 3c

    1/3.

    2.2 Homogeneous equations

    Differential equations of the form

    dy

    dx= f

    y

    x

    are called homogeneous equations.

    Specifically, this applies to equations that can be written in the form

    dy

    dx=

    P(x, y)

    Q(x, y)

  • 8/6/2019 Notes - Full

    7/44

    A.C.Croft: MAA255 Ordinary Differential Equations 7

    where P and Q are homogeneous equations in x and y and are of the same degree.

    For exampleP

    Q=

    x3 + 2xy2 + y3

    x2y + xy2 + 2y3or

    P

    Q=

    ax2 + bxy + cy2

    lx2 + mxy + ny2

    Equations of this type can be transformed into separable equations by the substitution

    y = v x

    where v is a function of x.

    With this substitutiondy

    dx= v + x

    dv

    dx, so that the equation becomes

    v + xdv

    dx= f(v)

    which can be separated as dv

    f(v) v =

    dx

    x.

    (Note that a singular solution of the form y = kx may occur for this class of equations when k is aroot of the equation f(k) = k.)

    Example 1: Consider the equation 2xydy

    dx= x2 + y2.

    This can be written asdy

    dx=

    1

    2

    x

    y+

    y

    x

    .

    Putting y = v(x)x, so that dydx = v + xdvdx , this becomes

    v + xdv

    dx=

    1

    2

    1

    v+ v

    ordv

    dx=

    1

    2x

    1

    v v

    in which the variables can be separated to give

    2 v dv

    1 v2 =

    dx

    x

    so that

    log(1 v2) = log x + log c, or 11 v2 = cx

    and so

    x2

    x2 y2 = cx or x = c(x2 y2) or y = x

    x 1c .

    (Notice that the equation in this example admits the singular solutions y = x.)

  • 8/6/2019 Notes - Full

    8/44

    A.C.Croft: MAA255 Ordinary Differential Equations 8

    Example 2: Consider the equation y2 + (xy + x2)dy

    dx= 0.

    In this case,dy

    dx= y

    2

    xy + x2.

    Putting y = v(x)x, this becomes

    v + xdv

    dx

    =

    v2

    v + 1so that

    xdv

    dx= 1

    v + 1(v2 + v2 + v) = v(2v + 1)

    v + 1.

    Separating the variables gives (v + 1)

    v(2v + 1)dv =

    dx

    x.

    The first integral can be expanded using partial fractions to givedv

    v

    dv

    2v + 1=

    dx

    x.

    so thatlog v 12 log(2v + 1) = log x + log c

    or

    log

    v2

    2v + 1

    = log

    c2

    x2

    or

    y2

    2xy + x2=

    c2

    x2

    i.e

    y2 = c2

    2y

    x+ 1

    or x =

    2c2y

    y2 c2 .

    (Notice that the equation in this example admits the singular solution y =

    12 x.)

    2.2.1 Equations that are reducible to homogeneous form

    Consider first order differential equations of the form

    dy

    dx= f

    ax + by + c

    lx + my + n

    These equations would be homogeneous if the constants c and n were zero. However, it is possible touse the substitutions (a shift in the origin of the coordinates)

    x = X + , y = Y +

    to reduce these terms to zero and hence to solve these equations by the above method.

    Using these substitutions

    ax + by + c = aX+ bY + (a + b + c), lx + my + n = lX + mY + (l + m + n)

    and, provided am bl = 0, it is possible to choose and such that a + b + c = 0 andl + m + n = 0, and the differential equation takes the form

    dY

    dX= f

    aX+ bY

    lX + mYwhich is a homogeneous equation that can be solved by the above method.

  • 8/6/2019 Notes - Full

    9/44

    A.C.Croft: MAA255 Ordinary Differential Equations 9

    Example 3: Consider the equationdy

    dx=

    y x + 1y + x + 5

    .

    Put x = X+ , y = Y + . Then

    y x + 1 = Y X + ( + + 1), y + x + 5 = Y + X+ ( + + 5)

    It can then be seen that + + 1 = 0 and + + 5 = 0 if = 2, = 3.With this choice, the differential equation becomes

    dY

    dX=

    Y XY + X

    .

    Putting Y = v(X)X, so that dYdX = v + XdvdX , this becomes

    v + Xdv

    dX=

    v 1v + 1

    so that

    Xdv

    dX=

    v 1v + 1

    v = v 1v + 1

    v2 + v

    v + 1= v

    2 + 1

    v + 1.

    Separating the variables gives v + 1v2 + 1

    dv =

    dX

    X

    which can be integrated to yield

    12 log(v

    2 + 1) + tan1 v = log X + log c

    or

    log X2 + log(v2 + 1) = log c2 2tan1 vor

    X2(v2 + 1) = c2e2tan1 v

    or

    X2

    Y2

    X2+ 1

    = c2 exp

    2tan1 Y

    X

    and thus we obtain

    (x + 2)2 + (y + 3)2 = c2 exp

    2tan1 y + 3

    x + 2

    .

    (Notice that no singular solutions occur for the equation in this example.)

    Example 4: Consider the equationdy

    dx

    =x y + 1

    2x 2y + 3.

    Notice that, in this equation, it is not possible to shift the origin of the coordinates to remove the constant

    terms. However, in this case, it is possible to proceed by putting

    z = x y.

    i.e. we put y = x z(x), so thatdy

    dx= 1 dz

    dx

    and the equation becomes

    1

    dz

    dx

    =z + 1

    2z + 3or

    dz

    dx= 1 z + 1

    2z + 3=

    z + 2

    2z + 3.

  • 8/6/2019 Notes - Full

    10/44

    A.C.Croft: MAA255 Ordinary Differential Equations 10

    It is then possible to separate the variables to obtain2z + 3

    z + 2dz =

    2 1

    z + 2

    dz =

    dx

    so that

    2z log(z + 2) = x + cor

    2(x y) log(x y + 2) = x + c or x 2y c = log(x y + 2).

    2.3 Linear equations

    Example 1. Find the general solution of the equation xdy

    dx+ y = ex.

    It may immediately be noticed that this equation can be expressed in the form

    d

    dx(xy) = ex

    which can immediately be integrated to give

    x y = ex + c.

    Thus

    y =ex + c

    x.

    It may also be noticed that the above ode is equivalent to either of the forms

    x2dy

    dx+ x y = x ex or

    1

    x

    dy

    dx+

    y

    x2=

    ex

    x2.

    These equations may therefore also be integrated as above by first multiplying by 1/x or x2 respectively.This approach may be formalised as follows:

    Consider linear ordinary differential equations of the form

    a(x)dy

    dx+ b(x) y = f(x).

    It may be observed that if b(x) = ddx a(x), then the left hand side is

    d

    dx

    a(x) y

    = a(x)

    dy

    dx +

    da

    dx y.

    Since the left hand side in this case is an exact differential, the solution can be obtained by integrating

    to obtain

    a(x) y =

    f(x) dx

    or

    y =1

    a(x)

    f(x) dx.

    If b(x) = ddx a(x), it is always possible to multiply both sides of the equation by a particular functionsuch that this condition is satisfied. We proceed as follows.

    First divide by a(x) , to write the general first order linear ode in the form

    dy

    dx+p(x) y = q(x).

  • 8/6/2019 Notes - Full

    11/44

    A.C.Croft: MAA255 Ordinary Differential Equations 11

    Then multiply by an integrating factor (IF) r(x) giving

    r(x)dy

    dx+ r(x)p(x) y = r(x) q(x).

    This is of the required form for exact integration if

    r(x)p(x) = ddx r(x) ordr

    dx= r p(x).

    Separating the variables gives drr

    = log r =

    p(x) dx.

    Hence the required integrating factor for the above equation with a specific p(x) is given by

    r(x) = ep(x)dx.

    Once this is known, the differential equation can be written as

    d

    dx

    r(x) y

    = r(x) q(x),

    and the solution is obtained by evaluating

    y = 1r(x)

    r(x) q(x) dx.

    Note 1. When evaluating an integrating factor, the constant of integration is irrelevant as it simply

    corresponds to multiplying the equation by a constant.

    e.g. r(x) = ep(x)dx e

    p(x)dx+c = e

    p(x)dx ec.

    The factor ec is just an arbitrary multiplicative constant.When applied to a linear ode, it may be chosen for convenience.

    Note 2. The constant of integration in the final integration of r(x) q(x) dx is essential. This constantmust be inserted when the integral is evaluated. It results in a term in the solution of the form

    y = . . . . . . +c

    r(x).

    The constant of integration is not added afterwards.

    Example 2. Find the general solution of the equation

    dy

    dx+

    2

    xy = x2

    This is in the standard form of a first order linear ode in which p(x) = 2x .

    Thus, the integrating factor is

    r(x) = ep(x)dx = e

    ( 2x

    )dx = e2logx = elog(x2) = x2.

    Multiplying the ode by the IF x2 gives

    x2dy

    dx+ 2 x y = x4

    ord

    dx

    x2 y

    = x4,

    which integrates to give

    x2 y = 15 x5 + c.

    Thus, the general solution is y =x3

    5+

    cx2

    .

  • 8/6/2019 Notes - Full

    12/44

    A.C.Croft: MAA255 Ordinary Differential Equations 12

    Example 3. Find the general solution of the equation xdy

    dx+ (x + 1) y = ex.

    This can be written in the standard form of a first order linear ode as

    dy

    dx+

    1 +

    1

    x

    y =

    1

    xex

    in which p(x) = 1 + 1x and q(x) =1x e

    x.

    Thus, the integrating factor is

    r(x) = ep(x)dx = e

    (1+ 1

    x)dx = ex+logx = ex elogx = x ex.

    Multiplying the ode by the IF x ex gives

    d

    dx

    x ex y

    = e2x,

    which integrates to give

    x ex y =

    e2xdx = 12 e

    2x + c.

    Thus, the general solution is y = ex

    2x + c ex

    x .

    Example 4. Find the general solution of the equation cos df

    d+ sin f = 1.

    This can be written in the standard form of a first order linear ode as

    df

    d+ tan f = sec .

    in which p() = tan .Thus, the integrating factor is

    r() = ep()d = e

    tan d = e log cos = elog sec = sec .

    Multiplying the ode by the IF sec gives

    d

    d

    sec f

    = sec2 ,

    which integrates to give

    sec f =

    sec2 d = tan + c.

    Thus, the general solution is

    f = sin + c cos .

    2.4 Some special cases

    It was seen above that, using the substitutions x = X + and y = Y + , differential equations ofthe form

    dy

    dx= f

    ax + by + c

    lx + my + n

    could be reduced to equations of homogeneous type, namely

    dy

    dx = Fy

    x

    .

    Many other differential equations can similarly be solved after using appropriate transformations of the

    variables.

  • 8/6/2019 Notes - Full

    13/44

    A.C.Croft: MAA255 Ordinary Differential Equations 13

    2.4.1 Bernoulli equations

    An equation of the typedy

    dx+p(x) y = q(x) yn

    where n is a constant and p(x) and q(x) are given functions is called a Bernoulli equation.

    Dividing by yn gives

    yndy

    dx +p(x) y1n = q(x).

    It can be seen that this can be simplified by putting

    z = y1n so thatdz

    dx= (1 n)yn dy

    dx

    and the equation takes the form1

    (1 n)dz

    dx+p(x) z = q(x)

    ordz

    dx

    + (1

    n)p(x) z = (1

    n)q(x)

    which is a linear equation in z, and can be solved using a standard integrating factor.

    Notice that the case when n = 0 is linear and, when n = 1, the equation has separable variables.Otherwise n can be any real number.

    Example 1. Consider the equationdy

    dx= xy3 + 2xy.

    This is a Bernoulli equation with n = 3, which can be rewritten as

    1

    y

    3

    dy

    dx

    2x

    y

    2= x.

    Put z = y2,dz

    dx= 2y3 dy

    dxto obtain

    1

    (2)dz

    dx 2x z = x

    ordz

    dx+ 4x z = 2x

    which is a linear equation for which the integrating factor is

    r(x) = ep(x)dx = e

    4xdx = e2x

    2

    .

    Multiplying by this, we obtaind

    dx

    e2x

    2

    z

    = 2x e2x2

    which can be integrated to give

    e2x2

    z = 12 e2x2

    + c

    or

    z = 12 + c e2x2

    or

    y =1

    c e2x2 12.

  • 8/6/2019 Notes - Full

    14/44

    A.C.Croft: MAA255 Ordinary Differential Equations 14

    2.4.2 Riccati equations

    An equation of the typedy

    dx= P(x) y2 + Q(x) y + R(x) (1)

    is called a Riccati equation.

    Notice that the equation is linear when P = 0, and is a Bernoulli equation when R = 0.

    No method exists which will always give the general solution of this equation.

    However, a general solution can be obtained if a particular solution is first known.

    Suppose that y = u(x) is a known particular solution of (1). i.e. it satisfies the equation

    u = P u2 + Qu + R.

    Now consider the function

    y = u(x) + 1/z(x) so that y = u z/z2.

    Substituting this into (1) gives

    u z

    z2= P

    u2 +

    2u

    z+

    1

    z2

    + Q

    u +

    1

    z

    + R.

    But u = P u2 + Qu + R, and we obtain

    z = P(2uz + 1) + Qz

    or

    z + (2P u + Q)z + P = 0 (2)

    which is a linear equation whose general solution can be obtained.

    Theorem: Ifu(x) is a known solution of (1), and if a general solution of (2) can be found for z(x), theny = u + 1/z is a general solution of (1).

    Proof: If u satisfies (1) and z satisfies (2), y = u + 1/z must satisfy (1).If z is a general solution of (2), it must contain an arbitrary constant.Hence, y = u + 1/z contains an arbitrary constant.Thus it must be the general solution of (1).

    Example 2. Consider the equation

    dy

    dx = y

    2

    +

    y

    x 3

    x2 .It can be seen that y = 1/x satisfies this equation.Thus, substitute y = 1/x + 1/z to obtain

    1x2

    z

    z2=

    1

    x2+

    2

    xz+

    1

    z2

    +

    1

    x2+

    1

    xz

    3

    x2

    or

    z

    z2= +

    2

    xz+

    1

    z2+

    1

    xzor

    z +3

    x

    z =

    1

    which is a linear equation for which the integrating factor is

    r(x) = ep(x)dx = e

    ( 3x

    )dx = e3logx = elog(x3) = x3.

  • 8/6/2019 Notes - Full

    15/44

    A.C.Croft: MAA255 Ordinary Differential Equations 15

    Multiplying by this givesd

    dx

    x3z

    = x3

    which implies that

    x3z = 14 x4 + c or z =c

    x3 x

    4and thus

    y =

    1

    x +

    4x3

    4c x4 .

    2.5 Exact differential equations

    It was shown above that the componentdy

    dx+p(x) y could be multiplied by the integrating factor

    r(x) = ep(x)dx to obtain the form

    d

    dx

    r(x) y

    which is an exact derivative.

    e.g. in example 4 above, the primitive

    sec x y = tan x + c (1)

    corresponds to the differential equation

    sec xdy

    dx+ sec x tan x y = sec2 x (2)

    although this would normally be written as

    dy

    dx+ tan x y = sec x. (3)

    Equation (2) is said to be exact because it can immediately be integrated to give (1). (It is the exact

    derivative of (1).) However, the equivalent equation (3) is not exact.

    Consider a primitive of the form

    (x, y) = c. (1)

    Differentiating this with respect to x gives

    x+

    y

    dy

    dx= 0.

    Thus (1) is a solution of the differential equation

    P(x, y) + Q(x, y)dy

    dx= 0 (2)

    if P(x, y) =

    xand Q(x, y) =

    y.

    Thus, differential equations of the form (2) can be solved as exact equations if there exists a function(x, y) such that the components P and Q are respectively the x and y partial derivatives of .

    Example 1. Consider the equation y cos x y2 sin x + (sin x + 2y cos x) dydx

    = 0.

    It can be seen that this has the solution

    y sin x + y2 cos x = c,

    since x [y sin x + y2 cos x] = y cos x y2 sin x and y [y sin x + y2 cos x] = sin x + 2y cos x.

    However, it may be noticed that the differential equation would usually be written as

    dy

    dx

    =y (1 y tan x)

    tan x + 2yand this only becomes exact after multiplying both sides by (sin x + 2y cos x) and rearranging.

  • 8/6/2019 Notes - Full

    16/44

    A.C.Croft: MAA255 Ordinary Differential Equations 16

    Theory: A differential equation of the form

    P(x, y) + Q(x, y)dy

    dx= 0

    can be solved as an exact equation if there exists a function (x, y) such that

    P(x, y) = x and Q(x, y) = y

    where the suffices denote partial derivatives.

    It is known that partial derivatives commute (i.e.2

    xy=

    2

    yx).

    In this case xy = yx. Thus

    Py = Qx.

    In fact, this is a necessary and sufficient condition for the existence of a function such that P = xand Q = y. The solution of the differential equation is then given by = c, where is obtained

    by solving these equations.

    Notice that, if Py = Qx, an exact equation can sometimes be obtained by multiplying by a suitablefunction.

    Example 2. Consider the equationdy

    dx=

    2x2 2y + y2x(1 y) .

    Rewrite this as

    2x2 2y + y2 + (x + xy) dydx

    = 0.

    This is of the form P(x, y) + Q(x, y) dydx = 0 where P = 2x2 2y + y2, Q = x + xy.This is an exact equation if Py = Qx.But

    Py = 2 + 2y, Qx = 1 + y.Thus it is not an exact equation. However, multiplying by 2x gives

    4x3 4xy + 2xy2 + (2x2 + 2x2y) dydx

    = 0,

    Which has the above form with P = 4x3 4xy + 2xy2, Q = 2x2 + 2x2y, for which

    Py = 4x + 4xy, Qx = 4x + 4xy,which satisfies the condition Py = Qx.Thus there exists a function (x, y) such that

    x= P = 4x3 4xy + 2xy2 and

    y= Q = 2x2 + 2x2y.

    By direct inspection, it can be seen that must have the form

    = x4 2x2y + x2y2 + const.

    Thus the differential equation has the solution

    x4 x2y(2 y) + c = 0.

  • 8/6/2019 Notes - Full

    17/44

    A.C.Croft: MAA255 Ordinary Differential Equations 17

    2.6 Summary

    For first order odes, we consider equations of the form

    dy

    dx= F(x, y).

    We have considered techniques for solving such equations when the function F(x, y) has any of thefollowing forms.

    If F = f(x) g(y) the equation may be integrated after separating the variables.

    If F = f

    y

    x

    the equation is homogeneous.

    Put y = v(x) x.

    The equation is then separable.

    If F = f ax + by + c

    lx + my + n

    with am bl = 0.Shift the origin to remove c and n.

    The equation is then homogeneous.

    If F = f

    ax + by + c

    lx + my + n

    with am bl = 0. Put z = ax + by.

    The equation is then separable.

    If F = q(x) p(x) y the equation is linear. Use the integrating factor r(x) = ep(x)dx.

    If F = q(x) yn p(x) y a Bernoulli equation. Put z = y1n to obtain a linear eqn.

    If F = P(x) y2 + Q(x) y + R(x) a Riccati equation. Need a particular solution first.

    If F = P(x, y)Q(x, y)

    where Py = Qx, the equation is exact.

    First order odes with some other forms for F(x, y) can be solved by special methods. However, forthe general case, no analytic methods are known for generating solutions given in terms of elementary

    functions. Even for the above methods, the remaining integrals involved often cannot be evaluated

    explicitly in terms of elementary functions.

  • 8/6/2019 Notes - Full

    18/44

    A.C.Croft: MAA255 Ordinary Differential Equations 18

    Ordinary Differential Equations PART B09MAA255

    Part B ContentsPART B

    3. General properties of linear ordinary differential equations

    4. Linear second order odes with constant coefficients

    5. Qualitative theory of differential equations

    6. Methods of reduction of order and variation of parameters

  • 8/6/2019 Notes - Full

    19/44

    A.C.Croft: MAA255 Ordinary Differential Equations 19

    Ordinary Differential Equations - PART B

    3 General properties of linear ODEs

    Second order linear ODEs generally have the form

    a(x)d2y

    dx2+ b(x)

    dy

    dx+ c(x) y = f(x), (1)

    where a, b, c and f are arbitrary functions of x.

    Generally, linear nth order odes have the form

    ni=0

    ai(x)diy

    dxi= f(x).

    They are called homogeneous if f(x) = 0.

    The following notes concentrate on second order equations, but the general properties of nth order linearodes can be immediately deduced.

    3.1 Superposition of solutions

    Initially consider the homogeneous case in which f(x) = 0. i.e. consider

    ad2y

    dx2+ b

    dy

    dx+ c y = 0.

    (2)Note first some general properties

    If y(x) is a solution of (2), then A y(x), where A is a constant, is also a solution.

    If y1(x) and y2(x) are any two solutions of (2),then y1(x) + y2(x) is also a solution.

    Proof; a (y1 + y2 ) + b (y

    1 + y

    2) + c (y1 + y2)

    = (a y1 + b y1 + c y1) + (a y

    2 + b y

    2 + c y2) = 0

    Since a general solution of a second order ODE must contain two arbitrary constants, it follows that, if

    y1(x) and y2(x) are two linearly independent solutions of (2), then the general solution is given by

    y = A y1(x) + B y2(x),

    where A and B are arbitrary constants.

    Example 1. The oded2y

    dx2+ y = 0

    has solutions y = sin x, 2sin x, cos x, ... etc.

    Since sin x and cos x are linearly independent functions, the general solution is

    y = A sin x + B cos x.

    All solutions of y + y = 0 may be written in this form.

  • 8/6/2019 Notes - Full

    20/44

    A.C.Croft: MAA255 Ordinary Differential Equations 20

    Example 2. The ode (1 x2) d2y

    dx2 2x dy

    dx+ 2y = 0

    has solutions y = x, and y =x

    2log

    1 + x

    1 x

    1.Since these are linearly independent, the general solution is

    y = A x + B

    x

    2log

    1 + x

    1

    x

    1

    .

    Consider the linear second order ordinary differential equation

    ad2y

    dx2+ b

    dy

    dx+ c y = f(x) (1)

    and the associated reduced equation in which f(x) is replaced by 0

    ad2y

    dx2+ b

    dy

    dx+ c y = 0. (2)

    Theorem 1: If y1(x) is a solution of (2), and y3(x) is a solution of (1), then y1(x) + y3(x) is alsoa solution of (1).

    Proof: For y = y1 + y3 considera (y1 + y

    3 ) + b (y

    1 + y

    3) + c (y1 + y3)

    = (a y1 + b y1 + c y1) + (a y

    3 + b y

    3 + c y3)

    = 0 + f(x)

    thus satisfying (1).

    Theorem 2: If y3(x) is a solution of (1), and Ay1(x) + By2(x) is the general solution of the reducedequation (2) , then y = y3(x) + Ay1(x) + By2(x) is the general solution of the completeequation (1).

    Proof: By Theorem 1, y = y3(x) + Ay1(x) + By2(x) is a solution of (1). And, since it contains two

    arbitrary constants, it must also be the general solution of (1).

    The general solution of the reduced eqn (2) is known as the complementary function (CF).

    A solution of the complete equation (1) is known as a particular integral (PI).

    Thus, the general solution of the complete equation (1) is given by

    GS = PI + CF

    Example 3: For the oded2y

    dx2+ y = x

    CF: y = A sin x + B cos xPI: y = x

    GS: y = x + A sin x + B cos x

    To solve non-homogeneous odes of the form (1), we need to find both the CF and the PI.

    Similarly, the general solution of an nth order linear odeni=0

    ai(x)diy

    dxi= f(x)

    is the sum of a particular solution (PI) and the general solution (CF) of the reduced equation

    ni=0

    ai(x)

    diy

    dxi = 0

    which must contain n arbitrary constants.

  • 8/6/2019 Notes - Full

    21/44

    A.C.Croft: MAA255 Ordinary Differential Equations 21

    4 Linear, second order ODEs with constant coefficients

    4.1 Complementary functions

    We need to find the general solution of the homogeneous (or reduced) equation

    ad2y

    dx2

    + bdy

    dx

    + c y = 0.

    (2)for the case in which a, b and c are constants.

    Consider a possible trial solution of the form

    y = emx. (3)

    Then, y = m emx, y = m2emx, and substituting into (2) gives

    (a m2 + b m + c) emx = 0.

    But emx

    = 0. Thus (3) is a solution of (2) only ifm is a root of the quadratic

    a m2 + b m + c = 0.

    (4)This is known as the auxiliary equation. It gives two possible solutions for m :

    m1 =b + b2 4ac

    2a, m2 =

    b b2 4ac2a

    .

    This gives two possible solutions of the reduced equation (2) :

    y1(x) = em1x, y2(x) = e

    m2x.

    Provided m1 and m2 are distinct, the general solution of the homogeneous equation (2) can be expressedas

    y = A em1x + B em2x

    (5)where A and B are arbitrary constants.

    Three cases need to be distinguished ;

    (1) b2 > 4ac : m1, m2 are distinct and real.

    (2) b2 < 4ac : m1, m2 are complex conjugates.

    (3) b2 = 4ac : There is only one (repeated) root for m.

    Case (1) b2 > 4ac : The auxiliary equation has distinct real roots m1, m2.

    The general solution is

    y = A em1x + B em2x.

    (5)

    Example 1:d2y

    dx2 3 dy

    dx+ 2 y = 0

    The auxiliary equation is m2 3 m + 2 = 0

  • 8/6/2019 Notes - Full

    22/44

    A.C.Croft: MAA255 Ordinary Differential Equations 22

    i.e. (m 1)(m 2) = 0This has roots m1 = 1, m2 = 2

    The general solution is y = A ex + B e2x

    Example 2: x 3x + x = 0

    The auxiliary equation is m2 3 m + 1 = 0This has roots

    m =3 9 4

    2=

    1

    2(3

    5)

    The general solution is x = A e1

    2(3+

    5)t + B e

    1

    2(3

    5)t

    Case (2) b2 < 4ac : The auxiliary equation has complex conjugate roots.

    Put

    b

    2a = ,

    4ac

    b2

    2a =

    so that m =b b2 4ac

    2acan be written as

    m = i.

    Then y = e(+i)x and y = e(i)x are solutions of (2).

    The general solution can be written as

    y = A1e

    (+i)x

    + A2e

    (

    i)x

    .

    For the solution to be real, it is necessary that A2 = A1. thus

    y =

    A1eix + A1e

    ix

    ex

    =

    A1(cos x + i sin x) + A1(cos x i sin x)

    ex

    =

    (A1 + A1)cos x + i(A1 A1)sin x

    ex

    Putting A1 =12 (A iB), the general solution can be written in the form

    y = (A cos x + B sin x)ex.

    Also consider putting A = Csin , B = Ccos , where C and are constants, so that

    y = C(sin cos x + cos sin x)ex

    or

    y = C ex sin(x + ).

    This replaces the two constants A and B (or the real and imaginary parts ofA1) by an arbitrary amplitude

    C and phase .

  • 8/6/2019 Notes - Full

    23/44

    A.C.Croft: MAA255 Ordinary Differential Equations 23

    Example 3:d2y

    dx2 2 dy

    dx+ 2 y = 0

    The auxiliary equation is m2 2 m + 2 = 0This has roots m = 2

    48

    2 = 1 ii.e. = 1, = 1

    The general solution is y = (A cos x + B sin x)ex

    Example 4: The equation for simple harmonic motion x + n2x = 0

    This arises from an equation of motion such as

    mass acceleration (mx) = a restoring force proportional to displacement (mn2x)The auxiliary equation is m2 + n2 = 0

    This has roots m = i ni.e. = 0, = n

    The general solution is x = A cos nt + B sin nt

    or x = Csin(nt + ).

    Case (3) b2 = 4ac : The auxiliary equation has a repeated root.

    m = b2a (repeated)

    We know that y = emx is a solution of (2). To form a general solution, we need a second independentsolution.

    Putting c = b2/4a, we rewrite the equation a y + b y + c y = 0 as

    d2ydx2

    + ba

    dydx

    + b24a2

    y = 0 or y 2m y + m2 y = 0.

    Now look for a second solution of the form y = f(x) emx.Substituting this with y = mf emx + femx, and y = m2f emx + 2mfemx + femx gives

    m2f + 2mf + f 2m(mf + f) + m2f

    emx = 0

    which is only satisfied if f = 0. i.e. if f(x) = A + B x.Thus, a general solution of (2) is given by

    y = (A + B x) emx.

    Notice that this includes the initial solution emx and a second linearly independent solution x emx.

    Example 5:d2y

    dx2 4 dy

    dx+ 4 y = 0

    The auxiliary equation is m2 4 m + 4 = 0i.e. (m 2)2 = 0This has a repeated root m = 2.

    The general solution is y = (A x + B) e2x

  • 8/6/2019 Notes - Full

    24/44

    A.C.Croft: MAA255 Ordinary Differential Equations 24

    SummaryFor the homogeneous linear ode with constant coefficients

    ad2y

    dx2+ b

    dy

    dx+ c y = 0 (2)

    the auxiliary equation is

    a m2 + b m + c = 0

    (1) If this has distinct real roots m1, m2,the general solution of (2) is

    y = A em1x + B em2x

    (2) If it has complex conjugate roots m = i,the general solution can be written as either

    y = (A cos x + B sin x)ex

    or

    y = C ex sin(x + )

    (3) If it has a repeated root m,the general solution is

    y = (A + B x) emx

    4.2 Particular integrals

    Now return to the nonhomogeneous equation

    ad2y

    dx2+ b

    dy

    dx+ c y = f(x),

    (1)where a, b and c are constants.

    We have shown that, if y = y3(x) is a particular solution (PI) of this equation (1),and if y = Ay1(x) + By2(x) is the general solution (CF) of the reduced equation (2) ,then y = y3(x) + Ay1(x) + By2(x) is the general solution of the complete equation (1).

    The remaining problem is to find a particular integral y3(x) for any given function f(x).

    The basic method is to use a trial solution which is an initial guess involving a number of parameters

    whose values can be determined by substituting into the complete equation.

    For common functions, use the following suggestions.

    If f(x) = p (const), then y3 = p/c

    If f(x) = p x + q, try y = P x + Q

    If f(x) = p x2 + q x + r, try y = P x2 + Q x + R

    Iff(x) = p e

    nx

    ,try

    y = P e

    nx

    If f(x) = p sin nx, try y = P sin nx + Q cos nx

    If f(x) = p cos nx, try y = P sin nx + Q cos nx

  • 8/6/2019 Notes - Full

    25/44

    A.C.Croft: MAA255 Ordinary Differential Equations 25

    where p, q, r and n are given constants, and P, Q and R are constants that can be determined bysubstituting into (1).

    If a particular f(x) (or the obvious trial solution) is included in the complementary function, multiply theappropriate trial solution by x.

    Example 6:d2y

    dx2 3 dy

    dx+ 2 y = 2 x2

    The CF (example 1) is y = A ex + B e2x

    When looking for a PI, notice that putting y = x2 immediately cancels the right-hand side. However, thederivative terms introduce a multiple of x and a constant. Such terms have to be removed by includingextra terms in the trial solution.

    Thus, for a PI, try

    y = P x2 + Q x + R

    y = 2 P x + Qy = 2 P

    Then

    y 3y + 2y = 2 P 3(2P x + Q) + 2(P x2 + Qx + R)= 2P x2 + (2Q 6P)x + (2R 3Q + 2P)

    This is equal to 2x2 if P = 1, Q = 3, R = 72 .

    Thus, the general solution is y = x2 + 3 x + 72 + A ex + B e2x.

    Example 7:d2y

    dx2 2 dy

    dx+ 2 y = 3 sinh2x

    The CF (example 3) is y = (A cos x + B sin x)ex

    For a PI, try

    y = P sinh2x + Q cosh 2x

    y = 2P cosh 2x + 2Q sinh2xy = 4P sinh2x + 4Q cosh 2x

    Then

    y 2y + 2y = 4P sinh2x + 4Q cosh 2x 2(2P cosh 2x + 2Q sinh2x) + 2(P sinh2x + Q cosh 2x)= (6P

    4Q)sinh2x + (

    4P + 6Q)cosh2x

    This is equal to 3sinh2x if 6P 4Q = 3 and 4P + 6Q = 0.i.e. if P = 910 , and Q =

    35 .

    Thus, the general solution is y = (A cos x + B sin x)ex + 910 sinh 2x +35 cosh 2x.

    Example 8:d2y

    dx2 2 dy

    dx+ 2 y = ex 1

    The CF (examples 3 & 7) is y = (A cos x + B sin x)ex

    For a PI, try

    y = P ex

    + Q

    y = P ex

    y = P ex

  • 8/6/2019 Notes - Full

    26/44

    A.C.Croft: MAA255 Ordinary Differential Equations 26

    Then

    y 2y + 2y = P ex 2 P ex + 2(P ex + Q)= P ex + 2Q

    This is equal to ex 1 if P = 1, and Q = 12 .Thus, the general solution is y = (A cos x + B sin x)ex + ex

    1

    2

    .

    Example 9:d2y

    dx2 3 dy

    dx+ 2 y = 2 ex

    The CF (examples 1 & 6) is y = A ex + B e2x

    Notice that the rhs of the equation is contained within the CF of the reduced equation.

    Thus, any multiple of ex cannot be a particular integral.For a PI in this case try

    y = P x ex

    y = P ex + P x ex

    y = 2P ex + P x ex

    Then

    y 3y + 2y = 2P ex + P x ex 3(P ex + P x ex) + 2(P x ex)= P ex

    This is equal to 2 ex if P = 2.Thus, the general solution is y = A ex + B e2x 2 x ex.

    Example 10: x + 2x + x = t + 3et

    For the reduced equation x + 2x + x = 0, the auxiliary equation is m2 + 2m + 1 = 0,i.e. (m + 1)2 = 0.This has a repeated root m = 1, so the CF is

    x = (A + B t) et.

    From the form of the rhs, we would expect a PI to have the form x = P t + Q + R et.However, the term R et is already included in the CF.We would next consider replacing this by R t et, but this is also contained in the CF.Thus, we must now consider a PI of the form

    x = P t + Q + R t2 et

    x = P R t2 et + 2R t etx = R t2 et 4R t et + 2R et

    Thus

    x + 2x + x = R t2 et 4R t et + 2R et + 2(P R t2 et + 2R t et) + P t + Q + R t2 et= P t + (2P + Q) + 2R et

    This is equal to t + 3et

    if P = 1, Q = 2 and R =3

    2 .Thus, the general solution is

    x =

    A + B t + 32 t2

    et + t 2.

  • 8/6/2019 Notes - Full

    27/44

    A.C.Croft: MAA255 Ordinary Differential Equations 27

    Example 11: Forced damped harmonic motion

    mass = restoring + damping + forcingacceleration force term term

    m x = mn2 x 2mk x + mCsinpt

    Divide by m giving

    d2x

    dt2+ 2k

    dx

    dt+ n2 x = C sinpt.

    To find the Complementary Function, consider the reduced equation

    x + 2k x + n2 x = 0.

    The auxiliary equation is m2 + 2k m + n2 = 0.

    i.e. m = 2k

    4k2

    4n2

    2 = k

    k2 n2

    (1) For light damping k < n

    put =

    n2 k2, so that m = k i.The CF is x = (A cos t + B sin t)ekt.

    These are exponentially damped oscillations.

    (2) For heavy damping k > n

    put m1 = k +

    k2 n2, m2 = k

    k2 n2.

    Then the CF is x = A e(kk2

    n2)t

    + B e(k+

    k2

    n2)t

    .

  • 8/6/2019 Notes - Full

    28/44

    A.C.Croft: MAA255 Ordinary Differential Equations 28

    (3) For critical damping k = n

    Then m = k.The CF is x = (A t + B)ekt.

    Notice that, for all three cases, x 0 as t .

    We are considering the equation x + 2k x + n2 x = C sinpt.

    For a Particular Integral, try a solution of the form

    x = P sinpt + Q cospt

    thenx = pP cospt pQ sinptx = p2P sinpt p2Q cospt

    Substituting gives

    p2P sinpt p2Q cospt + 2kpP cospt 2kpQ sinpt+n2P sinpt + n2Q cospt = C sinpt.

    Equating coefficients of sinpt and cospt gives

    p2 P 2kp Q + n2 P = C (1)p2 Q + 2kp P + n2 Q = 0 (2)

    (2) 2kp P + (n2 p2) Q = 0 Q = 2kpn2p2 P.

    Then (1) (n2 p2) P + 4k2p2n2p2 P = C , giving

    P =(n2 p2) C

    (n2 p2)2 + 4k2p2 , Q = 2kp C

    (n2 p2)2 + 4k2p2 .

    Thus, the Particular Integral is

    x =C

    (n2 p2)2 + 4k2p2

    (n2 p2)sinpt 2kp cospt

    .

    Since the Complementary Function approaches zero as t , this is the steady state solution forforced damped harmonic motion.

    4.3 The equidimensional equation

    Consider equations of the form

    a x2d2y

    dx2+ b x

    dy

    dx+ c y = h(x),

    (1)

  • 8/6/2019 Notes - Full

    29/44

    A.C.Croft: MAA255 Ordinary Differential Equations 29

    where a, b and c are constants and h is an arbitrary function of x.Consider also the associated reduced equation

    a x2d2y

    dx2+ b x

    dy

    dx+ c y = 0.

    (2)This is known as the equidimensional equation (or Eulers equation) because it does not depend on the

    dimension of x. (It is invariant under the scaling x kx for any constant k.)(Equation (1) is sometimes known as the CauchyEuler equation.)

    To find the general solution of these equations, we need to find two linearly independent solutions of (2).

    First note that the equation has a singular point at x = 0. Solutions are not defined at this point.

    Then consider a trial solution of the form

    y = xn,

    (3)

    so that

    dy

    dx = n xn

    1

    , and

    d2y

    dx2 = n(n 1) xn

    2

    .Substituting these into (2) gives

    an(n 1) + bn + c

    xn = 0.

    Since xn = 0, it can be seen that (3) is a solution of (2) if

    an2 + (b a)n + c = 0.

    This is a quadratic which gives two possible values of n.A general solution of (2) (or a CF for (1)) is thus given by

    y = A |x|n1 + B |x|n2 .

    Note 1: These solutions are given in terms of |x| because the solution is not defined at x = 0 and theequation is invariant under the transformation x x.

    Note 2: It has been assumed above that n1 and n2 are real and distinct. This only occurs if (ba)2 >4ac.

    Example 1: Solve the equation 2 x2d2y

    dx2 3 x dy

    dx+ 2 y = 0.

    Substituting the trial solution y = xn, y = nxn1, y = n(n 1)xn2 gives2n(n 1) 3n + 2

    xn = 0,

    which is only satisfied if

    2n2 5n + 2 = 0.i.e.

    (2n 1)(n 2) = 0,so that n = 12 or n = 2.Thus the general solution is

    y = A x

    1/2

    + B x

    2

    ,where A and B are arbitrary constants.

  • 8/6/2019 Notes - Full

    30/44

    A.C.Croft: MAA255 Ordinary Differential Equations 30

    Example 2: Solve the equation 2 x2 y 3 x y + 2 y = 3 x3.The CF is given above.

    For a PI, consider a solution of the form y = P x3 so that y = 3P x2, y = 6P x.Substituting these gives

    (12 9 + 2)P x3 = 3 x3,which is satisfied if P = 35 .

    Thus the general solution is y = A x1/2 + B x2 + 35 x3,

    where A and B are arbitrary constants.

    An alternative method

    As an alternative approach to equations of the form

    a x2d2y

    dx2+ b x

    dy

    dx+ c y = h(x), (1)

    where a, b, c are constants, consider the change of variable

    x = et or t = log x.

    Thendy

    dx=

    dt

    dx

    dy

    dt=

    1

    x

    dy

    dt

    andd2y

    dx2=

    d

    dx

    dy

    dx

    =

    d

    dx

    1

    x

    dy

    dt

    =

    1

    x

    dt

    dx

    d

    dt

    dy

    dt

    1

    x2dy

    dt=

    1

    x2d2y

    dt2 1

    x2dy

    dt.

    Substituting these, (1) becomes

    ad2y

    dt2 dy

    dt

    + bdy

    dt + c y = h(et),

    or

    a y + (b a) y + c y = h(et),which is a linear equation with constant coefficients.

    Note: The transformation x = et deals only with the range x > 0, while the singular point at x = 0corresponds to t = .

    5 Qualitative theory of differential equationsConsider the equation

    x + n2 x = 0.

    This has the solution x = A cos nt + B sin nt.This describes oscillatory motion with frequency n.This general description is often more useful than the exact expression of the solution.

    Consider the more general linear ode

    a x + b x + c x = 0

    where a, b and c are constants. The roots of the auxiliary equation are given by

    m =b b2 4ac

    2a.

  • 8/6/2019 Notes - Full

    31/44

    A.C.Croft: MAA255 Ordinary Differential Equations 31

    If b2 > 4ac, the solution has two exponential components.The signs of these roots determines whether solutions exponentially increase or exponentially decrease.

    Thus, the signs of these roots is all we need to know to determine the general character of the solutions.

    If b2 < 4ac, the roots of the auxiliary equation are complex.

    Put m = i where = b/2a =

    4ac b2/2aso that the solution is given by y = (A cos t + B sin t)et.Thus the solutions oscillate with frequency equal to the imaginary part of m.The oscillations exponentially grow if the real part of m is positive,and exponentially decay if the real part of m is negative.

    i.e.

    The qualitative character of all possible solutions is determined by the real and imaginary parts of m.

    For a physical system, there is often some uncertainty in the values of the parameters in the equations.

    An understanding of the qualitative behaviour of solutions is often more useful than explicit solutions.

    5.1 Phase plane diagrams

    Consider second order odes which can be written in the form

    x = Q(x, x).

    Putting y = x, these can always be written as the coupled pair of equations

    x = y, y = Q(x, y).

    In fact, we can also consider the more general family of equations that can be written as

    x = P(x, y), y = Q(x, y).

    Any particular solution of these equations will have particular values of x and y at any time t. As tincreases, the values of x and y change. This can be represented as a curve drawn on an x-y-plane.

    E

    T

    x

    y

    E

    The x-y-plane is known as the phase plane.Each particular solution has its own trajectory in the phase plane.

    Each trajectory is marked with an arrow indicating the direction of increasing t.

    Note 1: Only one trajectory passes through any point of the phase plane.

    Proof: Any point is represented by the values x = x0, y = y0.This will give particular values of P(x0, y0) and Q(x0, y0).And these give unique values of x and y.Thus the trajectory through (x0, y0) must be unique.

    Note 2: The only exceptions are critical points or nodes at which P = 0 and Q = 0.

    A solution at a critical point stays there indefinitely (as x = 0 and y = 0).

  • 8/6/2019 Notes - Full

    32/44

    A.C.Croft: MAA255 Ordinary Differential Equations 32

    5.2 Phase plane diagrams for linear equations with constant coeffts

    Consider linear 2nd-order homogeneous odes

    a x + b x + c x = 0 (2)

    where a, b and c are constants. The roots of the auxiliary equation are given by

    m1 =b + b2 4ac

    2a

    , m2 =b b2 4ac

    2aand equation (2) can be written as two coupled first order equations

    x = y

    y = ca x ba y

    This system has the single critical point x = 0, y = 0 which corresponds to the trivial solution of (2).

    5.2.1 Nodes

    Consider the case in which m1 and m2 are both real and negative. m2 < m1 < 0i.e. when b2 > 4ac and a, b and c have the same sign.

    The general solution is then given byx = A em1t + B em2t

    y = m1A em1t + m2B e

    m2t

    When B = 0 or A = 0, it is clear that

    y = m1 x or y = m2 x

    These indicate straight line trajectories.

    They are four trajectories in the 2nd and 4th quadrants (since m1, m2 < 0).Also since m1, m2 < 0, x 0 and y 0 as t .

    -

    6

    x

    y

    ffffffffff

    q

    ffffx

    i

    ff

    ffw y = m1 x

    y = m2 x

    c

    k

    T

    !

    Since m2 < m1 < 0, em2t approaches zero faster than em1t as t .

    Thus

    x A em1t, y m1A em1t as t .Thus (except when A = 0) all trajectories asymptotically approach the trajectory y = m1 x near theorigin of the phase plane.

    Definition: In this case, the critical point at the origin is called a node.

    All nodes have this type of structure.

    Note: Ifm1 and m2 were positive, the trajectories would have the same structure, but would be pointedaway from the origin. Moreover, since the em2t term would dominate at large times, all trajectories(except that for which B = 0) would become parallel to the line y = m2 x.

  • 8/6/2019 Notes - Full

    33/44

    A.C.Croft: MAA255 Ordinary Differential Equations 33

    5.2.2 Saddle points

    Consider the case in which m1 and m2 have different signs.i.e. when a and c have different signs and b2 > 4ac.

    Consider the specific case in which a > 0, b > 0 and c < 0.Thus m1 > 0 and m2 < 0.

    The general solution is given by x = A em1t + B em2t,y = m1A e

    m1t + m2B em2t.

    When B = 0 or A = 0,y = m1 x or y = m2 x

    These are four straight line trajectories to or from the critical point at the origin.

    Since m1 > 0, the trajectories on y = m1 x are away from the origin.Since m2 < 0, the trajectories on y = m2 x are toward the origin.This gives the following trajectories in the phase plane

    -

    6

    x

    y

    I

    A

    fffffffff

    fffx

    fffw

    y = m1 x

    y = m2 x

    Since m1 > 0 and m2 < 0, the term em1t will dominate for large positive times, and the term em2t

    will dominate for large negative times. Thus, all trajectories with A, B = 0 will start at large negativetimes parallel to y = m2 x, and at large positive times become parallel to y = m1 x.

    -

    6

    x

    y

    I

    A

    fff

    ffffff

    fffx

    fffw

    y = m1 x

    y = m2 x

    zz

    yy

    !

    Definition: In this case, the critical point at the origin is called a saddle point.

    5.2.3 Degenerate nodes

    Consider the case in which m1 and m2 are the same.

    i.e. when b2 = 4ac.

    The linear equation has the form x +b

    ax +

    b2

    4a2x = 0.

  • 8/6/2019 Notes - Full

    34/44

    A.C.Croft: MAA255 Ordinary Differential Equations 34

    In this case m1 = m2 = b/2a.The general solution is given by

    x = (A + B t)emt,y = (mA + B + mB t)emt.

    Initially assume that b and a have the same sign, so that m < 0.

    In this case all trajectories approach the critical point at the origin as t .When B = 0 y = m x.These are two straight line trajectories toward the origin.

    When B = 0 y = mx + B emt. i.e. all trajectories approach y = m x as t .But, as t , x B t emt, and y m B t emt.

    -

    6

    x

    y

    q

    i

    y = m x

    s

    u#

    For B > 0 (i.e. for trajectories above the line y = m x), x > 0 and y < 0 as t .Thus, these trajectories approach y = m x < 0 as t .For B < 0 (i.e. for trajectories below the line y = m x), x < 0 and y > 0 as t .Thus, these trajectories approach y = m x > 0 as t .

    Definition: A critical point of this type is called a degenerate node.

    Note: If a and b have different signs, then m > 0.In this case, the line y = m x will be in different quadrants, and all trajectories diverge from the origin.However, the structure of the phase portrait is the same, as can be seen by considering behaviour as

    t .

    5.2.4 Vortex points

    Consider linear odes of the form

    x + n2 x = 0 or

    x = y

    y = n2 x

    In this case, the roots of the auxiliary equation m1 and m2 are purely imaginary, and the general solution

    is given byx = A cos nt + B sin nt, y = nA sin nt + nB cos nt.

  • 8/6/2019 Notes - Full

    35/44

    A.C.Croft: MAA255 Ordinary Differential Equations 35

    All solutions are periodic, and it can be seen that

    x2 +y2

    n2= A2 + B2.

    Thus the trajectories in the phase plane are ellipses.

    -

    6

    ss

    s

    x

    y

    All trajectories are clockwise about the origin.

    The origin is again a critical point (obtained when A = B = 0), but solutions neither approach or divergefrom the origin (they orbit about it).

    Definition: A critical point of this type is called a vortex point.

    5.2.5 Spiral points

    Consider linear odes of the form

    a x + b x + c x = 0 or

    x = y

    y = ca x ba y

    in the case when b2 < 4ac.

    In this case the roots m1 and m2 of the auxiliary equation are a complex conjugate pair.Putting

    m = i where = b2a , =

    4acb22a

    The general solution can be written as

    x = (A cos t + B sin t) et

    y =

    (A + B )cos t + (B A)sin t

    et

    Clearly both x and y oscillate about zero with frequency and amplitudes which exponentially increase(or decrease) as et.If < 0 (i.e. if a and b have the same sign), then x and y both approach 0 as t .All trajectories in the phase plane are therefore spirals which approach the origin as t .

  • 8/6/2019 Notes - Full

    36/44

    A.C.Croft: MAA255 Ordinary Differential Equations 36

    -

    6

    sss

    x

    y

    Definition: A critical point of this type is called a spiral point.

    Note: If > 0 (i.e. ifa and b have different signs), then all trajectories spiral away from the origin ast .

    5.3 Phase plane diagrams for nonlinear equations

    The solutions of all linear second order odes can be described globally by one of the above five types of

    phase diagrams. Some nonlinear equations are approximately linear in some region of the phase plane,

    and sometimes critical points can be characterised as above.

    Example. The simple pendulumThe equation of motion is given by

    = n2 sin where n2 = g/.

    gggggggggggt

    For small oscillations || 1, sin and the equation of motion is approximately

    + n2 = 0

    which has a vortex point at the origin. -

    6

    ss

    s

    However, the full nonlinear equation can be written as

    =

    = n2 sin And this has the phase plane diagram

    -

    6

    jjz

    jjz

    ss

    s

    y

    ss

    s

    y

  • 8/6/2019 Notes - Full

    37/44

    A.C.Croft: MAA255 Ordinary Differential Equations 37

    Notice that this has vortex points at = 0, 2, 4 , . . . (these are the stable equilibrium points),

    and saddle points at = ,, 3 , . . . (These correspond to unstable equilibrium points the pendulumis at rest vertically above the fixed point).

    6 Methods of reduction of order and variation of parameters

    6.1 Obvious reductions of order

    We have already seen (Example 3 of Section 2) that the equation of motion for a body falling vertically

    under the action of a gravitational force mg and a resistance to the motion mk( dxdt )2, which is proportional

    to the square of the speed, is given by m d2x

    dt2= mg mk( dxdt )2, so that

    d2x

    dt2= g k

    dx

    dt

    2.

    Putting v =dx

    dt, this becomes

    dvdt

    = k

    gk

    v2 .This has reduced the original second order equation to a first order equation that can be solved by

    separating the variables to obtain dv

    ( gk v2)= k

    dt,

    and hence k

    gtanh1

    k

    gv

    = k t + const.

    Thusd

    xdt =

    gk tanh

    gk t +

    where is a constant, and so

    x =1

    klog cosh

    gk t +

    + x0,

    where x0 is a constant.

    As another example, consider linear equations of the form

    a(x) y + b(x) y = 0.

    (i.e. when the usual additional term c(x) y vanishes.)Such equations can be written as

    y

    y= b(x)

    a(x),

    which, for any given functions a(x) and b(x), can be integrated to give

    log y =

    b(x)

    a(x)dx.

  • 8/6/2019 Notes - Full

    38/44

    A.C.Croft: MAA255 Ordinary Differential Equations 38

    Example 1: Consider the equation (1 + x2) y 2x y = 0.This can be written as

    y

    y=

    2x

    1 + x2,

    which can be integrated to give

    log y = log(1 + x2) + log B or y = B(1 + x2).

    This is a first integral of the original equation.The complete integral can obviously be obtained in this case as

    y = A + B(x + 13 x3).

    Example 2: Freely-hanging uniform chain

    Consider a uniform chain hanging freely from two fixed points.

    -

    6

    'x

    y

    s

    T

    T0

    Consider a section of chain of length s, and the tensions T0 and T at each end of this section.Equating forces horizontally and vertically gives the equations

    T cos = T0T sin = ws

    where w is the weight per unit length of the chain.If the chain is given by the curve y = y(x) then, at any point

    dy

    dx= tan =

    ws

    T0.

    Putting T0 = wk, where k is a constant, and differentiating gives

    d2y

    dx2=

    1

    k

    ds

    dx.

    But the small element ds is given by ds =

    dx2 + dy2 so thatds

    dx=

    1 +

    dy

    dx

    2.

    Thus, the equation for the curve is given by

    kd2y

    dx2=

    1 +

    dy

    dx

    2.

    This is a second order (non-linear) ode.

    But, since it does not contain y explicitly, it can be solved by putting u = y to give

    kdu

    dx=

    1 + u2, and hence k

    du

    1 + u2=

    dx

    Thus

    k sinh1 u = x c or dydx

    = sinh(x c)

    k.

    Thus, the curve of the chain is given by

    y = k cosh(x c)

    k+ c0.

  • 8/6/2019 Notes - Full

    39/44

    A.C.Croft: MAA255 Ordinary Differential Equations 39

    6.2 Reduction of order using a known solution

    To find the general solution of a linear ode a y + b y + c y = 0, we need two linearly independentsolutions.

    If one solution y1(x) is known, the general solution must contain terms of the form A y1.One more (independent) solution is required with one more arbitrary constant.

    Thus, only one more integration is required.

    To exploit this potential simplification, we consider solutions of the form

    y = f(x) y1(x).

    i.e. we replace the initial arbitrary constant by a function. Then

    y = f y 1 + f y1, and y = f y 1 + 2f

    y1 + f y1.

    Substituting these gives

    a(f y1 + 2f y1 + f

    y1) + b(f y 1 + f y1) + c f y1 = 0

    i.e.

    a(2f y1 + f y1) + b(f y1) + f(a y1 + b y1 + c y1) = 0

    i.e.

    a y1 f + (2a y1 + b y1)f

    = 0

    or

    f +

    2 y1y1

    +b

    a

    f = 0

    which is a linear equation that already has one known solution: f = A.The other solution can be found by writing it in the form

    f

    f+

    2 y1

    y1+

    b

    a= 0.

    Each of these terms can be integrated to give (if a and b are constants)

    log f + 2 log y1 + ba x = log B,

    where B is an arbitrary constant. Thus

    f =B

    y12e(b/a)x.

    Since y1(x) is a known function, it may be possible to integrate this equation to obtain f(x).

    Example 1: Consider the equationd2y

    dx2 3 dy

    dx+ 2 y = 0

    The auxiliary equation is m2 3 m + 2 = 0 or (m 1)(m 2) = 0,so that the general solution is y = A ex + B e2x.

    Suppose we only knew the solution y1 = ex.

    We could then consider further solutions of the form y = f(x) ex, so that

    y = f ex + f ex, y = f ex + 2f ex + f ex.

    Substituting gives

    f e

    x

    + 2f ex

    + f ex

    3(f ex

    + f ex

    ) + 2 f e

    x

    = 0i.e.

    f f = 0 or f

    f= 1.

  • 8/6/2019 Notes - Full

    40/44

    A.C.Croft: MAA255 Ordinary Differential Equations 40

    Thus

    log f = x + log B or f = B ex

    which can be integrated to give f = A + B ex, so that the complete solution is given by

    y = (A + B ex) ex = A ex + B e2x,

    which is the known solution.

    Example 2: Consider the equation y 4 y + 4 y = 0.The auxiliary equation is m2 4 m + 4 = 0 or (m 2)2 = 0.Having a single (repeated) root, this just gives the initial solution y1 = e

    2x.

    We could then consider further solutions of the form

    y = f(x) e2x.

    Then

    y = (f + 2f)e2x, y = (f + 4f + 4f)e2x.

    Substituting these gives

    (f + 4f + 4f)e2x 4(f + 2f)e2x + 4 f e2x = 0,

    which implies that

    f = 0 or f = A + B x.

    The complete solution is thus given by

    y = (A + B x) e2x,

    as previously shown.

    Example 3. Consider the equation (1 x2) d2y

    dx2 2x dy

    dx+ 2y = 0

    This has the obvious solution y = x.Now look for a second solution of the form

    y = f(x) x.

    Then

    y = f x + f, y = f x + 2f.

    Substituting these gives

    (1 x2)(f x + 2f) 2x (f x + f) + 2 f x = 0

    i.e.

    (1 x2)x f + 2(1 2x2)f = 0or

    f

    f= 2 4x

    2

    x(1 x2) .

    Expanding the rhs in partial fractions gives

    f

    f= 2

    x+

    1

    1 x 1

    1 + x.

  • 8/6/2019 Notes - Full

    41/44

    A.C.Croft: MAA255 Ordinary Differential Equations 41

    Integrating this gives

    log f = 2log x log(1 x) log(1 + x) + log B,or

    f =B

    x2(1 x)(1 + x) .Again expanding in partial fractions

    f = B 1

    x2 +

    12

    1 x +12

    1 + x

    .

    Hence

    f = B

    1

    x 1

    2log(1 x) + 1

    2log(1 + x)

    + A

    = A + B

    1

    2log

    1 + x

    1 x

    1x

    Thus, the general solution is given by

    y = f(x) x = A x + B

    x

    2log

    1 + x

    1 x

    1

    .

    6.3 Reduction of order in general

    Consider the linear second order ordinary differential equation

    ad2y

    dx2+ b

    dy

    dx+ c y = f(x) (1)

    Putting z =dy

    dx, this can be written as

    adz

    dx+ b z + c y = f(x)

    Thus the 2nd order equation (1) can be written as two coupled first order equations

    dy

    dx= z

    dz

    dx= c

    ay b

    az +

    f(x)

    a

    These are often easier to analyse than the 2nd order equation (1).

    In terms of different variables, it can be seen that the linear ode

    x +p(t) x + q(t) x = f(t)

    with y = x, can be expressed as the coupled pair of first order equationsx = y

    y = q(t) x p(t) y + f(x)which can also be expressed as

    d

    dt

    xy

    =

    0 1

    q p

    xy

    +

    0f

    Note 1: In fact, all nth-order linear odes can be written in the form

    x = Ax + u,

    where x and u are n-dimensional vectors (column matrices) and A is an n

    n matrix.

    Note 2: This process has effectively reduced an nth-order ode to n first order equations. This reductionis usually very helpful.

  • 8/6/2019 Notes - Full

    42/44

    A.C.Croft: MAA255 Ordinary Differential Equations 42

    6.4 Variation of parameters

    We consider this method as an explicit technique for constructing particular integrals.

    Consider the linear homogeneous ode

    d2y

    dx2+p(x)

    dy

    dx+ q(x) y = 0. (2)

    Its solution can be expressed in terms of two linearly independent solutions y1(x) and y2(x) in the formy = A y1(x) + B y2(x).

    First note that the 2nd order equation (2) can be written as two coupled first order equations

    dy

    dx= z

    dz

    dx= q y p z

    and that the solution of these equations is given by

    y = A y1(x) + B y2(x)

    z = A y1(x) + B y2(x)

    (3)

    Now consider the inhomogeneous equation

    d2y

    dx2+p(x)

    dy

    dx+ q(x) y = f(x) (1)

    which can be rewritten as

    dy

    dx= z

    dz

    dx= q y p z + f

    We now assume that a solution of these equations can be written in the form (3), but with the arbitrary

    constants A and B replaced by functions which we denote as u1(x) and u2(x).i.e. we assume that

    y = u1 y1 + u2 y2

    z = u1 y1 + u2 y

    2

    Substituting these gives

    u1 y1 + u2 y

    2 + u

    1 y1 + u

    2 y2 = u1 y

    1 + u2 y

    2

    u1 y1 + u2 y

    2 + u

    1 y

    1 + u

    2 y

    2 = q(u1 y1 + u2 y2) p(u1 y1 + u2 y2) + f

    and, since y1 and y2 satisfy (2), these reduce to

    u1 y1 + u2 y2 = 0

    u1 y1 + u

    2 y

    2 = f

    Since y1 and y2 are known, these are two linear equations for u1 and u

    2.

    Moreover, since y1 and y2 are linearly independent, unique solutions for u1 and u

    2 can always be obtained.

    Specifically, we obtain

    u1 = y2

    y1 y2 y2 y1

    f, u2 =y1

    y1 y2 y2 y1

    f

    Note 1: If these expressions can be integrated, this technique can be used to obtain particular integrals.

    Note 2: This method is also particularly useful for analysing approximate solutions when the inhomoge-neous term f(x) corresponds to a small perturbation.

  • 8/6/2019 Notes - Full

    43/44

    A.C.Croft: MAA255 Ordinary Differential Equations 43

    Example 1: Consider the equation y 3 y + 2 y = 2 x2(This is example 6 of section 4.2)

    The auxiliary equation of the reduced equation is m2 3 m + 2 = 0 or (m 1)(m 2) = 0,so that the CF y = A ex + B e2x.

    The reduced equation y 3 y + 2 y = 0 can be written as

    y = zz = 2 y + 3 z

    This has the solution y = A ex + B e2x

    z = A ex + 2B e2x

    The complete equation y 3 y + 2 y = 2 x2 can be written as

    y = z

    z = 2 y + 3 z + 2 x2

    and we look for a solution of this which has the formy = u1 e

    x + u2 e2x

    z = u1 ex + 2u2 e

    2x

    where u1(x) and u2(x) are now functions.

    Substituting the trial solution gives

    u1 ex + 2u2 e

    2x + u1 ex + u2 e

    2x = u1 ex + 2u2 e

    2x

    u1 ex + 4u2 e

    2x + u1 ex + 2 u2 e

    2x = 2(u1 ex + u2 e2x) + 3(u1 ex + 2u2 e2x) + 2 x2

    i.e.u1 + u

    2 e

    x = 0 (a)

    u1 + 2 u2 e

    x = 2 x2 ex (b)

    Then 2(a) (b) gives u1 ex = 2 x2and (b) (a) gives u2 e2x = 2 x2.i.e.

    u1 = 2 x2 ex, u2 = 2 x2 e2x.Integrating by parts gives

    u1 = 2 x2 ex 4

    x exdx, u2 = x2 e2x + 2

    x e2xdx

    u1 = 2 x2 ex + 4 x ex 4

    exdx, u2 = x2 e2x x e2x +

    e2xdx

    Thus

    u1 = (2 x2 + 4 x + 4)ex + A, u2 = (x2 + x + 12 )e2x + B

    The general solution is then given by y = u1 ex + u2 e

    2x, or

    y = 2 x2 + 4 x + 4 + A ex x2 x 12 + B e2x

    i.e. y = x2 + 3 x +72 + A ex + B e2x as obtained previously.

  • 8/6/2019 Notes - Full

    44/44

    A.C.Croft: MAA255 Ordinary Differential Equations 44

    Example 2: Consider the equation y + y = sec x

    The CF is y = A sin x + B cos x.However, it is not clear what the form of the PI will be. Variation of parameters is the only method

    for finding a PI.

    The reduced equation y + y = 0 can be written as

    y = zz = y

    and this has the solution y = A sin x + B cos x

    z = A cos x B sin x

    But the complete equation can now be written asy = z

    z = y + sec x

    and we consider a solution of the formy = u1 sin x + u2 cos x

    z = u1 cos x u2 sin x

    Substituting this into the equations gives

    u1 cos x u2 sin x + u1 sin x + u2 cos x = u1 cos x u2 sin xu1 sin x u2 cos x + u1 cos x u2 sin x = u1 sin x u2 cos x + sec x

    i.e.u

    1

    sin x + u2

    cos x = 0

    u1 cos x u2 sin x = sec xand hence

    u1 = 1, u2 = tan x.

    Thus

    u1 = x + A, u2 = log | cos x| + B,and the complete solution is

    y = x sin x + cos x log | cos x| + A sin x + B cos x.

    Note 2: This example illustrates the power of this method for finding PIs when trial solutions are not

    obvious.