Sei sulla pagina 1di 5
6 Galerkin’s Method Wis ncesary to salve differential equations, (Newton) eally like to be he sternal novi, for then ony, he surprises ‘woul be endloe. (Keith Jaret) In Chapters 8 and 5, we discussed the mumesical solution of the sim: ple inital value problem w'(z) = f(a) for a < 2 < band w(a) = voy {sing piecewise polynomial approximation. In this chapter, we intro- ‘hace Golerkin's method for solving a general difeential equation, which fs based on secking an (approximate) solution ina (inite-dimensional) ‘pace spanned by a set of basis functions which are easy to differentiate and integrate, together with an orthogonality condition determining the oefcients or coordinates in the given basis. With a faite number of thas functions, Galerkin’s method leads to a system of equations with finitely many unknowns which may be solved using a computer, and ‘which produces an approximate solution. Inereasing the number of be- tds functions improves the approximation so that in the limit the exact folution may be expressed ae aa infinite series, In this book, we normally tse Galerkin’s method in the computational form with a finite number of bas fanctions. ‘The basis funetions may be global polynomials, pete ‘vise polynomials, trigonometsie plynomials or other funetions. ‘The {nite element method in base form ie Galerkin's method with piecewise polynomial approximation. In this chapter, we apply Galerkin's method fo two examples with a vatiety of bass functions. The frst example is fa inital value problem that models population growth and we wae & {lobal polynomial approximation. ‘The second example is « boundary 105 value problem that models the low’ of het in a wire and we use piecewise polynomial approximation, more precisely plecowise linear approxims- tion. This is a clasie example of the finite element method. Por the second example, we also discus the spectral method whichis Galorkn's ‘method with trigonometric polynomials ‘The idea of seeking a solution of «differential equation as a tinear combination of simpler basis fonctions, is old. Newton and Lagrange ‘ved power series with global polynomials and Fourier and Riemann used Fourier series based on trigonometric polynomials. These approaches ‘work for certain differential equations posed on domains with simple ge- ‘metry and may give valuable qualitative information, but cannot be sed for most of the problems arising in applications.” ‘The finite ele rent method baved on piecewise polynomials opens the possibilty of solving general diferential equations in general geometry using a com: pater, For some problems, combinations of trigonometric and piecewise polynomials may be sed, 6.1, Galerkin's method with global polynomials A population model In the simplest model for the growth of a population, like the population ‘of rabbits in West Virginia, the rate of growth of the population is proportional to the popslation itself. In this mode we ignore the effects of predators, overcrowding, and migration, for example, which might be ‘kay for a short time provided the population of rabbits is relatively small in the beginning. We assume that the time unit is chosen so that the model i valid on the time interval (0,1). We will consider more realistic models valid for longer intervals later inthe book. If u(t) denotes the population at tne then the diforental equation expressing the simple model is @(@) = Au(2), where d isa positive real constant and = du/dt, This equation is usually posed together with an initial Condition (0) = w at time zero, in the form ofan intial value problem: dal?) ford 0. 6.1.2. Galerkin's method Wie now show how to compute a polynomial approximation U of in the set of polynomials Vi) = P%(0,1) on (0,1 of degre at most g us ing Galekin's method, We know there aze good approximations of the solution vin this set, for example the Taylor polynomial and interpo Tating polynomials, but these require knowledge of wor derivatives of ‘vat certain points in [0,1]. The goal here isto compute a polynomial approtmation of « sing only the information tha u solves a specified Alifereatal equation aad has a specified value atone point, We shall se that this is precisely what Galerkin’ method achieves, Since we already Jinow the analytic solution in this model case, we can ws this knowledge toevaluate the acuracy ofthe approximation i a bass for V1), we ean write U(0) = T3968 where the eoefcients € © Rare to be determined. It is natural to eaulte that U/(0) = ao, that i = wa, so we may write vO=4+ LEH, where the unknown part” of U, namely Sr}. 60 is in the subypace of V) consisting of the functions in V') that are zero at & ie. in Vf" = (0:0 € VO, v(0)= 0} Problem 6.1. Prove that Uti subspace of V0 Wie determine the confiients by regiring U to satisfy the differential equation in (6.1) in suitable “average” sense. Of course U can't satity ‘the dfereatial equation at every point because the exact soltion is ‘ot a polynomial, Tn Chapter 4, we gave @ concrete moaning to the notion that function be zero on average by requiring the function to be orthogonal toa chosen subspace of functions. The Galerkin method is based on this idea, We define the residual error ofa function » for ‘the equation (6.1) by Roe) = 8) — 260. 4. Gaeri's Method 107 ‘The residual error R(o(0)) isa funetion oft once vis specified. R(o()) measures how well» satises the diferential equation at time t. Ifthe residual is identically zero, that ia R(o(t)) = 0 forall #1, then the ‘equation is satisfied and v isthe solution. Since the exact soltion wis not a polynomial, the residual eror of function in V!) that satisies ‘he intial condition is mover identically zero though it can be zero at Aistnet points, ‘The Galerkin approximation U is the function in V4 satisfying {Y(0) = wo such that its residual eror R(U (2) i orthogonal to all func tions in Vf, Le, for all v € v4. 02) ‘This isthe Galerkin orthogonality property of Vor rather ofthe residual WU). Since the colic f U with respec othe bas faction for Vis already known (Go = uo), we tequite (6.2) to hold nly for functions v in ¥{". By way of eomparson, note thatthe true solution satisfies a stronger orthogonality condition, namely [eo rneae We fer to th et of functons where we wk the Galerkin solution in this case the space V0 of polynomials w satsjing w(0) = wo; a8 the tril opace and the space of the unions aed forthe orthogonality condition, which is V{*), asthe test space. In this case, the trial and test space ae difret cae of the non-homegneous initia coudion (0) = wy (assuming wo #0), sls by the tial uncions and the homogeneous boundary condition v(0) = Oats bythe et faneions © V@. In general, diferent methods ae obtained choosing the tril fd tet space in dire way, [nvomoae [00 se {or al functions v. (6a) 6.1.8. The discrete system of equations We now show that (6.2) gives an invertible system of linear algebraic ‘equations for the coeficants of U- Substituting the expansion for U 105 6, Galerin's Method into (6.2) gives [ (Senator) e()@=0 fora ve vee 1 sufices to insure that this equation holds for every basis function for 1, yielding the st of equations: Sie [orange [ota re [te « where we have moved the terms iavolving the inital data to the right hand side, Computing the intograls gives LG "This is a qx q system of equations that has a unique solution if the rmateix A= (a3) with coeficients A-4, aT is invertible, It is possible to prove that this isthe case, though i father tedious and we skip the details. In the specific ease ug ‘nd g= 8, the approximation I ay ii U() = 1+ Lastse+ 387032 + 017240, which we obtain solving a8 x8 system. ‘Problem 6.2. Compute the Galerkin appraaiation for ¢= 1,28, and {Cowan hat Plotting the slution and the approximation for te thatthe fo essentially coincide Since we know the exact solution u in this ease, it is natural to compare the accaracy of U to other approximations of in V@). In Tig. 6:2, we plot the errors of U, the third degree polynomial iterpo- lating w at 0, 1/3,2/3, and 1, and the third dagree Taylor polynomial 3 in Fig. 6, we 5. Gaeri's Method 109 igure 0.1: The solation of t = w and the third degree Galerkin ap- proximation Figure 0.2: The errors of the third degree Galeria approximation, & third degree interpola of the solution, and the third de- roe Taylor polynomial ofthe solution ‘of w computed at £ = 0, ‘The error of U compares favorably with the ‘rtor ofthe interpolant of U and both of these are more accurate than the Taylor polynomial of win the region near ¢= 1 as we would expect. ‘We emphasize thatthe Galerkin approximation U attains this accuracy without any specific knowledge ofthe solution u except the inital data at the expense of solving a linear system of equations. Problem 6.2, Compute the £01) projetion into P%(0,1) of the exact solution and compare to Problean 6.4, Determine the dzrte equtios if the test space is hanged to VY,