Second-Order Linear ODEs (Textbook, Chap 2) notes/Lectu… · Second-Order Linear ODEs (Textbook,...

17
New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 120 Second-Order Linear ODEs (Textbook, Chap 2) Motivation Recall from notes, pp. 58-59, the second example of a DE that we introduced there. ' 1 1 0 2 2 w Q dx d = φ λ φ λ φ (a1) This equation represents conservation of water mass (actually conservation of water volume; the model assumes an essentially constant water density) in a confined, but leaky aquifer. The unknown is denoted by the letter φ [L], representing hydraulic head and the independent variable by the letter x [L], representing location. It is a second order ordinary differential equation (ODE). The symbols λ, φ 0 , and Q w denote known parameters. Respectively, they represent aquifer transmissivity divided by a leakage coefficient (λ [L 2 ] =TB’/K’ , see p. 59 and the paragraph on dimensional homogeneity), the head [L] in a vertically adjacent (overlying or underlying) aquifer, and the pumping per unit area [L/t]. All terms in (a) have units of [1/L]. To avoid confusion with the notation in the text, which uses the symbol λ for something else, let’s replace λ with the symbol β (= λ) , or ' 1 1 0 2 2 w Q dx d = φ β φ β φ (a2) Another DE presented on p. 46 represents solute mass balance in a flowing river, with the time rate of change of mass in storage balanced by advective and dispersive fluxes, or 0 2 2 = + x C D x C v t C (b) Here the unknown is denoted by the letter C, representing solute concentration. There are “… two independent variables, denoted by the letters x (space) and t (time). As there are now two (or more) independent variables, it is a partial differential equation (PDE). The highest order derivative in x defines it as a second order equation in space, while the highest order derivative in t defines it as a first order equation in time. … The symbols v and D denote parameters, the mean river velocity and a dispersion coefficient.” Suppose that there is a continuous, unchanging source of solute, and that the flow rate in the river is constant. Then C/t=0, the solute concentration is in steady-state, and (b) becomes a second order ODE in x. 0 2 2 = dx C d D dx dC v (c) The first term represents solute advection and the second dispersion, which are in balance. Notice that the partial differences ( ) have become ordinary differences d( )’s, as there is now

Transcript of Second-Order Linear ODEs (Textbook, Chap 2) notes/Lectu… · Second-Order Linear ODEs (Textbook,...

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    120

    Second-Order Linear ODEs (Textbook, Chap 2)

    Motivation Recall from notes, pp. 58-59, the second example of a DE that we introduced there.

    '11 022

    wQdxd

    −−=− φλ

    φλ

    φ (a1)

    This equation represents conservation of water mass (actually conservation of water volume; the model assumes an essentially constant water density) in a confined, but leaky aquifer. The unknown is denoted by the letter φ [L], representing hydraulic head and the independent variable by the letter x [L], representing location. It is a second order ordinary differential equation (ODE). The symbols λ, φ0, and Qw’ denote known parameters. Respectively, they represent aquifer transmissivity divided by a leakage coefficient (λ [L2] =TB’/K’ , see p. 59 and the paragraph on dimensional homogeneity), the head [L] in a vertically adjacent (overlying or underlying) aquifer, and the pumping per unit area [L/t]. All terms in (a) have units of [1/L]. To avoid confusion with the notation in the text, which uses the symbol λ for something else, let’s replace λ with the symbol β (= λ) , or

    '11 022

    wQdxd

    −−=− φβ

    φβ

    φ (a2)

    Another DE presented on p. 46 represents solute mass balance in a flowing river, with the time rate of change of mass in storage balanced by advective and dispersive fluxes, or

    022

    =∂∂

    −∂∂

    +∂∂

    xCD

    xCv

    tC (b)

    Here the unknown is denoted by the letter C, representing solute concentration. There are “… two independent variables, denoted by the letters x (space) and t (time). As there are now two (or more) independent variables, it is a partial differential equation (PDE). The highest order derivative in x defines it as a second order equation in space, while the highest order derivative in t defines it as a first order equation in time. … The symbols v and D denote parameters, the mean river velocity and a dispersion coefficient.” Suppose that there is a continuous, unchanging source of solute, and that the flow rate in the river is constant. Then ∂C/∂t=0, the solute concentration is in steady-state, and (b) becomes a second order ODE in x.

    022

    =−dx

    CdDdxdCv (c)

    The first term represents solute advection and the second dispersion, which are in balance. Notice that the partial differences ∂( ) have become ordinary differences d( )’s, as there is now

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    121

    only one independent variable, x. Suppose further that the solute is organic and that it can biotransformed by in situ reactions. The simplest model of this is that the solute concentration decays exponentially with time, which in (c) is modeled by adding a so-called first-order decay process,

    Cdx

    CdDdxdCv α−=− 2

    2

    (d1)

    where α [1/T] is the decay constant. Here advection and dispersion are balance by decay. We can write this in mathematical standard form by dividing by the quantity (–D) and gathering all terms on the left-hand side.

    022

    =−− CDdx

    dCDv

    dxCd α (d2)

    This is second-order ODE in spatial location x. These are two common examples of second-order ODEs encountered in hydrology, but there are many others. These equations are also linear, if their parameters are independent of the dependent variable. They can vary with location x, however. Introduction (Textbook, Section 2.1) These two examples belong to the general class of linear second-order ODEs which your book writes as (1) )()(')('' xryxqyxpy =++ where, r is the forcing and, for a linear model, parameters p, q, and r do NOT depend on the dependent variable, y, but can depend on the independent variable, x. How do the two examples above fit this model? Model Translation to eqn. (1)

    '11 022

    wQdxd

    −−=− φβ

    φβ

    φ '1,1,0,, 0 wQrqqpxxy −−==−==== φββφ

    022

    =−− CDdx

    dCDv

    dxCd α 0,,,, =−=−=== r

    Dq

    DvpxxCy α

    Note that p,q, and r can vary with x, and the models remain linear. Thus β, φ0, and Qw’ in the first model, and v, D, and α, in the second model, can also vary in x, for linear models.

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    122

    Then, from the text, Chapter 2.

    Not in the text’s Chapter 2: For a second-order homogeneous linear ODE (2) a boundary value problem consists of equation (2) taken over a finite interval, a ≤ x ≤ b, with two boundary conditions (BCs), one at each end of the interval. The boundary conditions can be written as

    b

    a

    KbylbylKaykayk

    =+=+

    )(')()(')(

    21

    21 (e)

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    123

    where the k’s and l’s are parameters, weighing the relative contribution of y and y’ at each boundary, and the K’s are values. For example, if you know the value of y at a, then k1 =1, k2 =0, and Ka is the value y(a). In PDEs this is called a first type or Dirichlet boundary. If you know the gradient of y at b, then then l1 =0, l2 =1, and Kb is the value y’(b). In PDEs this is called a second type or Neumann boundary. Finally, at a, if both k1 and k2 are non-zero it is called a third-type or Cauchy boundary in PDEs. All three boundary condition types are used to solve equations of the type given in (1). However, Chapter 2 of your textbook focuses on initial value problems for 2nd order ODEs. In hydrology these problems are less common than 2nd order BVPs, but they are very common in other areas of mathematical physics, like geophysics. Back to the text …

    Or for the BVP, the conditions in eqn. (e) on the previous page are used to determine the two constants, c1 and c2. Two conditions are needed as this is a 2nd order equation. In the IVPs these two initial conditions (4) are taken at the beginning of the domain, and in BVPs these two boundary conditions (e) are taken at each end of the domain. In either event, the general solution is given by (5).

    *

    *

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    124

    Reduction of Order (Section 2.1)

    Two

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    125

    Second-Order Linear ODEs with Constant Coefficients (Section 2.1)

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    126

    Two distinct real roots

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    127

    Real double root

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    128

    Two complex roots

    Summary 2nd order ODE with constant coefficients: ODE 0''' =++ byayy Characteristic eqn. 02 =++ λλλ ba

    where 4

    22 ab −=ω , and A, B, c1, and c2 are constants.

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    129

    Nonhomogeneous ODEs (Section 2.7)

    To solve the nonhomogeneous ODE (1), or an IVP or BVP for (1), we have to solve the homogeneous ODE (2) for a solution, and then find any solution yp of (1), to obtain a general solution (3) of equation (1). See the book for details and proofs of why this works. The method of undetermined coefficients There are more general methods to find yp, but we will focus on a simple method that works for most problems that you are likely to encounter. The more general method is Variation of Parameters, and is discussed in §2.20 (not covered in lecture). The simpler, but restricted method is called the Method of Undetermined Coefficients. The basic idea is to guess all possible terms in the solution yp, then solve for their coefficients, term by term, to satisfy (1). The result is yp. The guess consists of sums of terms like those in r(x). This works only if r(x) is composed of terms involving simple functions, in particular powers of x, trigonometric functions, and exponentials, or their products:

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    130

    Your book appears to neglect products, but you can handle products of the basic functions in the first column of Table 2.1. You just apply the modification and sum rules to the product.

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    131

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    132

    Equidimensional ODEs (Section 2.5)

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    133

    Series Solutions (Chap. 5) So far we’ve examined the general class of linear second-order ODEs which your book writes as (1) )()(')('' xryxqyxpy =++ where r is the forcing, and parameters p, q, and r do NOT depend on the dependent variable, y, but can depend on the independent variable, x. The methods we’ve examined have considered relatively simple and special functions for the parameters, but what happens if the parameters have more complicated form? If r(x) is more complicated than can be handled by the Method of Undetermined Coefficients (§2.7) then we typically resort to the Method of Variation of Parameters (§2.10), which we have not covered in glass. But there is another method that works very well in this case called LaPlace Transforms (Chap 6) which we use on 1st and 2nd order linear equations, and which is very versatile. It even gives the particular solution right away without solving for the homogeneous solutions first as an intermediate step. We’ll come back to it later, when we study PDEs. There is another method we use if p(x) and q(x) have more complex functional form, and its particularly valuable for BVPs. In this approach we resort to series solutions. We know that we can approximate functions by series. The idea is to assume that the solution is written as a power series, to plug that series into the equation, and to equate sums of coefficients of equal power to zero, solving for the coefficients in the power series. For a second order equation each coefficient can be written terms of another coefficient, resulting in a recurrence relation, for the coefficients, and leaving only two underdetermined coefficients to be resolved by boundary or initial conditions. Often the series solutions are represented by special functions, with new functional names, such as the Bessel Function of first type of order zero. Certain forms of 2nd order ODEs occur often in mathematical physics, engineering, and hydrology. The series solutions for these problems have been worked out in detail, and are typically represented by the special functions. It is useful to learn to recognize them or, at least, to know that you should look to see if the equation you are dealing with is of one of these types. For example, if you have a problem in radial flow, such as in groundwater well hydraulics, Bessel Equations are common, while Legendre Equations are common in spherical flow or solute diffusion within a particle, like a “spherical” microporous feldspar grain. Later we’ll see that the methods can be combined to solve PDEs. For example, consider a transient groundwater flow problem that is one-dimension in space. It can be LaPlace Transformed in time, to remove time and reduce it to an ODE in space, which is solved by one of the methods we have been studying. An example is radial flow to a pumping well in an infinite, leaky confined aquifer. After the LaPlace Transform in time, the resulting ODE (in LaPlace Space) is a Bessel Equation, for which one can look up and apply the solution.

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    134

    The series solution approach, background from the text (p. 168):

    The text then goes on in §5.2 to talk about theory. If the series converges everywhere, the function is said to be analytic. If it diverges in certain locations those are called singularities. A

    simple example is a divide by zero. The function and its derivatives must converge to be analytic. Convergence is defined in the usual ways, e.g., by comparing successive terms in the series. Series solutions for analytical functions are straight-forward, it is all the special cases involving singularities that make solving a problem difficult. For certain of these more complicated equations the Method of Frobenius (§5.4) is particularly useful. In any event, we won’t visit these cases or this method. You need to take a course in ODEs, although you could also self-learn from the text, which is very clear on these subjects. Let’s take a closer look at the special case of Bessel’s Equation, which is well known and often encountered in hydrology. From the text, p. 189 (§5.5):

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    135

    Bessel’s equation can be solved by the Method of Frobenius (see text, p. 189) …

    Etc …, leading to (p. 202, §5.6):

  • New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology

    136