Outline. 1 Boundary Value Problems. 2 Numerical Methods for BVPs. Boundary Value Problems Numerical Methods for BVPs

Size: px
Start display at page:

Download "Outline. 1 Boundary Value Problems. 2 Numerical Methods for BVPs. Boundary Value Problems Numerical Methods for BVPs"

Transcription

1 Boundary Value Problems Numerical Methods for BVPs Outline Boundary Value Problems 2 Numerical Methods for BVPs Michael T. Heath Scientific Computing 2 / 45

2 Boundary Value Problems Numerical Methods for BVPs Boundary Value Problems Boundary Values Existence and Uniqueness Conditioning and Stability Side conditions prescribing solution or derivative values at specified points are required to make solution of ODE unique For initial value problem, all side conditions are specified at single point, say t 0 For boundary value problem (BVP), side conditions are specified at more than one point kth order ODE, or equivalent first-order system, requires k side conditions For ODEs, side conditions are typically specified at endpoints of interval [a, b], so we have two-point boundary value problem with boundary conditions (BC) at a and b. Michael T. Heath Scientific Computing 3 / 45

3 ODEs: Boundary Value Problems in D Consider linear ODE of the form Lũ = f(x), with ũ(x) satisfyinggivenbcs. Here, we consider three basic approaches to find u ũ. Finite di erence methods (FDM): Essentially, approximate di erential equation at multiple points, x i, i =0,...,n. Note: we will use either n or n + points according to what makes the most sense in the given context. Collocation methods: Approximate the solution by an expansion, u(x) := nx u j j (x), j=0 Solve for coe cients u j such that the ODE is satisfied at a chosen set of collocation points, x i, along with the boundary conditions. That is, the residual, r(x) :=(Lũ Lu) isforcedtobezeroatx i, i =0,...,n.

4 Weighted residual technique (WRT): Approximate the solution by an expansion, nx u(x) := u j j (x), j=0 and solve for coe cients u j such that the ODE is satisfied in some weighted sense. That is, rather than enforcing r(x) = 0 at isolated points, we require r(x) tobe orthogonal to a set of weight functions, i (x): Z b Z b a i(x) r(x) dx = a i(x) L(u) L(ũ) dx = 0, or Z b Z b a i(x) L(u) = a i(x) L(ũ) dx for i =0,,... Note that if i (x) = (x x i )(Diracdeltafunction),werecovercollocation. Most often, the test-space and trial space are the same: i := i. (Galerkin case.) Finite element, spectral, spectral element methods are examples of WRTs. WRTs have many advantages over collocation in terms of flexibility of basis functions, application of boundary conditions, etc., and are generally preferred over collocation.

5 Boundary Value Problems Numerical Methods for BVPs Finite Difference Method Shooting Method Finite Difference Method Collocation Method Galerkin Method Finite difference method converts BVP into system of algebraic equations by replacing all derivatives with finite difference approximations For example, to solve two-point BVP u 00 = f(t, u, u 0 ), a < t < b with BC u(a) =, u(b) = we introduce mesh points t i = a + ih, i =0,,...,n+, where h =(b a)/(n + ) We already have y 0 = u(a) = and y n+ = u(b) = from BC, and we seek approximate solution value y i u(t i ) at each interior mesh point t i, i =,...,n Michael T. Heath Scientific Computing 20 / 45

6 Boundary Value Problems Numerical Methods for BVPs Shooting Method Finite Difference Method Collocation Method Galerkin Method Finite Difference Method, continued We replace derivatives by finite difference approximations such as u 0 (t i ) y i+ y i 2h u 00 (t i ) y i+ 2y i + y i h 2 This yields system of equations y i+ 2y i + y i h 2 = f t i,y i, y i+ y i 2h to be solved for unknowns y i, i =,...,n System of equations may be linear or nonlinear, depending on whether f is linear or nonlinear Michael T. Heath Scientific Computing 2 / 45

7 Boundary Value Problems Numerical Methods for BVPs Shooting Method Finite Difference Method Collocation Method Galerkin Method Finite Difference Method, continued We replace derivatives by finite difference approximations such as u 0 (t i ) y i+ y i 2h u 00 (t i ) y i+ 2y i + y i h 2 This yields system of equations y i+ 2y i + y i h 2 = f t i,y i, y i+ y i 2h to be solved for unknowns y i, i =,...,n Error is O(h 2 ) System of equations may be linear or nonlinear, depending on whether f is linear or nonlinear Michael T. Heath Scientific Computing 2 / 45 Error is O(h 2 )

8 Boundary Value Problems Numerical Methods for BVPs Shooting Method Finite Difference Method Collocation Method Galerkin Method Finite Difference Method, continued For these particular finite difference formulas, system to be solved is tridiagonal, which saves on both work and storage compared to general system of equations This is generally true of finite difference methods: they yield sparse systems because each equation involves few variables Michael T. Heath Scientific Computing 22 / 45

9 Example: Convection-Diffusion Equation d2 u dx 2 + cdu dx =, u(0) = u() = 0, Apply finite di erence: Lu = Au + Cu = f A = x C = c 2 x MATLAB EXAMPLE A is symmetric positive definite. C is skew-symmetric. L = A + C is neither SPD nor skew-symmetric.

10 Example: Convection-Diffusion Equation

11 Comments About Computing Error Norms Be careful with the l 2 vector norm! Even though max e i! 0 with n!, we can still have e grow with n. Why? When solving di erential equations, it is better to use norms that approximate their continuous counterparts. Thus e 2 = applez e = max e 2 dx 2 " n e max e i i The issue can also be resolved by measuring relative error: for some appropriate vector norm. error := e u Still, best to start with a norm that doesn t scale with n. nx i= e i 2 # 2

12 Convection-Diffusion Equation Consider D convection-di usion with c f u(0) = 0, u() = 0. Assume steady-state conditions u t =0 u xx + cu x =, u(0) = u() = 0. If =0,wehave: cu x =, u(0) = u() = 0??? Too many boundary conditions!

13 The issue is that Convection-Diffusion Equation! 0isasingular perturbation. This is true whenever the highest-order derivative is multiplied by a small constant. As the constant goes to zero, the number of boundary conditions changes. Here, We go from one boundary condition when =0, to two boundary conditions when > 0(evenfor ). An example that is not asingularperturbationis u xx + u x =, u(0) = u() = 0,! 0. This is called a regular perturbation.

14 Regular / Singular Perturbations You re Familiar With Consider solutions to the quadratic equation: ax 2 + bx + c =0. Example : x 2 + x = : Two roots as! 0. Regular perturbation. Example 2: x 2 + x = : x = 2 ± p +4 2 x = p+4 2 = O( 2 ) = + O( ). x 2 = 2 (2 + O( ))!. Singular perturbation.

15 Convection-Diffusion Equation Exact solution for our D model problem: u = x c L c apple e cx/ e cl/ = c apple x e c(x L)/ e cl/ e cl/. In the convection-dominated limit (cl ), one of these is computable in IEEE floating point, one is not. Which is which?

16 Convection-Diffusion Equation What happens when cl/º À in our numerical example?

17 Nonlinear Example: The Bratu Equation Consider D di usion with nonlinear right-hand side: d 2 u dx 2 = q(x, u) = e u, u(0) = u() = 0. Discretizing with finite di erences (say), Nonlinear system: Au = e u. f(u) = 0, f(u) = Au e u.

18 Newton s method: u k+ = u k + s k s k = J k f(u k ). J k ij k k j ith equation: nx f k = A i ij u k j e uk i! (J k ) ij i = A ij e u j j=. (J k ) -

19 If b = anda j =2 h 2 e u j, then 0 J = h 2 a b b a 2 b. b b b a n, C A At each iteration, modify the tridiagonal matrix A such that J k = A + e uk i ij, and solve this tridiagonal system in 8n operations.

20 bratua.m

21 Extension of Finite Difference to Variable Coefficients x j 2 x j+ 2 x j x j x j+ Figure : Grid spacing for variable coe cient di usion operator. Consider the one-dimesional model problem, Let d dx a(x)du dx with x i := ih, i =0,...,n+ and x i+ 2 = f(x), u(0) = u() = 0. (5) u i := u(x i ), a i+ 2 w i = d dx a(x)du dx xi h h := a(x i+ ). (6) 2 := (i + 2 ) h, i =0,...,n, and h := /(n + ). Then a du dx apple a i+ 2 x i+ 2 ui+ h u i a du dx a i 2 x i 2 5 (7) ui u i h. (8) 0

22 4 5 apple Extension of Finite Difference to Variable Coefficients Assuming u = 0 at the domain endpoints, then the finite di erence appoximation to u 0, i = i+ 2 0,...,n can be evaluated as the matrix-vector product, v = Du, whered is the (n + ) n finite di erence matrix illustrated below. v = 0 v 2 v 3 2. v n+ 2 C A 2 = h B u u 2. u n C A = Du. (9) Note that h (u i+ u i ) is generally regarded as a first-order accurate approximation to du dx,itisin fact second-order accurate at the midpoint x i+. 2 Given v i+, it remains to evaluate the outer finite di erence in (7), which maps data from the 2 (n + ) half-points to the n integer points. Let q i+ 2 := a i+ 2 v i+. (0) 2 Then w = 0 w w 2. C A 2 = 6 h q 2 q 3 2. C A = D T q. () w n q n+ 2

23 Extension of Finite Difference to Variable Coefficients Finally, note that if A is an (n + ) (n + ) diagonal matrix with entries (a 2,a3 2,...a n+ ), then 2 (0) can be expressed as q = Av, and the finite-di erence approximation (7) can be compactly expressed in matrix form as w = D T ADu (2) Assuming a i+ 2 > 0, it is easy to show that the matrix L := D T AD (3) is symmetric positive definite, which is a requirement if the system is to be solved with conjugate gradient iteration or Cholesky factorization. Fortunately, this property carries over into the multidimensional case, which we consider in the next section. We further remark that L is a map from data (u...u j...u n )to(w...w j...w n ). That is, once defined, it does not generate data at the half gridpoint locations. This is a particularly attractive feature in multiple space dimensions where having multiple grids leads to an explosion of notational di culties.

24 Convergence Behavior: Finite Difference In differential equations, we are interested in the rate of convergence i.e., the rate at which the error goes to zero vs. n, the number of unknowns in the system. For finite difference methods and methods using Lagrangian interpolants, n is the number of gridpoints (but, depends on the type of boundary conditions..) The next figure shows the error vs. n for a 2 nd -order (i.e., O(h 2 )) finite difference solution of the steady-state convection-diffusion equation in D. For n > ~ ² M -/3, the error goes up, due to round-off associated with the approximation to the 2 nd -order derivative. As we ve seen in past homework assignments, the minimum error is around ² M -/2

25 Finite Difference Convergence Rate Finite difference error ~ 50/n 2 round-off ~ º ²M n 2 50/n 2

26 Pros Properties of Finite Difference Methods Easy to formulate (for simple problems) Easy to analyze Easy to code Closed-form expressions for eigenvalues/eigenvectors for uniform grid with constant coefficients. Cons Geometric complexity for 2D/3D is not as readily handled as FEM. Difficult to extend to high-order (because of boundary conditions). Do not always (e.g., because of BCs) get a symmetric matrix for d 2 u dx 2 or d dx (x)du dx

27 Eigenvalues, Continuous and Discrete One of the great features of finite difference methods is that one can readily compute the eigenvalues of the discrete operators and thus understand their spectrum and convergence rates. The latter is important for understanding accuracy. The former is important for understanding stability of time-stepping schemes in the case of PDEs, which we ll see in the next chapter. The reason it is easy to find the eigenvalues for finite difference methods is that, for the constant coefficient case, they often share the same eigenfunctions as their continuous counterparts.

28 Eigenvalue Example: Consider the analytical (i.e., continuous) eigenvalue problem d 2 ũ dx 2 = ũ, ũ(0) = ũ() = 0. The eigenfunctions/eigenvalues for the continuous problem are ũ = sin(k x) : ũ 00 = k 2 2 sin(k x) = k 2 2 ũ = k ũ k = k 2 2 k= mode k=2 mode The modes are like the vibrations of a guitar string. Higher wavenumbers, k, correspond to higher frequency. Here, the k=2 mode would be a harmonic one octave higher.

29 Finite Di erence Eigenvectors/values: Consider s =[sin(k x j )] T : As j = = x 2 [sin k x j+ 2sink x j +sink x j ] x 2 [sin(k x j + x) 2sin(k x j )+sin(k x j x)] Use the identity: sin(a + b) = sina cos b + cosa sin b sin(k x j+ ) = sink x j cos k x + cosk x j sin k x sin(k x j ) = sink x j cos k x cos k x j sin k x sum = 2 sink x j cos k x As j = x 2 [s j+ 2s j + s j ] = x 2 [2 cos k x 2] sin k x j = k s j k = 2 [ cos k x]. x2

30 Eigenvalue Properties for u 00 = u, u(0) = u() = 0: max k Cn 2 n n 2 4 For k x, (with := k x): k = (k ) 2 apple (k x) k k

31 Boundary Value Problems Numerical Methods for BVPs Collocation Method Shooting Method Finite Difference Method Collocation Method Galerkin Method Collocation method approximates solution to BVP by finite linear combination of basis functions For two-point BVP u 00 = f(t, u, u 0 ), a < t < b with BC u(a) =, u(b) = we seek approximate solution of form nx u(t) v(t, x) = i= x i i (t) where i are basis functions defined on [a, b] and x is n-vector of parameters to be determined Michael T. Heath Scientific Computing 26 / 45

32 Boundary Value Problems Numerical Methods for BVPs Collocation Method, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method To determine vector of parameters x, define set of n collocation points, a = t < <t n = b, at which approximate solution v(t, x) is forced to satisfy ODE and boundary conditions Common choices of collocation points include equally-spaced points or Chebyshev points Suitably smooth basis functions can be differentiated analytically, so that approximate solution and its derivatives can be substituted into ODE and BC to obtain system of algebraic equations for unknown parameters x Michael T. Heath Scientific Computing 28 / 45

33 Collocation Collocation is essentially the method of undetermined coe cients. Start with. u(x) = nx j=0 û j j (x) Find coe cients û j such that BVP is satisfied at gridpoints x i. Instead of using monomials, j = x j, could use Lagrange polynomials on Chebyshev or Legendre quadrature points. Normally, one would use Gauss-Lobatto-Legendre or Gauss-Lobatto-Chebyshev points, which include ± (i.e., the endpoints of the interval) in the nodal set. If the solution is to be zero at those boundaries one would have u 0 = u n = 0. In many cases, these methods are exponentially convergent. (Counter-example: sines and cosines, unless problem is periodic.) For several reasons conditioning, symmetry, robustness, and ease of boundary condtions, collocation has lost favor to Galerkin methods.

34 Finite Difference Convergence Rate Finite difference error ~ 50/n 2 round-off ~ º ²M n 2 50/n 2

35 Convergence Behavior: High-Order Methods The 2 nd -order convergence of standard finite difference methods looks reasonable. However, higher-order methods are generally much faster in that the same error can be achieved with a lower n, once n is large enough for the asymptotic convergence behavior to apply. High-order methods suffer the same round-off issue, with error growing like ² M n 2. However, their truncation error goes to zero more rapidly so that the n where truncation and round-off errors balance is lower and the minimum error is thus much smaller. Usually, we are more interested in a small error at small n, rather than realizing the minimum possible error. For PDEs on an (n x n x n) grid cost generally scales as n 3, so a small n is a significant win.

36 Spectral Collocation vs. Finite Difference Finite difference error ~ 0/n 2 Legendre collocation round-off ~ º ²M n 2 0/n 2

37 Spectral Collocation vs. Finite Difference (semilogy) Finite difference error ~ 0/n 2 0/n 2 Legendre collocation round-off ~ º ²M n 2

38 Galerkin Method Boundary Value Problems Numerical Methods for BVPs Shooting Method Finite Difference Method Collocation Method Galerkin Method Rather than forcing residual to be zero at finite number of points, as in collocation, we could instead minimize residual over entire interval of integration For example, for Poisson equation in one dimension, u 00 = f(t), a < t < b, with homogeneous BC u(a) =0, u(b) =0, subsitute approx solution into ODE and define residual u(t) v(t, x) = P n i= x i i(t) r(t, x) =v 00 (t, x) f(t) = nx i= x i 00 i (t) f(t) Michael T. Heath Scientific Computing 33 / 45

39 Boundary Value Problems Numerical Methods for BVPs Galerkin Method, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method More generally, weighted residual method forces residual to be orthogonal to each of set of weight functions or test functions w i, Z b a r(t, x)w i (t) dt =0, i =,...,n This yields linear system Ax = b, where now a ij = Z b a 00 j (t)w i (t) dt, b i = Z b a f(t)w i (t) dt whose solution gives vector of parameters x Michael T. Heath Scientific Computing 35 / 45

40 Boundary Value Problems Numerical Methods for BVPs Galerkin Method, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method Matrix resulting from weighted residual method is generally not symmetric, and its entries involve second derivatives of basis functions Both drawbacks are overcome by Galerkin method, in which weight functions are chosen to be same as basis functions, i.e., w i = i, i =,...,n Orthogonality condition then becomes or Z b a Z b a r(t, x) i (t) dt =0, v 00 (t, x) i (t) dt = Z b a f(t) i (t) dt, i =,...,n i =,...,n Michael T. Heath Scientific Computing 36 / 45

41 Boundary Value Problems Numerical Methods for BVPs Galerkin Method, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method Degree of differentiability required can be reduced using integration by parts, which gives Z b a v 00 (t, x) i (t) dt = v 0 (t) i (t) b a Z b a = v 0 (b) i (b) v 0 (a) i (a) v 0 (t) 0 i(t) dt Z b a v 0 (t) 0 i(t) dt Assuming basis functions i satisfy homogeneous boundary conditions, so i (0) = i () = 0, orthogonality condition then becomes Z b a v 0 (t) 0 i(t) dt = Z b a f(t) i (t) dt, i =,...,n Michael T. Heath Scientific Computing 37 / 45

42 Boundary Value Problems Numerical Methods for BVPs Galerkin Method, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method This yields system of linear equations Ax = b, with a ij = Z b a 0 j(t) 0 i(t) dt, b i = Z b a f(t) i (t) dt whose solution gives vector of parameters x A is symmetric and involves only first derivatives of basis functions Michael T. Heath Scientific Computing 38 / 45

43 Boundary Value Problems Numerical Methods for BVPs Example: Galerkin Method Consider again two-point BVP u 00 =6t, Shooting Method Finite Difference Method Collocation Method Galerkin Method 0 <t<, with BC u(0) = 0, u() = We will approximate solution by piecewise linear polynomial, for which B-splines of degree ( hat functions) form suitable set of basis functions To keep computation to minimum, we again use same three mesh points, but now they become knots in piecewise linear polynomial approximation Michael T. Heath Scientific Computing 39 / 45

44 Boundary Value Problems Numerical Methods for BVPs Example, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method Thus, we seek approximate solution of form u(t) v(t, x) =x (t)+x 2 2 (t)+x 3 3 (t) From BC, we must have x =0and x 3 = To determine remaining parameter x 2, we impose Galerkin orthogonality condition on interior basis function 2 and obtain equation 3X Z Z 0 j(t) 0 2(t) dt x j = 6t 2 (t) dt j= 0 or, upon evaluating these simple integrals analytically 2x 4x 2 +2x 3 =3/2 0 Michael T. Heath Scientific Computing 40 / 45

45 Boundary Value Problems Numerical Methods for BVPs Example, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method Substituting known values for x and x 3 then gives x 2 =/8 for remaining unknown parameter, so piecewise linear approximate solution is u(t) v(t, x) = (t)+ 3 (t) We note that v(0.5, x) =0.25 Michael T. Heath Scientific Computing 4 / 45

46 Boundary Value Problems Numerical Methods for BVPs Example, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method More realistic problem would have many more interior mesh points and basis functions, and correspondingly many parameters to be determined Resulting system of equations would be much larger but still sparse, and therefore relatively easy to solve, provided local basis functions, such as hat functions, are used Resulting approximate solution function is less smooth than true solution, but nevertheless becomes more accurate as more mesh points are used < interactive example > Michael T. Heath Scientific Computing 42 / 45

47 Weighted Residual Example: d 2 ũ = f(x), ũ(0) = ũ() = 0. dx2 Trial function (n unknowns.) nx u(x) = u j j (x) 2 X0 N : j(0) = j () = 0, j=,..., n. j= Residual (w.r.t. u): r(u) := f + d2 u dx 2 Orthogonality condition: (v, r) := Z 0 vrdx = 0 8 v 2 X N 0.

48 Orthogonality condition: (v, r) := Z 0 vrdx = 0 8 v 2 X N 0. So, for i =,...,n, v = i (n equations): ( i,r) := Z 0 i rdx = 0 = Z 0 i f + d2 u dx 2 dx. Or, Z 0 i d 2 u dx 2 dx = Z 0 i fdx.

49 An important refinement: Z 0 i d 2 u dx 2 dx = Z 0 i fdx. We can avoid requiring existence of u 00 by interpolating the expression on the left by parts: I := Z 0 {z} i v 00 d 2 u dx = {z} dx 2 du 00 Z 0 du d i dx dx dx i du dx x= x=0 = Z 0 d i dx du dx dx ( i(0) = i () = 0 for these boundary conditions). Now the test and trial functions require only the existence of a first derivative. (Admits a larger search space for approximate solutions.)

50 Inserting the expansion for du dx : Z 0 d i dx du dx dx = Z 0 d i dx nx j= u j d j dx A dx = Z 0 i(x) f(x) dx =: b i. nx j= Z d i dx dx dx d j 0 {z } =:a ij u j = b i. In matrix form: Au = b 8 >< >: a ij := b i := Z 0 Z 0 d i dx d j dx dx = (d i dx, d j dx ) =: a( i, j). i fdx = ( i,f) We refer to a( i, j) asthea inner product.

51 Example: Linear Finite Elements in D Piecewise-linear basis functions, phi i (x), i =,...,n, x 2 =[0, ]: i(x) = x x i x i x i x 2 [x i,x i ] = x i+ x x i+ x i x 2 [x i,x i+ ] = 0, otherwise. d i dx = h i x 2 [x i,x i ] = h i+ x 2 [x i,x i+ ] = 0, otherwise.

52 Sti ness matrix entries: a ij = Z 0 d i dx d j dx dx = h i h 2 i + h i+ h 2 i+ j = i, = h i h 2 i j = i, = h i+ h 2 i+ = 0, otherwise. j = i +, For uniform gridspacing h, a ij = Z 0 d i dx d j dx dx = h

53 For the right-hand side, b i = Z 0 i fdx Z i 0 j=0 j(x)f j A dx = Xn+ j=0 b ij f j dx = Bf i. B is rectangular (mass matrix): B ij := Z 0 i j dx = 3 (h i + h j ) if j = i = 6 h i if j = i = 6 h i+ if j = i +

54 If h = n+ is uniform, the n (n +2)matrix B is, B = h The system to be solved is then Au = Bf.

55 Example: d 2 ũ =, u(0) = u() = 0. dx2 Exact solution: ũ = 2 x ( x). FEM solution with n =2,h = 3, Au = h " 2 2 # u u 2! = h " # C A 0 = A. 0 " # 0

56 @ A Solving for u: u u 2 A = " 2 2 # h 2 A. Recall, " a b c d # = ad bc " d b c a # = 3 " 2 2 # So, u u 2 A = 9 3 " 2 2 # A = 9 9 A.

57 Extensions: Variable coe cients Neuman boundary conditions High-order polynomial bases Best-fit property

58 Variable Coe cients Consider k(x) > 0forx 2 := [0, ], d dx k dũ dx = f, ũ(0) = ũ() = 0. WRT: find u 2 X0 N such that Z d v dx k du dx = dx Integrate by parts a(v, u) := Set v = i (x), u = P j j(x) u j, Z Z dv dx k du dx dx = vfdx 8 v 2 X N 0. Z vfdx. Au = Bf, a ij := Becasuse k>0, A is SPD. (!) Z 0 d i dx k d j dx dx.

59 Neumann Boundary Conditions Consider k(x) > 0forx 2 := [0, ], d dx k dũ dx = f, du ũ(0) = 0, =0. dx x= Now, include u = n+(x) asavalidbasisfunction: Xn+ j= j(x)u j, v = i (x), i =,...,n+. Integration by parts Z d v dx k du dx = dx = Set v = i (x), u = P j j(x) u j, Z Z dv dx k du dx dx dv dx k du dx dx = v du Z dx x= vfdx. v du dx x=0 Au = Bf, a ij := Z Same system! ( Natural boundary conditions) A is (n +) (n +) 0 d i dx k d j dx dx.

60

61 Weighted Residual Techniques (Galerkin, FEM,...) Consider Lũ = f, plus boundary conditions (e.g., Lũ = ũ xx + cũ x ). Recall collocation with Lagrangian basis functions j(x i )= ij : u(x) := nx j=0 u j j (x) r(x) := f Lu r(x i ) := f Lu =) f(x i ) [ u xx + cu x ] xi =0 Unknown basis coe cients, u j. Residual set to zero, point-wise, at interior points x i. Other two equations come from BCs.

62 For weighted residual technique (WRT), we insist that the residual be orthogonal to a family of test functions, Find u 2 X N 0 such that Z b a v (f Lu) dx = Z b a vrdx = 0 8v 2 Y N 0 Here, X0 N := span{ j } is the space of trial functions and Y0 N := span{ i } is the space of test functions. The relationship between collocation and WRT is analogous to the relationship between least squares and interpolation. One seeks a polynomial interpolant of degree n (say) and chooses it either in a weighted (i.e., LS / WRT ) or pointwise ( interpolation / collocation ) fashion. Two common choices for Y N 0 are i = (x x i ), the Dirac delta function, or i = i, (i.e., Y N 0 = X N 0 ), termed the Galerkin method. Galerkin is far more common. Dirac delta functions yield collocation, so we see that collocation is in fact a WRT.

63 We ll focus solely on the Galerkin case. Most common bases for X N 0 are Lagrange polynomials (on good point sets) Piecewise polynomials (FEM) typically still Lagrangian

64 Questions that arise: Implementation Cost (strongly dependent on number of space dimensions) Accuracy Spectrum Other (e.g., optimality)

65

66 Trial Solution and Residual

67 Trial Solution and Residual

68 WRT and Test Functions

69 Reducing Continuity to C0

70 Weighted Residual / Variational Formulation

71 Formulation of the Discrete Problem

72 Formulation of the Discrete Problem

73 Formulation of the Discrete Problem

74 Choice of Spaces & Bases The next step is to choose the space, X 0N, and associated basis { φ i }. The former influences convergence, i.e., How large or small n must be for a given error. The latter influences implementation, i.e., details and level of complexity, and performance (time to solution, for a given error)

75 Unstable and Stable Bases within the Elements Examples of unstable bases are: Monomials (modal): φ i = x i High-order Lagrange interpolants (nodal) on uniformly-spaced points. Examples of stable bases are: Orthogonal polynomials (modal), e.g., Legendre polynomials: L k (x), or bubble functions: φ k (x) := L k+ (x) L k- (x). Lagrange (nodal) polynomials based on Gauss quadrature points (e.g., Gauss-Legendre, Gauss-Chebyshev, Gauss-Lobatto-Legendre, etc.)

76 Piecewise Polynomial Bases: Linear and Quadratic Linear case results in A being tridiagonal (b.w. = ) Q: What is matrix bandwidth for piecewise quadratic case?

77 Lagrange Polynomials: Good and Bad Point Distributions N=4 N=7 N=8 φ 2 φ 4 Uniform Gauss-Lobatto-Legendre

78 Basis functions for N=, E=5 on element 3. x 0 Ω Ω 2 Ω 3 Ω 4 Ω 5

79 Basis functions for N=, E=5 on element 3. Ω Ω 2 Ω 3 Ω 4 Ω 5 Ω Ω 2 Ω 3 Ω 4 Ω 5

80 Ω 3 basis functions for N=2, E=5 Ω Ω 2 Ω 3 Ω 4 Ω 5

81 Ω 3 basis functions for N=3, E=5 Ω Ω 2 Ω 3 Ω 4 Ω 5

82 Important Properties of the Galerkin Formulation An essential property of the Galerkin formulation for the Poisson equation is that the solution is the best fit in the approximation space, with respect to the energy norm. Specifically, we consider the bilinear form, and associated semi-norm, which is in fact a norm for all u satisfying the boundary conditions. It is straightforward to show that our Galerkin solution, u, is the closest solution to the exact ũ in the a-norm. That is, u ũ a w ũ a for all w X 0 N In fact, u is closer to ũ than the interpolant of ũ.

83 Best Fit Property, /4

84 Best Fit Property, 2/4

85 Best Fit Property, 3/4

86 Best Fit Property 4/4

87 Best Fit Viewed as a Projection

88 Best Fit Property Summary A significant advantage of the WRT over collocation is that the choice of basis for a given space, X 0N, is immaterial you will get the same answer for any basis, modulo round-off considerations, because of the best fit property. That is, the choice of Á i influences the condition number of A, but would give the same answer (in inifinite-precision arithmetic) whether one used Lagrange polynomials on uniform points, Chebyshev points, or even monomial bases. This is not the case for collocation so WRT is much more robust. Of course, Lagrange polynomials on Chebyshev or Gauss-Lobatto- Legndre points are preferred from a conditioning standpoint.

89

90 Boundary Value Problems Numerical Methods for BVPs Eigenvalue Problems Shooting Method Finite Difference Method Collocation Method Galerkin Method Standard eigenvalue problem for second-order ODE has form u 00 = f(t, u, u 0 ), a < t < b with BC u(a) =, u(b) = where we seek not only solution u but also parameter Scalar (possibly complex) is eigenvalue and solution u is corresponding eigenfunction for this two-point BVP Discretization of eigenvalue problem for ODE results in algebraic eigenvalue problem whose solution approximates that of original problem Michael T. Heath Scientific Computing 43 / 45

91 Boundary Value Problems Numerical Methods for BVPs Example: Eigenvalue Problem Shooting Method Finite Difference Method Collocation Method Galerkin Method Consider linear two-point BVP with BC u 00 = g(t)u, a < t < b u(a) =0, u(b) =0 Introduce discrete mesh points t i in interval [a, b], with mesh spacing h and use standard finite difference approximation for second derivative to obtain algebraic system y i+ 2y i + y i h 2 = g i y i, i =,...,n where y i = u(t i ) and g i = g(t i ), and from BC y 0 = u(a) =0 and y n+ = u(b) =0 Michael T. Heath Scientific Computing 44 / 45

92 Boundary Value Problems Numerical Methods for BVPs Example, continued Shooting Method Finite Difference Method Collocation Method Galerkin Method Assuming g i 6=0, divide equation i by g i for i =,...,n, to obtain linear system Ay = y where n n matrix A has tridiagonal form 2 3 2/g /g 0 0. A = /g 2 2/g 2 /g.. 2. h /g n 2/g n /g n /g n 2/g n This standard algebraic eigenvalue problem can be solved by methods discussed previously Michael T. Heath Scientific Computing 45 / 45

93

PDEs, part 1: Introduction and elliptic PDEs

PDEs, part 1: Introduction and elliptic PDEs PDEs, part 1: Introduction and elliptic PDEs Anna-Karin Tornberg Mathematical Models, Analysis and Simulation Fall semester, 2013 Partial di erential equations The solution depends on several variables,

More information

Finite Difference Methods for Boundary Value Problems

Finite Difference Methods for Boundary Value Problems Finite Difference Methods for Boundary Value Problems October 2, 2013 () Finite Differences October 2, 2013 1 / 52 Goals Learn steps to approximate BVPs using the Finite Difference Method Start with two-point

More information

WRT in 2D: Poisson Example

WRT in 2D: Poisson Example WRT in 2D: Poisson Example Consider 2 u f on [, L x [, L y with u. WRT: For all v X N, find u X N a(v, u) such that v u dv v f dv. Follows from strong form plus integration by parts: ( ) 2 u v + 2 u dx

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

Outline. 1 Partial Differential Equations. 2 Numerical Methods for PDEs. 3 Sparse Linear Systems

Outline. 1 Partial Differential Equations. 2 Numerical Methods for PDEs. 3 Sparse Linear Systems Outline Partial Differential Equations Numerical Methods for PDEs Sparse Linear Systems 1 Partial Differential Equations 2 Numerical Methods for PDEs 3 Sparse Linear Systems Michael T Heath Scientific

More information

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation Outline Numerical Integration Numerical Differentiation Numerical Integration Numerical Differentiation 3 Michael T. Heath Scientific Computing / 6 Main Ideas Quadrature based on polynomial interpolation:

More information

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018 Numerical Analysis Preliminary Exam 1 am to 1 pm, August 2, 218 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim.

256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim. 56 Summary High order FD Finite-order finite differences: Points per Wavelength: Number of passes: D n f(x j ) = f j+n f j n n x df xj = m α m dx n D n f j j n= α m n = ( ) n (m!) (m n)!(m + n)!. PPW =

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 7 Interpolation Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted

More information

Numerical Methods for Partial Differential Equations

Numerical Methods for Partial Differential Equations Numerical Methods for Partial Differential Equations Eric de Sturler University of Illinois at Urbana-Champaign Read section 8. to see where equations of type (au x ) x = f show up and their (exact) solution

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

Finite difference method for elliptic problems: I

Finite difference method for elliptic problems: I Finite difference method for elliptic problems: I Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen

More information

PART IV Spectral Methods

PART IV Spectral Methods PART IV Spectral Methods Additional References: R. Peyret, Spectral methods for incompressible viscous flow, Springer (2002), B. Mercier, An introduction to the numerical analysis of spectral methods,

More information

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C. Lecture 9 Approximations of Laplace s Equation, Finite Element Method Mathématiques appliquées (MATH54-1) B. Dewals, C. Geuzaine V1.2 23/11/218 1 Learning objectives of this lecture Apply the finite difference

More information

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

More information

Question 9: PDEs Given the function f(x, y), consider the problem: = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1. x 2 u. u(x, 0) = u(x, 1) = 0 for 0 x 1

Question 9: PDEs Given the function f(x, y), consider the problem: = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1. x 2 u. u(x, 0) = u(x, 1) = 0 for 0 x 1 Question 9: PDEs Given the function f(x, y), consider the problem: 2 u x 2 u = f(x, y) 2 y2 for 0 < x < 1 and 0 < x < 1 u(x, 0) = u(x, 1) = 0 for 0 x 1 u(0, y) = u(1, y) = 0 for 0 y 1. a. Discuss how you

More information

Chapter 1: The Finite Element Method

Chapter 1: The Finite Element Method Chapter 1: The Finite Element Method Michael Hanke Read: Strang, p 428 436 A Model Problem Mathematical Models, Analysis and Simulation, Part Applications: u = fx), < x < 1 u) = u1) = D) axial deformation

More information

Finite-Elements Method 2

Finite-Elements Method 2 Finite-Elements Method 2 January 29, 2014 2 From Applied Numerical Analysis Gerald-Wheatley (2004), Chapter 9. Finite-Elements Method 3 Introduction Finite-element methods (FEM) are based on some mathematical

More information

PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9.

PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9. PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9.4) We will consider two cases 1. f(x) = 0 1-dimensional 2. f(x) = 0 d-dimensional

More information

Chapter 12. Partial di erential equations Di erential operators in R n. The gradient and Jacobian. Divergence and rotation

Chapter 12. Partial di erential equations Di erential operators in R n. The gradient and Jacobian. Divergence and rotation Chapter 12 Partial di erential equations 12.1 Di erential operators in R n The gradient and Jacobian We recall the definition of the gradient of a scalar function f : R n! R, as @f grad f = rf =,..., @f

More information

Simple Examples on Rectangular Domains

Simple Examples on Rectangular Domains 84 Chapter 5 Simple Examples on Rectangular Domains In this chapter we consider simple elliptic boundary value problems in rectangular domains in R 2 or R 3 ; our prototype example is the Poisson equation

More information

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation

Outline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation Outline Interpolation 1 Interpolation 2 3 Michael T. Heath Scientific Computing 2 / 56 Interpolation Motivation Choosing Interpolant Existence and Uniqueness Basic interpolation problem: for given data

More information

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES)

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES) LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES) RAYTCHO LAZAROV 1 Notations and Basic Functional Spaces Scalar function in R d, d 1 will be denoted by u,

More information

Index. C 2 ( ), 447 C k [a,b], 37 C0 ( ), 618 ( ), 447 CD 2 CN 2

Index. C 2 ( ), 447 C k [a,b], 37 C0 ( ), 618 ( ), 447 CD 2 CN 2 Index advection equation, 29 in three dimensions, 446 advection-diffusion equation, 31 aluminum, 200 angle between two vectors, 58 area integral, 439 automatic step control, 119 back substitution, 604

More information

Numerical Analysis Comprehensive Exam Questions

Numerical Analysis Comprehensive Exam Questions Numerical Analysis Comprehensive Exam Questions 1. Let f(x) = (x α) m g(x) where m is an integer and g(x) C (R), g(α). Write down the Newton s method for finding the root α of f(x), and study the order

More information

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends Lecture 3: Finite Elements in 2-D Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Finite Element Methods 1 / 18 Outline 1 Boundary

More information

Problem set 3: Solutions Math 207B, Winter Suppose that u(x) is a non-zero solution of the eigenvalue problem. (u ) 2 dx, u 2 dx.

Problem set 3: Solutions Math 207B, Winter Suppose that u(x) is a non-zero solution of the eigenvalue problem. (u ) 2 dx, u 2 dx. Problem set 3: Solutions Math 27B, Winter 216 1. Suppose that u(x) is a non-zero solution of the eigenvalue problem u = λu < x < 1, u() =, u(1) =. Show that λ = (u ) 2 dx u2 dx. Deduce that every eigenvalue

More information

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

An Introduction to Numerical Methods for Differential Equations. Janet Peterson An Introduction to Numerical Methods for Differential Equations Janet Peterson Fall 2015 2 Chapter 1 Introduction Differential equations arise in many disciplines such as engineering, mathematics, sciences

More information

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems Index A-conjugate directions, 83 A-stability, 171 A( )-stability, 171 absolute error, 243 absolute stability, 149 for systems of equations, 154 absorbing boundary conditions, 228 Adams Bashforth methods,

More information

Boundary Value Problems and Iterative Methods for Linear Systems

Boundary Value Problems and Iterative Methods for Linear Systems Boundary Value Problems and Iterative Methods for Linear Systems 1. Equilibrium Problems 1.1. Abstract setting We want to find a displacement u V. Here V is a complete vector space with a norm v V. In

More information

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

13 PDEs on spatially bounded domains: initial boundary value problems (IBVPs)

13 PDEs on spatially bounded domains: initial boundary value problems (IBVPs) 13 PDEs on spatially bounded domains: initial boundary value problems (IBVPs) A prototypical problem we will discuss in detail is the 1D diffusion equation u t = Du xx < x < l, t > finite-length rod u(x,

More information

INTRODUCTION TO PDEs

INTRODUCTION TO PDEs INTRODUCTION TO PDEs In this course we are interested in the numerical approximation of PDEs using finite difference methods (FDM). We will use some simple prototype boundary value problems (BVP) and initial

More information

Notes for CS542G (Iterative Solvers for Linear Systems)

Notes for CS542G (Iterative Solvers for Linear Systems) Notes for CS542G (Iterative Solvers for Linear Systems) Robert Bridson November 20, 2007 1 The Basics We re now looking at efficient ways to solve the linear system of equations Ax = b where in this course,

More information

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning

Interpolation. Chapter Interpolation. 7.2 Existence, Uniqueness and conditioning 76 Chapter 7 Interpolation 7.1 Interpolation Definition 7.1.1. Interpolation of a given function f defined on an interval [a,b] by a polynomial p: Given a set of specified points {(t i,y i } n with {t

More information

Weighted Residual Methods

Weighted Residual Methods Weighted Residual Methods Introductory Course on Multiphysics Modelling TOMASZ G. ZIELIŃSKI bluebox.ippt.pan.pl/ tzielins/ Institute of Fundamental Technological Research of the Polish Academy of Sciences

More information

From Completing the Squares and Orthogonal Projection to Finite Element Methods

From Completing the Squares and Orthogonal Projection to Finite Element Methods From Completing the Squares and Orthogonal Projection to Finite Element Methods Mo MU Background In scientific computing, it is important to start with an appropriate model in order to design effective

More information

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes Root finding: 1 a The points {x n+1, }, {x n, f n }, {x n 1, f n 1 } should be co-linear Say they lie on the line x + y = This gives the relations x n+1 + = x n +f n = x n 1 +f n 1 = Eliminating α and

More information

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic Applied Mathematics 205 Unit III: Numerical Calculus Lecturer: Dr. David Knezevic Unit III: Numerical Calculus Chapter III.3: Boundary Value Problems and PDEs 2 / 96 ODE Boundary Value Problems 3 / 96

More information

ON SPECTRAL METHODS FOR VOLTERRA INTEGRAL EQUATIONS AND THE CONVERGENCE ANALYSIS * 1. Introduction

ON SPECTRAL METHODS FOR VOLTERRA INTEGRAL EQUATIONS AND THE CONVERGENCE ANALYSIS * 1. Introduction Journal of Computational Mathematics, Vol.6, No.6, 008, 85 837. ON SPECTRAL METHODS FOR VOLTERRA INTEGRAL EQUATIONS AND THE CONVERGENCE ANALYSIS * Tao Tang Department of Mathematics, Hong Kong Baptist

More information

Finite Element Method for Ordinary Differential Equations

Finite Element Method for Ordinary Differential Equations 52 Chapter 4 Finite Element Method for Ordinary Differential Equations In this chapter we consider some simple examples of the finite element method for the approximate solution of ordinary differential

More information

Time-dependent variational forms

Time-dependent variational forms Time-dependent variational forms Hans Petter Langtangen 1,2 1 Center for Biomedical Computing, Simula Research Laboratory 2 Department of Informatics, University of Oslo Oct 30, 2015 PRELIMINARY VERSION

More information

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING C. Pozrikidis University of California, San Diego New York Oxford OXFORD UNIVERSITY PRESS 1998 CONTENTS Preface ix Pseudocode Language Commands xi 1 Numerical

More information

Numerical Methods. Elena loli Piccolomini. Civil Engeneering. piccolom. Metodi Numerici M p. 1/??

Numerical Methods. Elena loli Piccolomini. Civil Engeneering.  piccolom. Metodi Numerici M p. 1/?? Metodi Numerici M p. 1/?? Numerical Methods Elena loli Piccolomini Civil Engeneering http://www.dm.unibo.it/ piccolom elena.loli@unibo.it Metodi Numerici M p. 2/?? Least Squares Data Fitting Measurement

More information

Scientific Computing I

Scientific Computing I Scientific Computing I Module 8: An Introduction to Finite Element Methods Tobias Neckel Winter 2013/2014 Module 8: An Introduction to Finite Element Methods, Winter 2013/2014 1 Part I: Introduction to

More information

CHAPTER 4. Introduction to the. Heat Conduction Model

CHAPTER 4. Introduction to the. Heat Conduction Model A SERIES OF CLASS NOTES FOR 005-006 TO INTRODUCE LINEAR AND NONLINEAR PROBLEMS TO ENGINEERS, SCIENTISTS, AND APPLIED MATHEMATICIANS DE CLASS NOTES 4 A COLLECTION OF HANDOUTS ON PARTIAL DIFFERENTIAL EQUATIONS

More information

Mathematical Modeling using Partial Differential Equations (PDE s)

Mathematical Modeling using Partial Differential Equations (PDE s) Mathematical Modeling using Partial Differential Equations (PDE s) 145. Physical Models: heat conduction, vibration. 146. Mathematical Models: why build them. The solution to the mathematical model will

More information

INTRODUCTION TO FINITE ELEMENT METHODS

INTRODUCTION TO FINITE ELEMENT METHODS INTRODUCTION TO FINITE ELEMENT METHODS LONG CHEN Finite element methods are based on the variational formulation of partial differential equations which only need to compute the gradient of a function.

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

Numerical Analysis of Electromagnetic Fields

Numerical Analysis of Electromagnetic Fields Pei-bai Zhou Numerical Analysis of Electromagnetic Fields With 157 Figures Springer-Verlag Berlin Heidelberg New York London Paris Tokyo Hong Kong Barcelona Budapest Contents Part 1 Universal Concepts

More information

. (a) Express [ ] as a non-trivial linear combination of u = [ ], v = [ ] and w =[ ], if possible. Otherwise, give your comments. (b) Express +8x+9x a

. (a) Express [ ] as a non-trivial linear combination of u = [ ], v = [ ] and w =[ ], if possible. Otherwise, give your comments. (b) Express +8x+9x a TE Linear Algebra and Numerical Methods Tutorial Set : Two Hours. (a) Show that the product AA T is a symmetric matrix. (b) Show that any square matrix A can be written as the sum of a symmetric matrix

More information

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 28 PART II Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 29 BOUNDARY VALUE PROBLEMS (I) Solving a TWO

More information

A note on accurate and efficient higher order Galerkin time stepping schemes for the nonstationary Stokes equations

A note on accurate and efficient higher order Galerkin time stepping schemes for the nonstationary Stokes equations A note on accurate and efficient higher order Galerkin time stepping schemes for the nonstationary Stokes equations S. Hussain, F. Schieweck, S. Turek Abstract In this note, we extend our recent work for

More information

FINITE-DIMENSIONAL LINEAR ALGEBRA

FINITE-DIMENSIONAL LINEAR ALGEBRA DISCRETE MATHEMATICS AND ITS APPLICATIONS Series Editor KENNETH H ROSEN FINITE-DIMENSIONAL LINEAR ALGEBRA Mark S Gockenbach Michigan Technological University Houghton, USA CRC Press Taylor & Francis Croup

More information

The method of lines (MOL) for the diffusion equation

The method of lines (MOL) for the diffusion equation Chapter 1 The method of lines (MOL) for the diffusion equation The method of lines refers to an approximation of one or more partial differential equations with ordinary differential equations in just

More information

Chapter 10. Function approximation Function approximation. The Lebesgue space L 2 (I)

Chapter 10. Function approximation Function approximation. The Lebesgue space L 2 (I) Capter 1 Function approximation We ave studied metods for computing solutions to algebraic equations in te form of real numbers or finite dimensional vectors of real numbers. In contrast, solutions to

More information

Finite Difference and Finite Element Methods

Finite Difference and Finite Element Methods Finite Difference and Finite Element Methods Georgy Gimel farb COMPSCI 369 Computational Science 1 / 39 1 Finite Differences Difference Equations 3 Finite Difference Methods: Euler FDMs 4 Finite Element

More information

AND NONLINEAR SCIENCE SERIES. Partial Differential. Equations with MATLAB. Matthew P. Coleman. CRC Press J Taylor & Francis Croup

AND NONLINEAR SCIENCE SERIES. Partial Differential. Equations with MATLAB. Matthew P. Coleman. CRC Press J Taylor & Francis Croup CHAPMAN & HALL/CRC APPLIED MATHEMATICS AND NONLINEAR SCIENCE SERIES An Introduction to Partial Differential Equations with MATLAB Second Edition Matthew P Coleman Fairfield University Connecticut, USA»C)

More information

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9 Spring 2015 Lecture 9 REVIEW Lecture 8: Direct Methods for solving (linear) algebraic equations Gauss Elimination LU decomposition/factorization Error Analysis for Linear Systems and Condition Numbers

More information

Waves on 2 and 3 dimensional domains

Waves on 2 and 3 dimensional domains Chapter 14 Waves on 2 and 3 dimensional domains We now turn to the studying the initial boundary value problem for the wave equation in two and three dimensions. In this chapter we focus on the situation

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Solving Boundary Value Problems (with Gaussians)

Solving Boundary Value Problems (with Gaussians) What is a boundary value problem? Solving Boundary Value Problems (with Gaussians) Definition A differential equation with constraints on the boundary Michael McCourt Division Argonne National Laboratory

More information

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS Victor S. Ryaben'kii Semyon V. Tsynkov Chapman &. Hall/CRC Taylor & Francis Group Boca Raton London New York Chapman & Hall/CRC is an imprint of the Taylor

More information

Finite difference method for solving Advection-Diffusion Problem in 1D

Finite difference method for solving Advection-Diffusion Problem in 1D Finite difference method for solving Advection-Diffusion Problem in 1D Author : Osei K. Tweneboah MATH 5370: Final Project Outline 1 Advection-Diffusion Problem Stationary Advection-Diffusion Problem in

More information

arxiv: v1 [math.na] 1 May 2013

arxiv: v1 [math.na] 1 May 2013 arxiv:3050089v [mathna] May 03 Approximation Properties of a Gradient Recovery Operator Using a Biorthogonal System Bishnu P Lamichhane and Adam McNeilly May, 03 Abstract A gradient recovery operator based

More information

Preliminary Examination, Numerical Analysis, August 2016

Preliminary Examination, Numerical Analysis, August 2016 Preliminary Examination, Numerical Analysis, August 2016 Instructions: This exam is closed books and notes. The time allowed is three hours and you need to work on any three out of questions 1-4 and any

More information

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically Finite difference and finite element methods Lecture 1 Scope of the course Analysis and implementation of numerical methods for pricing options. Models: Black-Scholes, stochastic volatility, exponential

More information

An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations.

An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations. An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations by Tong Chen A thesis submitted in conformity with the requirements

More information

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Taylor s Theorem Can often approximate a function by a polynomial The error in the approximation

More information

Numerical Mathematics

Numerical Mathematics Alfio Quarteroni Riccardo Sacco Fausto Saleri Numerical Mathematics Second Edition With 135 Figures and 45 Tables 421 Springer Contents Part I Getting Started 1 Foundations of Matrix Analysis 3 1.1 Vector

More information

Generalised Summation-by-Parts Operators and Variable Coefficients

Generalised Summation-by-Parts Operators and Variable Coefficients Institute Computational Mathematics Generalised Summation-by-Parts Operators and Variable Coefficients arxiv:1705.10541v [math.na] 16 Feb 018 Hendrik Ranocha 14th November 017 High-order methods for conservation

More information

Numerical Methods I Orthogonal Polynomials

Numerical Methods I Orthogonal Polynomials Numerical Methods I Orthogonal Polynomials Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course G63.2010.001 / G22.2420-001, Fall 2010 Nov. 4th and 11th, 2010 A. Donev (Courant Institute)

More information

Preliminary Examination in Numerical Analysis

Preliminary Examination in Numerical Analysis Department of Applied Mathematics Preliminary Examination in Numerical Analysis August 7, 06, 0 am pm. Submit solutions to four (and no more) of the following six problems. Show all your work, and justify

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Numerical Methods for Partial Differential Equations Finite Difference Methods

More information

Chapter 5 HIGH ACCURACY CUBIC SPLINE APPROXIMATION FOR TWO DIMENSIONAL QUASI-LINEAR ELLIPTIC BOUNDARY VALUE PROBLEMS

Chapter 5 HIGH ACCURACY CUBIC SPLINE APPROXIMATION FOR TWO DIMENSIONAL QUASI-LINEAR ELLIPTIC BOUNDARY VALUE PROBLEMS Chapter 5 HIGH ACCURACY CUBIC SPLINE APPROXIMATION FOR TWO DIMENSIONAL QUASI-LINEAR ELLIPTIC BOUNDARY VALUE PROBLEMS 5.1 Introduction When a physical system depends on more than one variable a general

More information

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs AM 205: lecture 14 Last time: Boundary value problems Today: Numerical solution of PDEs ODE BVPs A more general approach is to formulate a coupled system of equations for the BVP based on a finite difference

More information

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA Introduction to Finite and Spectral Element Methods Using MATLAB Second Edition C. Pozrikidis University of Massachusetts Amherst, USA (g) CRC Press Taylor & Francis Group Boca Raton London New York CRC

More information

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs Chapter Two: Numerical Methods for Elliptic PDEs Finite Difference Methods for Elliptic PDEs.. Finite difference scheme. We consider a simple example u := subject to Dirichlet boundary conditions ( ) u

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

The Fourier spectral method (Amath Bretherton)

The Fourier spectral method (Amath Bretherton) The Fourier spectral method (Amath 585 - Bretherton) 1 Introduction The Fourier spectral method (or more precisely, pseudospectral method) is a very accurate way to solve BVPs with smooth solutions on

More information

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

x n+1 = x n f(x n) f (x n ), n 0. 1. Nonlinear Equations Given scalar equation, f(x) = 0, (a) Describe I) Newtons Method, II) Secant Method for approximating the solution. (b) State sufficient conditions for Newton and Secant to converge.

More information

Chapter 7 Iterative Techniques in Matrix Algebra

Chapter 7 Iterative Techniques in Matrix Algebra Chapter 7 Iterative Techniques in Matrix Algebra Per-Olof Persson persson@berkeley.edu Department of Mathematics University of California, Berkeley Math 128B Numerical Analysis Vector Norms Definition

More information

9. Iterative Methods for Large Linear Systems

9. Iterative Methods for Large Linear Systems EE507 - Computational Techniques for EE Jitkomut Songsiri 9. Iterative Methods for Large Linear Systems introduction splitting method Jacobi method Gauss-Seidel method successive overrelaxation (SOR) 9-1

More information

Iterative Methods for Linear Systems

Iterative Methods for Linear Systems Iterative Methods for Linear Systems 1. Introduction: Direct solvers versus iterative solvers In many applications we have to solve a linear system Ax = b with A R n n and b R n given. If n is large the

More information

The Conjugate Gradient Method

The Conjugate Gradient Method The Conjugate Gradient Method Classical Iterations We have a problem, We assume that the matrix comes from a discretization of a PDE. The best and most popular model problem is, The matrix will be as large

More information

Preface. 2 Linear Equations and Eigenvalue Problem 22

Preface. 2 Linear Equations and Eigenvalue Problem 22 Contents Preface xv 1 Errors in Computation 1 1.1 Introduction 1 1.2 Floating Point Representation of Number 1 1.3 Binary Numbers 2 1.3.1 Binary number representation in computer 3 1.4 Significant Digits

More information

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V Part I: Introduction to Finite Element Methods Scientific Computing I Module 8: An Introduction to Finite Element Methods Tobias Necel Winter 4/5 The Model Problem FEM Main Ingredients Wea Forms and Wea

More information

Accuracy, Precision and Efficiency in Sparse Grids

Accuracy, Precision and Efficiency in Sparse Grids John, Information Technology Department, Virginia Tech.... http://people.sc.fsu.edu/ jburkardt/presentations/ sandia 2009.pdf... Computer Science Research Institute, Sandia National Laboratory, 23 July

More information

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2. APPENDIX A Background Mathematics A. Linear Algebra A.. Vector algebra Let x denote the n-dimensional column vector with components 0 x x 2 B C @. A x n Definition 6 (scalar product). The scalar product

More information

Introduction. Chapter One

Introduction. Chapter One Chapter One Introduction The aim of this book is to describe and explain the beautiful mathematical relationships between matrices, moments, orthogonal polynomials, quadrature rules and the Lanczos and

More information

Review for Exam 2 Ben Wang and Mark Styczynski

Review for Exam 2 Ben Wang and Mark Styczynski Review for Exam Ben Wang and Mark Styczynski This is a rough approximation of what we went over in the review session. This is actually more detailed in portions than what we went over. Also, please note

More information

2.4 Eigenvalue problems

2.4 Eigenvalue problems 2.4 Eigenvalue problems Associated with the boundary problem (2.1) (Poisson eq.), we call λ an eigenvalue if Lu = λu (2.36) for a nonzero function u C 2 0 ((0, 1)). Recall Lu = u. Then u is called an eigenfunction.

More information

1 Separation of Variables

1 Separation of Variables Jim ambers ENERGY 281 Spring Quarter 27-8 ecture 2 Notes 1 Separation of Variables In the previous lecture, we learned how to derive a PDE that describes fluid flow. Now, we will learn a number of analytical

More information

An Analysis of Five Numerical Methods for Approximating Certain Hypergeometric Functions in Domains within their Radii of Convergence

An Analysis of Five Numerical Methods for Approximating Certain Hypergeometric Functions in Domains within their Radii of Convergence An Analysis of Five Numerical Methods for Approximating Certain Hypergeometric Functions in Domains within their Radii of Convergence John Pearson MSc Special Topic Abstract Numerical approximations of

More information

Differential Equations 2280 Sample Midterm Exam 3 with Solutions Exam Date: 24 April 2015 at 12:50pm

Differential Equations 2280 Sample Midterm Exam 3 with Solutions Exam Date: 24 April 2015 at 12:50pm Differential Equations 228 Sample Midterm Exam 3 with Solutions Exam Date: 24 April 25 at 2:5pm Instructions: This in-class exam is 5 minutes. No calculators, notes, tables or books. No answer check is

More information

1 Piecewise Cubic Interpolation

1 Piecewise Cubic Interpolation Piecewise Cubic Interpolation Typically the problem with piecewise linear interpolation is the interpolant is not differentiable as the interpolation points (it has a kinks at every interpolation point)

More information

Lecture 24: Starting to put it all together #3... More 2-Point Boundary value problems

Lecture 24: Starting to put it all together #3... More 2-Point Boundary value problems Lecture 24: Starting to put it all together #3... More 2-Point Boundary value problems Outline 1) Our basic example again: -u'' + u = f(x); u(0)=α, u(l)=β 2) Solution of 2-point Boundary value problems

More information

Kasetsart University Workshop. Multigrid methods: An introduction

Kasetsart University Workshop. Multigrid methods: An introduction Kasetsart University Workshop Multigrid methods: An introduction Dr. Anand Pardhanani Mathematics Department Earlham College Richmond, Indiana USA pardhan@earlham.edu A copy of these slides is available

More information

Course and Wavelets and Filter Banks

Course and Wavelets and Filter Banks Course 18.327 and 1.130 Wavelets and Filter Bans Numerical solution of PDEs: Galerin approximation; wavelet integrals (projection coefficients, moments and connection coefficients); convergence Numerical

More information