higher order difference and differential equations

30
Chapter 2 Higher Order Difference and Differential Equations 2.1 Higher Order Differential Equations 2.1.0 Introduction In Chapter 1, we saw how to solve few first-order differential equations by recognizing them as separable, homogeneous and exact. We now turn to the solution of differential equations of order two or higher. We will now examine various techniques for solving linear homogeneous and non-homogeneous differential equations. First we will concentrate on second-order equations for two main reasons. First, their theory is typical of that of linear differential equations on any order n and second they have important applications in many fields of science and engineering. Numerical methods for higher- order differential equations will also be presented. Definition: For a linear differential equation, an nth-order initial – value problem (IVP) , is defined as: Solve: ) ( ) ( .... ) ( ) ( 0 1 1 1 x g y x a dx y d x a dx y d x a n n n n n n = + + + Subject: to : 1 0 1 1 0 0 0 ) ( ,..., ) ( ' , ) ( = = = n n y x y y x y y x y Observe that n initial conditions for y(x) and its derivatives are specified. Theorem 1: Let a n (x), a n-1 (x),…,a 0 (x) and g(x) be continuous on an interval I and let a n (x)0 for all x in this interval. If x = x 0 is any point in this interval then the solution y(x) of the initial-value problem exists on the interval and is unique. The requirements in the above theorem that a i (x) ,i=0,1,2,…,n be continuous and a n (x)0 for every x in I are both important. For example you can easily verify that y = cx 2 + x + 3 is a solution of the initial value problem: x 2 y’’ – 2 x y + 2 y = 6, y(0) = 3, y’ (0) = 1 on the interval ) , ( −∞ for any choice of the parameter c. So the solution is not unique. The continuity conditions of the Theorem 1, are satisfied, but a 2 (x) = x 2 is zero at x =0. Thus Theorem 1 does not apply.

Upload: nurul-ainn

Post on 09-Nov-2015

63 views

Category:

Documents


10 download

DESCRIPTION

PDE, ODE

TRANSCRIPT

  • Chapter 2 Higher Order Difference and Differential Equations 2.1 Higher Order Differential Equations 2.1.0 Introduction In Chapter 1, we saw how to solve few first-order differential equations by recognizing them as separable, homogeneous and exact. We now turn to the solution of differential equations of order two or higher. We will now examine various techniques for solving linear homogeneous and non-homogeneous differential equations. First we will concentrate on second-order equations for two main reasons. First, their theory is typical of that of linear differential equations on any order n and second they have important applications in many fields of science and engineering. Numerical methods for higher-order differential equations will also be presented. Definition: For a linear differential equation, an nth-order initial value problem (IVP), is defined as:

    Solve: )()(....)()( 011

    1 xgyxadxydxa

    dxydxa n

    n

    nn

    n

    n =+++

    Subject: to : 10

    11000 )(,...,)(',)(

    === nn yxyyxyyxy Observe that n initial conditions for y(x) and its derivatives are specified. Theorem 1: Let an(x), an-1(x),,a0(x) and g(x) be continuous on an interval I and let an(x) 0 for all x in this interval. If x = x0 is any point in this interval then the solution y(x) of the initial-value problem exists on the interval and is unique. The requirements in the above theorem that ai(x) ,i=0,1,2,,n be continuous and an(x)0 for every x in I are both important. For example you can easily verify that y = cx2 + x + 3 is a solution of the initial value problem: x2 y 2 x y + 2 y = 6, y(0) = 3, y (0) = 1 on the interval ),( for any choice of the parameter c. So the solution is not unique. The continuity conditions of the Theorem 1, are satisfied, but a2(x) = x2 is zero at x =0. Thus Theorem 1 does not apply.

  • Definition: For a linear differential equation, a 2nd-order boundary value problem (BVP), is defined as:

    Solve: )()()()( 0122

    2 xgyxadxdyxa

    dxydxa =++

    Subject to: y(a) = y0 , y(b) = y1 The values y(a) = y0 , y(b) = y1 are called boundary conditions. For a second order differential equation other pairs of boundary conditions could be: y (a) = y0, y(b) = y1

    y(a) = y0, y (b) = y1 y (a) = y0, y (b) = y1 where y0 and y1 are arbitrary constants. Note that even when the conditions of Theorem 1 are fulfilled a boundary-value problem can have several solutions , a unique solution or no solution at all. (problem # 2). Definition: A linear nth-order differential equation of the form:

    0)()(...)()(011

    1

    1 =++++

    yxadxdyxa

    dxydxa

    dxydxa n

    n

    nn

    n

    n (1)

    is called a homogeneneous, whereas an equation of the form:

    )()()(...)()(011

    1

    1 xgyxadxdyxa

    dxydxa

    dxydxa n

    n

    nn

    n

    n =++++

    (2)

    is called non-homogeneous. As we shall see in subsequent sections, in order to solve a non-homogeneous linear equation (2), we must first be able to solve the associated homogeneous equation (1). Note: To avoid needless repetition we will assume throughout the reminder of the chapter that on some interval I:

    the coefficients ai(x), i=0,1,2,,n are continuous; the function g(x) is continuous; an(x)0 for every x in the interval.

    The following theorems play an important role in obtaining the general solution of a linear differential equation:

  • Theorem 2: Let y1, y2, yk be solutions of the homogeneous differential equation (1), on the interval I. Then the linear combination: y= c1 y1(x) + c2 y2(x) + . . . + ck yk(x) where the ci, i = 1,2,,k are arbitrary constants, is also a solution on that interval. Corollary: If y1(x) is a solution of a linear homogeneous differential equation, any constant multiple: y(x) = c1 y1(x) is also a solution. Definition: A set of functions f1(x), f2(x),,fn(x) is called linear independent on an interval I if there exists constants ci, i = 1,2,,n (not all zero), such that: c1 f1(x) + c2 f2(x) + . . . + cn fn(x) = 0 (3) for every x in the interval. If the only constants that satisfy (3), for all x in the interval, are c1 =c2 =. . . = cn = 0, then the set is called linear independent. Corollary: A set of functions f1(x), f2(x),,fn(x) is linear dependent if at least one of the function can be expressed as a linear combination of remaining functions. (Note that if ci0, then we can divide both sides of (3) by ci and express fi(x) as a linear combination of the remaining functions). Example: The set of functions: f1(x)= cos2x, f2(x) = sin2x, f3(x)= sec2x, f4(x) = tan2x are linear dependent on the interval (- /2 , /2). Solution: From trigonometry, we know that: cos2x + sin2x =1 and 1+ tan2x =sec2x thus for the choice of constants c1 = c2 = c4=1, c3 = -1 the following is satisfied on the given interval: c1 cos2x + c2 sin2x + c3 sec2x+ c4 tan2x =0. We are primarily interested in linear independent solutions of a differential equation. It turns out that there a rather mechanical way to check in a set of solutions: y1, . . . ,yn of an nth-order differential equation are linear independent: Definition: The Wronskian of functions f1(x), f2(x),,fn(x) is the determinant:

    .

    ............

    '...''...

    ),...,,(

    )1()1(2

    )1(1

    21

    21

    21

    =

    nn

    nn

    n

    n

    n

    fff

    ffffff

    fffW

  • Theorem 3: Let y1, y2,. . . ,yn be n solutions of the homogeneous linear nth-order differential equation (1), on an interval I. Then, the sent of solutions is linearly independent on I if and only if W(y1, y2,. . . ,yn) 0 for every x in the interval. A Computer Algebra System, like Maple could be very useful for evaluating Wronskians, and checking whether or not a set of solutions forms a linear independent set. Example: Assume that the functions : ex, xex, x2ex are solutions of a linear differential equation. Do they form a linear independent set? Solution: We use the Maple command Wronkian which is included in the linalg package: > restart: > with(linalg): Warning, the protected names norm and trace have been redefined and unprotected We define the set of functions: > s:= [exp(x), x*exp(x), x^2*exp(x)];

    := s [ ], ,e x x e x x2 e x

    Let's calculate the Wronskian. Be very careful on the spelling of the word Wronskian: > ws:= Wronskian(s,x);

    := ws

    e x x e x x2 e x

    e x + e x x e x + 2 x e x x2 e xe x + 2 e x x e x + + 2 e x 4 x e x x2 e x

    We need to calculate the determinant: > result:= det(ws);

    := result 2 ( )e x3

    Since the Wronskian is not zero, the given set in linearly independent. Definition: Any set y1, y2, . . .,yn of linearly independent solutions of an nth-order homogeneous differential equation on interval I is called a fundamental set of solutions on that interval. Note: To determine if a given set of functions form a fundamental set of a differential equation, we must show that: i) each function is indeed a solution of the differential equation; ii) the Wronskian of the given set is not-zero for each value of x.

  • Theorem 4: If { y1, y2, . . .,yn } is a fundamental set (i.e., linearly independent set) of solutions to an nth-order differential equation (1), on an interval I, then the general solution of (1) is: y(x) = c1 y1(x) + c2 y2(x) + . . . + cn yn(x) where c1, . . .,cn are arbitrary constants. Lets now examine the overall solution methodology for linear non-homogeneous differential equations of the form (2). Definition: Any function yp free or arbitrary parameters that statisfies (2) is called a particular solution of the differential equation. Theorem 5: Let yp(x) be any particular solution to the non-homogeneous differential equation (2), and let { y1, y2, . . .,yn } be a fundamental set of solutions of the associated homogeneous differential equation (1) on the interval I. Then the general solution of the non-homogeneous differential equation is: y(x) = c1 y1(x) + c2 y2(x) + . . . + cn yn(x) + yp(x) We call the linear combination: yc(x) = c1 y1(x) + c2 y2(x) + . . . + cn yn(x) the complimentary function/solution. Thus the solution of a linear non-homogeneous differential equation can be written as: y(x) = (complimentary solution ) + (any particular solution) = yc(x) + yp(x) The above theorem can be generalized for linear non-homogeneous differential equations where the right-hand side can be decomposed as a sum of simpler functions. The following theorem is also known as the Superposition Principle:

  • Theorem 6: Consider the linear non-homogeneous differential equation of the form:

    )(...)()()()(...)()( 21111

    1 0xgxgxgyxa

    dxdyxa

    dxydxa

    dxydxa kn

    n

    nn

    n

    n +++=++++

    (4)

    where g(x) = g1(x) + g2(x) + . . . + gk(x). If ypi(x) is a particular solution of the differential equation:

    )()()(...)()(011

    1

    1 xgyxadxdyxa

    dxydxa

    dxydxa in

    n

    nn

    n

    n =++++

    for i = 1,2,,k

    then the particular solution for (4) will be: yp(x) = yp1(x) + . . . + ypk(x) Thus the general solution of (4) will be: y(x) = (complimentary solution ) + (particular solution). Example: If yp1(x) = 3e2x and yp2(x) = x2 + 3x are respectively particular solutions of: y 6 y + 5 y = - 9e2x and y 6y + 5y = 5x2 + 3x 16, find the particular solution of: y 6y + 5y = 5x2 + 3x 16 - 9e2x Solution: Observing that the right-hand side can be decomposed into two functions: g1(x) = - 9e2x and g2(x) = 5x2 + 3x 16 , by the superposition principle, the particular solution will be: yp(x) = x2 + 3x + 3e2x 2.1.1 Homogenenous Linear Differential Equations with Constant

    Coefficients

    We now turn our attention to solving linear homogeneous differential equations with constant coefficients. Solutions of any nth-order homogeneous liner differential equations with constant coefficients are determined by the solutions of the characteristic equation: Definition: The equation an mn + an 1 mn 1 + . . . + a1 m + a0 = 0 is called the characteristic equation of the nth-order linear homogeneous differential equation with constant coefficients:

    0...011

    1

    1 =++++

    yadxdya

    dxyda

    dxyda n

    n

    nn

    n

    n

  • 2nd Order Equations: We begin our investigation by considering the second-order homogeneous linear differential equation with constant coefficients a y + b y + c y = 0 (5) The characteristic equation is: a m2 + b m + c = 0. The following theorem gives the form of the general solution of (5), which depends on the nature of the 1solutions of the characteristic equation: Theorem 7: Let a y + b y + c y = 0 be a homogeneous second-order equation with constants (real) coefficients , and let m1 and m2 be the solutions of the characteristic equation a m2 + b m + c = 0. Then:

    If m1 m2 and both m1 and m2 are real, the set },{ 21 xmxm eeS = is a fundamental set and the general solution is: xmxm ececy 21 21 +=

    If m1 = m2, the set },{ 11 xmxm xeeS = is a fundamental set and the general

    solution is: xmxm xececy 11 21 +=

    If m1 = a + i and m2 = a - i , the set )}sin(),cos({ xexeS axax = is a fundamental set and the general solution is: ( ))sin()cos( 21 xcxcey ax +=

    Example: Solve the initial value problem: y + y 2y = 0, y(0) = 4, y (0)=-5 Solution: The characteristic equation is: m2 + m 2 = 0. Solving the quadratic equation we obtain: m1 = 1 and m2 =-2. According the Theorem 7, the general solution is: y = c1 ex + c2 e-2x . To find the values of the coefficients we use the initial conditions. Differentiating we get: y = c1 ex 2c2 e-2x Therefore: y(0) = c1 + c2 = 4 y(0)= c1 - 2 c2 = -5 Solving the above system, we get: c1 = 1 and c2 = 3. Thus the general solution is: y(x) = ex + 3 e-2 x

    Higher Order Equations: As with second-order equations, a general solution of the nth-order linear homogeneous differential equation with constant coefficients is determined by the solutions of the characteristic equation.

  • Theorem 8: Let an mn + an-1 mn-1 + . . . + a1 m + a0 = 0 be the characteristic equation of an nth-order linear homogeneous differential equations with constant coefficients. Then:

    If m is a root of multiplicity 1, then emx is a solution associated with the root m.

    If m is a real root of multiplicity k >1, then the k linear independent solutions associated with m are: {emx, xemx, x2emx,. . . , xk 1emx}

    If m is complex root ( )ia of multiplicity k > 1, then the 2k linear

    independent solutions associated with m are:

    {eax cos(x), xeax cos(x), . . . , xk 1 eax cos(x) } and {eax sin(x), xeax sin(x), . . . , xk 1 eax sin(x) }

    A Computer Algebra System, like Maple is used to find the roots of a characteristic equation of order greater than two. Example: Find the general solution of the differential equation: y + 3 y + 3 y + y = 0 Solution: The characteristic equation is: m3 + 3m2 + 3m + 1 =0 Lets use Maple to find its roots: > solve(m^3 + 3*m^2 + 3*m + 1=0,m);

    , ,-1 -1 -1

    We observe that the root is of multiplicity three. Thus according Theorem 8, the fundamental set of solutions associated with the root is: {e-x , x e-x , x2 e-x }. So the general solution is: y(x) = c1 e-x + c2 x e-x + c3 x2 e-x

    Using Maples dsolve command we can also obtain the solution as: > gensol:=dsolve(diff(y(x), x$3) + 3*diff(y(x), x$2) + 3*diff(y(x), x) + y(x) =0, y(x));

    := gensol = ( )y x + + _C1 e( )x _C2 e( )x x _C3 e( )x x2

  • Example: Find the general solution of the differential equation: 2 y(5) - 7 y(4) + 12 y + 8 y =0 Solution: The characteristic equation is: 2 m5 7m4 + 12 m3 + 8 m2 =0 Lets use Maple to find the roots: > solve(2*m^5- 7*m^4 + 12*m^3 + 8*m^2=0, m);

    , , , ,0 0-12 + 2 2 I 2 2 I

    Observe that one root is of multiplicity two. Also we got a pair of complex conjugates. According to Theorem 8, the general solution is: y(x) = c1 + c2 x + c3 e-x / 2 + e2 x (c4 cos(2x) + c5 sin(2x) ) Modeling Free Oscillations of Mass-Spring System: Assume a spring that resists compression as well extension is suspended vertically from a fixed support. At the lower end of the spring we attach a body of mass m . We assume m to be large, so we disregard the mass of the spring. If we pull the body down a certain distance and then release it, it undergoes a motion. Analyze the free undamped as well as the free damped motion. Solution: We will examine separately each of the cases, by setting up the differential equation that models the motion of the spring and analyze the nature of the solutions. Free Undamped Motion: Hookes law states that a spring exerts a restoring force F opposite to the direction of elongation, which is proportional to the amount of elongation s. Thus after a mass m is attached to the spring, it stretches the spring by an amount s and attains a position of equilibrium at which the weight is balanced by the restoring force k s. Thus m g = k s. We refer to k as the constant of the spring. If the mass is displaced by an amount x from the equilibrium the restoring force of the spring is: k (x + s). Assuming there are no other forces acting on the system, Newtons second law describes the free undeamped motion:

    Fnet = m a Thus: kxksmgkxmgxskdt

    xdm =+=++= )(22

    Rearranging the above, and defining 2 = k / m we obtain the equation of motion:

    0222

    =+ xdt

    xd (6)

  • Equation (6) describes the free undampled motion (simple harmonic motion). The initial conditions associated with (6) are : the amount of initial displacement x(0) = x0 and the initial velocity x (0) = x1. We assume that if x0 > 0 the mass is released form a point below the equilibrium (if x0 < 0 is released above). Also if x1 > 0 the mass is released with a downward velocity (if x1 > 0 , is released with upward velocity, if x1 = 0 is released from rest). To solve (6), we observe that the characteristic equation is: m2 + 2 =0 which has complex roots: m1 = i and m2 = - i. Thus solution will be: x(t) = c1 cos ( t) + c2 sin( t) (6a) The above can also be written as: x(t) = A sin( t + ) where ( ) 2/12221 ccA += and tan = c1 / c2 The above is an oscillatory motion of period: T = 2 / and frequency f = 1 / T and amplitude A. Free Damped Motion: The concept of free harmonic motion is somewhat unrealistic, since it assumes that no other forces act on the system. Unless the mass is suspended in a perfect vacuum there will be at least a resisting force due to the surrounding medium. In the study of mechanics damping forces acting on a body are proportional to the instantaneous velocity dx / dt of the body. Thus assuming that no other external forces are impressed on the system, Newtons second law states:

    dtdxckx

    dtxdm =2

    2

    Rearranging the above and defining 2 = k / m and 2 a = c / m, we obtain the equation of motion:

    02 222

    =++ xdtdxa

    dtxd (7)

    To (fully) obtain a solution for (7), we need two initial conditions. The adopt the same conventions for the initial conditions as described in the case of free harmonic motion. The characteristic equation for (7) is: m2 + 2 a m + 2 =0, and the corresponding roots are: m1 = -a + ( a2 - 2)1 / 2 and m2 = = -a - ( a2 - 2)1 / 2 Thus the nature of the solutions and thus the nature of the motion depends on the relationship between a and . Note that in each case the solution contains a damping factor e- a t which causes the displacements of the mass to become negligible as t increases. We examine three cases:

  • Overdamping: The damping constant a is large and a2 - 2 > 0. Therefore the characteristic equation has real roots. The solution is: ( )tataat ececetx 2/1222/122 )(2)(1)( += (7a) The above equation represent a nonoscillatory motion . Critical damping: In this case, a2 - 2 = 0. The characteristic equation will have a real root of multiplicity two (double real root). The solution is: ( )tccetecectx atatat 2121)( +=+= (7b) The motion is very similar to that of an overdamped system. Note that since the exponential term is never zero, and the term (c1 + c2 t) can have at most one positive zero (root), it follows that the motion can have at most one passage through the equilibrium position ( x(t) = 0 ). Underdamping: The damping coefficient is small compared to the spring constant and a2 - 2 < 0. Therefore the characteristic equation has complex roots. The solution is: ( ))sin()cos()( 222221 atcatcetx at += The above equation can also be written as: x(t) = A e-a t sin((2 a2)1/2 t + ) ( ) 2/12221 ccA += and tan = c1 / c2. This is an oscillatory motion, but because the coefficient e-a t the amplitudes of vibrations tends to zero as t tends to infinity.

    The quantity A e-a t is called the damped amplitude and the quantity 22

    2a

    the quasi period of the motion.

  • Example: A 16-pound weight is attached to a 5-foot long string. At equilibrium the spring measures 8.2 feet. If the weight is pushed up and released from rest at a point 2ft above the equilibrium position, find an expression for the displacement function x(t) and also graph it. Assume that the surrounding medium offers a resistance equal to the instantaneous velocity. Solution: From the given data, the elongation of the spring after the weight is attached is: 8.2 5 = 3.2 ft. Using Hookes law we can calculate the constant k of the spring: 16 = k (3.2) or k = 5 lb/ft. Also the mass is: m = 16 / 32 =1/2. Thus the equation of motion is:

    dtdxx

    dtxd = 5

    21

    2

    2

    or 010222

    =++ xdtdx

    dtxd

    The characteristic equation is: m2 + 2m + 10 = 0 with roots: im 312,1 = Thus the system is underdamped. Thus the displacement function x(t) is given by: x(t) = e-t ( c1 cos3t + c2 sin3t ) The constants can be found from the initial conditions: x(0) = -2 (above the equilibrium) and x(0) = 0 (released from rest). Using the initial conditions we obtain: c1 = -2 and c2= - 2/3. Thus the equation of motion becomes:

    = ttetx t 3sin323cos2)(

    Using the plotting capabilities of Maple, we can plot and visualize the underdamped motion of the system: > plot(exp(-t) *(-2*cos(3*t) - (2/3)*sin(3*t)), t=0..2*Pi);

  • Example: A box with rectangular cross-section a x b (feet) and height H, and weight w floats in fluid whose weight per volume (density) is . If h is the height of the submerged box at equilibrium point, describe the motion subsequent to its being pushed down into the fluid. Create a mathematical model describing the motion. Is the motion oscillatory? What is the period? Solution: At equilibrium point, the weight of the box is a force balanced by the buoyant force exerted by the fluid. According to Archimedes Principle, the buoyant force is equal to the weight of the displaced fluid. Thus: Weight of the box = Buoyant Force = Weight of fluid displaced w = (a b) h (Note: The quantity (a b ) represent the submerged volume of the box which is equal to the volume of the displaced fluid) We now consider the non-equilibrium configuration. For this, mark a line around the box at equilibrium. Let y(t) denote the amount by which this line is displayed above or below the surface of the fluid. Lets assume that y(t) is positive is the box rises ( line is visible) and negative if the box descends. Then, the buoyancy force will be: a b ( h y ) p (Note: y = y(t) ) According to Newtons second law Fnet = m a, where m is the mass of the box and a the acceleration. The model assumes that no other forces act on the box. Therefore:

    22

    )()(dt

    ydgwwyhab =+

    But, w = (a b) h so substituting to the previous equation and simplifying, we obtain:

    0)(22

    =

    + tywgab

    dtyd

    Denoting

    =wgab2 the equation of motion is:

    0222

    =+ ydt

    yd The above denotes a free undamped motion. Lets assume that the initial conditions are: y(0) = y0 and y (0) = u0 ( initial velocity). Solving the equation of motion and using the initial conditions to find the appropriate constants, we obtain:

  • )sin()cos()( 00 tuttyty

    +=

    Thus the box, bobs with periodic motion. Its period is 2=T

    2.1.2 Non-Homegeneous Linear Differential Equations: Method of

    Undetermined Coefficients: In the previous section we learned how to solve nth-order linear homogeneous equations with constant (real) coefficients. These techniques are also useful in solving some non-homogeneous equations of the form:

    )(...011

    1

    1 xgyadxdya

    dxyda

    dxyda n

    n

    nn

    n

    n =++++

    (8)

    Recall from Theorem 5, that the general solution for the above type of differential equations is: y(x) = (complimentary solution ) + (any particular solution) = yc(x) + yp(x) The underlying idea in the method of undetermined coefficients, it to make a conjecture, or an educated guess about the form of particular solution yp(x) according to the type of function described by g(x). The method applies only linear non-homogeneous equations of the form (8), where:

    the coefficients are constants; the function g(x) is a constant, a polynomial, and exponential of the form

    eax, a since or cosine function sinx or cosx of a finite sume or products of these functions.

    Method: 1) Solve the corresponding homogeneous differential equation and obtain the complimentary solution yc(x). 2) Determine the form of the particular solution yp(x) (see below). 3) Determine the unknown coefficients in yp(x) by substituting the yp(x) into the given differential equation and equate like terms. 4) Form the general solution.

  • Determining the form of yp(x):

    If g(x) contain a term of the form xm , then the associated particular solution contains a linear combination of elements form the set: S = { xm, xm-1,. . . , x, 1}

    If g(x) contains a term of the form xm ekx then the associated particular solution has a linear combination of elements from the set:

    S = { xmekx, xm 1 ekx, . . ., x0 ekx} If g(x) contains a term of the form xm eax cos(x) or of the form xm eax sin(x)

    then the associated particular solution has a linear combination of elements form the set: S = { xm eax cos(x), xm -1 eax cos(x) ,. . . ., xeax cos(x), eax cos(x),

    { xm eax sin(x), xm -1 eax sin(x) ,. . . ., xeaxsins(x), eax sins(x)}

    If any of the functions is the set S appears in the general solution yc(x) of the corresponding homogeneous equation, multiply each function in the set S by xr to obtain a set S where r is the smallest integer so that each function in S is not a function in S

    Trials for the particular solution yp(x):

    g(x) Form of yp(x) 3 x 10 A x + B 2x3 + 12x 3 Ax3 + Bx2 + Cx + D sin5x A sin5x + B cos 5x ( 5x2 + 4) e3x (Ax2 + Bx + C) e3x x3 e2x sin5x (Ax3 + Bx2 + Cx + D) e2x cos5x + (Ex3 + Fx2 + Gx + H) e2x sin5x Example: Solve y 2 y - 3y = 4x 5 + 6xe2x Solution: First we solve the associated homogeneous differential equation: y 2y 3y = 0 The characteristic equation is: m2 2m -3 =0, with roots m1,2 = -1, 3 Thus the complimentary solution is: yc(x) = c1 e-x + c2 e3x Observe that g(x) consists of a polynomial and an exponential type function. Thus we seek a particular solution of the form: yp(x) = Ax + B + C x e2x + E e2x Differentiate the above, substitute to the given non-homogeneous differential equation and group like terms: -3Ax 2A 3B 3Cx e2x + ( 2C - 3E) e2x = 4x 5 + 6x e2x Equating like terms, we obtain a linear system of algebraic equations (to be solved by hand or by using a Computer Algebra System): 3 A = 4, -2A 3B = -5, -3C = 6, 2C 3E = 0

  • Solving the above we have: A = - 4/3, B= 23/9, C = -2, E = -4/3 Thus the general solution is:

    xxxxpc exexececxyxyxy223

    21 342

    923

    34)()()( +=+=

    Note the values of c1 and c2 could be determined if initial or boundary conditions were available. Example: Solve y 6 y + 9y = 6x2 + 2 12 e3x Solution: It is easy to determine that the complimentary solution is: yc(x) = c1 e3x + c2 x e3x (The characteristic equation has a double root) From the form of g(x) we seek (at first), a particular solution of the form: yp(x) = A x2 + Bx + C + D e3x Inspection of this solution shows that one term is duplicated in the complimentary solution. To avoid duplication, we need to multiply the exponential part of the particular solution by x2 (smallest integer is r = 2). Thus the correct form of the particular solution is: yp(x) = A x2 + Bx + C + D x2 e3x Differentiating, substituting into the differential equation and collecting like terms, gives: -9A x2 + (-12 A + 9 B ) x + 2A 6B + 9C + 2 D e3x = 6x2 + 2 12 e3x Equating like terms, we obtain the values for the parameters. Thus the general solution is: y(x) = c1 e3x + c2 x e3x + 2/3 x2 + 8/9 x + 2/3 6 x2 e3x

    Example: Determine the correct form of the particular solution of: y(4) + y + 1 x2 e-x Solution: The characteristic equation of the associated homogeneous differential equation is: m4 + m3 = 0. The roots are: 0, 0, 0, -1 Thus the complimentary solution is: yc(x) = c1 + c2 x + c3 x2 + c4 e-x

    Our initial guess for a particular solution is: yp(x) = A + (B x2 + C x + D) e-x Observe that the first part of the particular solution has a term (constant term) which also exists in the complimentary solution. To eliminate duplications, we must multiply the first part of the particular solution by x2 Thus the final form of the particular solution is: yp(x) = Ax2 + (B x2 + C x + D) e-x

  • Lets explore the use of Maple in the solution process on linear non-homogeneous differential equations, with the method of undetermined coefficients: Example: Solve : y + 4 y + 14 y + 20 y = 10 e-2x e-x cos(3x) Solution: First we find the solution of the associated homogeneous differential equation: > restart: > homog_solut:= dsolve(diff( y(x), x$3) + 4*diff(y(x), x$2) + 14*diff(y(x), x) + 20*y(x) =0, y(x));

    := homog_solut = ( )y x + + _C1 e( )2 x _C2 e( )x ( )sin 3 x _C3 e( )x ( )cos 3 x We consider at first the following form for: yp(x)=A e-2x + e-x (B cos3x + C sin3x ) Since there re duplications with terms of the complimentary solution, we multiply the above by x and the revised version for the particular solution (avoiding duplications) is: yp(x) = A x e-2x + x e-x ( B cos3x + C sin3x ) Maple can be very helpful in obtaining the values for the parameters A,B, C, D. This can be achieved as follows: > restart: > yp:=(x)-> A*x*exp(-2*x) + x*exp(-x)*( B* cos(3*x) + C*sin(3*x));

    := yp x + A x e( )2 x x e( )x ( ) + B ( )cos 3 x C ( )sin 3 x > > left_side:= simplify(diff(yp(x), x$3) + 4* diff(yp(x), x$2) + 14*diff(yp(x), x) + 20 * yp(x)); left_side 10 A e

    ( )2 x18 e

    ( )xB ( )cos 3 x 18 e

    ( )xC ( )sin 3 x 6 e

    ( )xB ( )sin 3 x :=

    6 e( )x

    C ( )cos 3 x + The following command mathes the like terms from both sides and produces a set which contain the numeric values for the parameters A, B, C: > match(10*exp(-2*x) - exp(-x)*cos(3*x) = left_side,x, 'val');

    true

    > val; { }, , = C -160 = B 3 C = A 1

  • > Therefore the general solution is:

    ++++= )3sin(601)3cos(3)3cos()3sin()( 232

    21 xxxexexecxececxy

    xxxxx

    2.1.3 Non-Homegeneous Linear Differential Equations: Method of

    Variation of Parameters : The method of variations of parameters is more general than the previous method since it applies for any type of function g(x) in a non-homogeneous linear differential equation of order two or higher. First we present the method for 2nd order equations, followed by its generalization for nth order equations: Method for second order equations: Given a second order equation: a2(x) y + a1(x) y + a0(x) y = g(x)

    1) Divide by a2(x) to rewrite the equation in the standard form: y + p(x) y + q(x) y = f(x)

    2) Find the complimentary solution yc(x) = c1 y1(x) + c2 y2(x) of the associated homogeneous equation.

    3) Let W = '' 21

    21

    yyyy

    4) Let W

    xfxyu )()(' 21= and

    Wxfxyu )()(' 12 =

    5) Integrate to obtain u1(x) and u2(x) 6) A particular solution is: yp(x) = u1(x) y1(x) + u2(x) y2(x) 7) The general solution is: y(x) = yc(x) + yp(x)

  • Method for higher order equation: The method we have just examined can be generalized to linear nth-order equations that can be put in the standard for: y(n) + Pn 1(x) y(n 1) + . . . + P1(x) y + P0(x) y = f(x) If yc(x) = c1 y1 + . . . + cn yn is the complimentary solution of the associated homogeneous equation, then the particular solution has the form: yp(x) = u1(x) y1(x) + u2(x) y2(x)+ . . . + un(x) yn(x) where the uk k = 1,2,, n are determined by solving the linear system: y1 u1 + y2 u2 + . . . + yn un = 0 y1 u1 + y2 u2 + . . . + y un = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y1(n 1) u1 + y2(n 1) u1 + . . . + yn(n 1) u1 = f(x) Using Cramers rule the above system can be solved yielding:

    WW

    xu kk =)(' k = 1,2,3,,n where W is the Wronskian of y1, y2, . . ., yn and Wk is the determinant obtained by replacing the kth column of the Wronskian by the column consisting of the elements ( 0, 0, 0, . . . , f(x) ) Example: Solve 4 y + 36 y = csc(3x) Solution: Note that the method of variation of undetermined coefficients cannot be applied because of the special nature of the function g(x). Thus we will use the method of variation of parameters. We first bring the differential equation into the standard form: y + 9 y = 1/4 csc(3x) We can easily obtain the solution of the associated homogeneous equation to be: yc(x) = c1 cos3x + c2 sin3x Thus y1(x) = cos3x and y2(x) = sin3x. Also f(x) = 1/4 csc(3x)

    The 33cos33sin3

    3sin3cos)3sin,3(cos == xx

    xxxxW

  • The 41

    3cos33csc)4/1(3sin0

    1 == xxx

    W and xx

    xxx

    W3sin43cos

    3csc)4/1(3sin303cos

    2 ==

    Thus, 121' 11 == W

    Wu and x

    xWWu

    3sin123cos' 22 ==

    Integrating the above, we obtain:

    xxu121)(1 = and 36

    )3ln(sin)(2xxu =

    Thus the particular solution is:

    ( ) ( ))3sin(ln)3sin(361)3cos(

    121)( xxxxxy p +=

    The general solution is: y(x) = yc(x) + yp(x) Example: A mass m = 1/5 Kg is attached to a spring with constant k = 2 Nt/m. An external force f(t) = 5 cos(4t) is acting on the vibrating mass. The motion is damped with a coefficient c = 1.2 Assume that the mass is released from rest at 1/2 ft below the equilibrium. Construct a model for the equation of motion. Solve the model, characterize and visualize the components of the solution. Solution: The external force f(t) acting on the vibrating mass represents a driving force causing an oscillatory motion. Using Newtons second law Fnet = m a we obtain:

    )(22

    tfdtdxckx

    dtxdm +=

    which can be written (standard form): )(2 222

    tFxdtdx

    dtxd =++

    where F(t) = f(t) /m 2 = c/ m and 2 = k / m For the given situation, the equation of motion can be modeled as an initial value problem:

    )4cos(522.151

    2

    2

    txdtdx

    dtxd =++ x(0) = 1/2 and x (0) =0

    In standard for the above can be written as: )4cos(2510622

    txdtdx

    dtxd =++

  • The associated homogeneous differential equation has a characteristic equation with roots: m1 = =3 + i and m2 = -3 i Thus the solution is: ( ))sin()cos()( 213 tctcetx tc += We call the above the transient tem or transient solution. Observe that xc(t) thends to zero as time t tends to infinity. Using the method of undetermined coefficients we assume a particular solution of the form: xp(t) = A cos(4t) + B sin(4t). This describes an oscillatory (perpetual) motion. It is called the steady-state term or steady-state solution. Differentiating and substituting into the non-homogeneous differential equation gives: (-6A + 24B) cos4t + (-24A 6B) sin4t = 25 cos4t Equating like terms and solving the resulting system we obtain: A = -25/102, B = 50/51 Thus the solution is:

    ( ) )4sin(5150)4cos(

    10225)sin()cos()( 21

    3 tttctcetx t ++= Using the initial conditions x(0) = 1/2 and x (0) =0 and substituting in the above equation and its derivatives, we obtain the values for c1 and c2 Therefore:

    )4sin(5150)4cos(

    10225)sin(

    5186)cos(

    5138)( 3 ttttetx t +

    =

    We can use Maple to visualize the components of the motion: > restart: > with(plots): Warning, the name changecoords has been redefined We first graph the general solution x(t): > p1:=plot(exp(-3*t)*(38/51*cos(t) - 86/51*sin(t)) - 25/102* cos(4*t) + 50/51*sin(4*t), t = 0..Pi,color = red): > display(p1);

  • The steady-state solution can be visualized as: > p2:=plot(-25/102*cos(4*t) + 50/51*sin(4*t), t = 0..Pi, color = blue): > display(p2);

    The tansient solution can be visualized as: > p3:= plot(exp(-3*t)*(38/51*cos(t) - 86/51* sin(t)), t= 0..Pi, color= cyan): > display(p3);

    Superimposing all the graphs : > display({p1,p2,p3});

  • Example: Consider the case of a forced undamped motion described by the equation:

    )sin(02

    2

    2

    tFxdt

    xd =+ with x(0) =0 and x (0) =0 Use a Computer Algebra System to examine the motion. As times increases what happens to the magnitude on x(t) as the period of free oscillations T = 2 / approaches the period of the external force T = 2 / (i.e., when = ) ? Solution: We use Maples dsolve command in which we can incorporate the given initial conditions: > dsolve({diff(x(t), t$2) + omega^2 * x(t) = F0*sin(gamma*t),x(0) = 0, D(x)(0) =0},x(t));

    = ( )x t ( )sin t F0 ( ) + 2 2F0 ( )sin t + 2 2

    > combine(%); = ( )x t ( )sin t F0 F0 ( )sin t + 3 2

    Lets take the limit as approaches the value of : > limit(%,gamma= omega);

    = ( )x t 12F0 ( ) + ( )sin t ( )cos t t

    2

    > expand(%); = ( )x t 12

    F0 ( )sin t2

    12

    F0 ( )cos t t

    Allowing sufficient time, or taking the limit t :

  • > limit(%, t =infinity); = lim

    t ( )x t undefined

    The value of x(t) becomes infinite (undefined). This phenomenon is called pure resonance. Thus the displacements of the spring / mass system will become bigger and bigger thus forcing the spring beyond its elastic limit and the system will fail. Example: Consider a long slender vertical column of length L which has uniform cross section. The column is hinged at both ends. Find and analyze the deflection if the column is subjected to a vertical load P. Solution: During the eighteenth century, Leonard Euler was one of the first mathematicians to analyze how a thin elastic column buckles under a compressive axial force. Let y(x) represent the deflection of the column when a constant vertical compressive force, or load P, is applied to its top. From engineering analysis, using the equation of bending moments we get:

    Pydx

    ydEI =22

    or 022

    =+ Pydx

    ydEI

    where E is the Youngs module of elasticity and I the moment of inertia. Since the vertical column is hinged at the two ends: y(0) = y(L) =0 Thus the model for deflection is represented by the boundary value problem (BVL):

    022

    =+ Pydx

    ydEI y(0) = 0 and y(L) = 0

    Observe that y = 0 is a perfectly good solution for this problem. This solution has the interpretation: If the load P is not great enough then there is no deflection. Thus the important question is: For what values of P will the column bend? That is, can we find non-trivial solution. Bringing the above equation into the standard form we obtain: y + y = 0, y(0) = 0, y(L) =0 where = (P / EI ) Note that > 0. The characteristic equation has roots: im =2,1 Thus the solution is: ( ) ( )xcxcxy sincos)( 21 += Using the initial condition y(0) =0 we get c1 =0. From y(L) =0 we obtain ( ) 0sin2 =Lc . If c2 =0 then y=0 (trivial solution). Thus c2 0. Thus the previous relation implies: ( ) 0sin =L

  • Therefore:

    nL = or 222

    Ln = , n= 1,2,3,. . .

    The deflection curves y(x) (also called eigenfunctions) are given by:

    =L

    xncxy sin)( 2 n = 1,2,3, corresponding the eigenvalues n = ( n2 2 / L2 ) Physically this implies that the column will buckle of deflect if and only if the compressive force has one of the values: Pn = ( n2 2 E I / L2 ) n = 1,2,3, The different forces are called critical loads. The deflection curve corresponding to the smallest critical load P1 is called the Euler load and the corresponding curve y1(x) = c2 sin ( x / L) is called the first buckling mode. 2.1.4 Homework Problems and Projects Problems 1) Find an interval centered around x = 0 for which the initial value problems have a unique solution:

    ( x 5) y + 3y =x, y(0)= 0, y (0) =1

    y + (tanx ) y = ex , y(0) = 1, y (0) =0

    2) The differential equation: 01622

    =+ ydx

    yd has solution the expression

    y(x) = c1 cos(4x) + c2 sin(4 x). Show that :

    i) The given differential equation with boundary conditions: y(0) = 0, y(/2)=0 has infinite solutions;

    ii) The given differential equation with boundary conditions: y(0) = 0, y(/8) =0 has only one solution;

    iii) The given differential equation with boundary conditions: y(0) = 0, y(/2) =0 has no solution.

  • 3) Show that the set of functions: f1(x)= x1 / 3 + 4, f2(x) = x1 / 3 + 4x, f3(x)= x 1, f4(x)= x2 are linear dependent.

    4) Show that the given functions form a fundamental set of solutions of the differential equation on the indicated interval:

    y - 4 y = 0; { cosh(2x), sinh(2x) }, I = ),(

    x2 y + x y + y = 0; { cos(ln(x)) , sin(ln(x)) }, I = ),0(

    (Be careful to insert all appropriate parentheses when using Maple)

    y(4) + y = 0; { 1, x, cos(x), sin(x) }, I = ),( 5) Solve (find the general solution of) the following differential equations: 12 y - 5 y 2 y =0

    y + y = 0, y (0) = 0, y ( / 2) = 2

    022

    =+ yd

    yd , y( / 3) =0, y ( / 3) = 2

    6) Solve(find the general solution of) the following differential equations. Use also the dsolve command in Maple to check your answers :

    24 y + 2y 5 y y = 0

    y(4) + 4y + 24 y + 40 y + 100 y = 0

    7) An 8-pound weight stretches a spring 2 feet. Assuming that the dumping force is numerically equal to 2 times the instantaneous velocity, determine the equation of motion if the weight is released from the equilibrium position with an upward velocity of 3 ft/s. Characterize and graph the equation of motion. 8) A 32-pound weight stretches a spring 2 ft. Determine the amplitude and the period of motion if the weight is released 1 ft above the equilibrium position with an initial upward velocity of 2 ft/s. How many complete vibrations will the weight have completed at the end of 4 seconds? 9) A cylinder of height H, radius R and weight f, float with its axis vertical in a fluid whose weight per unit volume is . Assume that h is the height at equilibrium of the submerged part of the cylinder, describe the motion of the cylinder

  • subsequent to its being pushed down into the fluid and released. Create a mathematical model for describing the motion. Solve the model. Find an expression for the period of the motion. Explain the creation and the solution methodology of the model.

    10) Two roots of the characteristic equation with real coefficients are: m1 = -1 and m2 = 5+ i. Find the corresponding homogeneous linear equation.

    11) Solve the following differential equations (You may use Maple ONLY to help you determine the parameters in the particular solution). You must show all the steps of the solution process:

    y + 4 y = ( x2 3) sin(2x)

    y + y = 2 x sin(x)

    y(4) - y = 4 x + 2 x e-x

    y + 4 y + 4 y = ( 3 + x) e-2x

    12) Solve the following differential equations (You may use Maple ONLY to help you determine the parameters in the particular solution). You must show all the steps of the solution process: y 4 y + 8 y = ( 2 x2 3 x) e2x cos(2x) + (10 x2 x 1) e2x sin(2x) 13) Solve he following differential equations:

    y + y = sec2x

    3 y 6 y + 6y = ex sec x

    21'2'' xeyyy

    x

    +=+

  • 14) A 4 lb weight is attached to a spring whose constant is 2 lb /ft. The medium offers resistance to the motion of the weight numerically equal to the instantaneous velocity (coefficient of damping is c = 1). Assume that the weight is released from a point 1 ft above the equilibrium position, with a downward velocity of 8 ft/s.

    Construct a model for the equation of motion Solve the model Find the time at which the weight passes the equilibrium point Find the time at which the weight attains its extreme displacement from the

    equilibrium point 15) A weight of mass m =1 is attached from a spring whose constant is 5 lb/ft. Initially the mass is released 1 ft below the equilibrium position with a downward velocity of 5 ft/s. The motion takes place in a medium that offers a damping force numerically equal to 2 times the instantaneous velocity. Assume that an external force f(t) = 12 cos(2t) + 3 sin(2t) is acting on the system:

    Find the equation of motion for the system Solve the model Graph (separately) the transient and steady-state solutions Superimpose the equation of motion with the above graphs

    16) Assume that a thin vertical column of uniform cross section is embedded at its base ( x =0) and thus does not move. The column is free at its top ( x = L). A load P is applied to its free end. The load causes a small initial deflection . The differential equation for the deflection y(x) is:

    =+ Pydx

    ydEI 22

    Write appropriate initial and boundary conditions and solve the above differential

    equation assuming 0 Solve the differential equation for the deflection y(x) Show that the Euler load for this column is one fourth of the Euler load for a

    column that is hinged at the two ends.

  • Projects: 1) Consider an RLC-circuit, consisting of an Ohms resistor of resistance R [ohms], an inductor of inductance L [henrys], a capacitor of capacitance C [farads] and a battery of electromotive force E(t) [volts]. The equation for the current I(t) is obtained by considering the three voltage drops: EL = L I(t) (voltage drop across the inductor) ER = R I(t) (voltage drop across the resistor)

    EC = dttIC )(1 (voltage drop across the capacitor) Note that the charge = dttItQ )()( According to Kirchhoffs law, the sum of the voltage drops is equal to the electromotive force E(t). Assume a sinusoidal force E(t) = E0 sin( t). a) Use Kirchhoffs law to generate a model for the current I(t) for a sinusoidal electromotive force E(t). b) Consider R = 100 ohms, L = 0.1 henry, C = 10-3 farad and E(t) =155 sin(377 t) and assume that the charge and current is zero at t =0:

    Write the model to this particular RLC circuit Find the transient and steady state solution Find the general solution I(t). Use the initial conditions I(0) = Q(0) =0 to calculate the values of all constants Superimpose the graphs of the transient and steady-state solution. What

    happens to the current after a short time? Clearly explain the construction and solution methodology of the models in the above cases. 2) A bead is constrained to slide along a frictionless rod of length L. The rod is rotating in a vertical plane with constant angular velocity about a pivot P fixed at midpoint of the rod. The design allows the bead to move along the entire length of the rod. Let r(t) denote the position of the bead from the midpoint. Using Newtons second law and taking into account the gravitational, and inertia forces (coriolis, centrifugal), the differential equation of motion is:

    )sin(222

    tmgrmdt

    rdm = a) Solve the differential equation subject to the initial conditions r(0) = r0 and

    r (0) = u0 b) Determine the initial conditions for which the bead exhibits simple harmonic

    motion c) What is the minimum length L of the rod for which in can accommodate

  • the simple harmonic motion of the bead? d) For initial conditions other than those obtained in part b), the bead will

    eventually fly off the rod. Explain why this is the case? e) Assume that = 1 rad/s. Superimpose plots of the solution r(t) for initial conditions r(0) = 0 and r (0) = u0 where u0 = 0, 10, 15, 16, 16.1, 17 For which case(s) the bead stays always on the rod? Explain!