Topic
Local Truncation Error and Global Error
Courses
Courses whose questions include this topic tag.
Questions
This topic is tagged for 29 questions
-
Fall 2025 • Question 1
(20 pts) On an equidistant mesh \(x_j = jh\), define the operator \(\widetilde {D}_0\) as, \[ \widetilde {D}_0u(x_j) = \frac {u(x_j+h/2)-u(x_j-h/2)}{h}, \] For a given smooth \(\kappa \) and \(f\), consider the scheme, \[ -\widetilde {D}_0\left (\kappa (x_j)\widetilde {D}_0u_j\right ) = f(x_j), \] for the ODE \[ -\frac {d}{dx}\left (\kappa (x)\frac {d}{dx}u(x)\right ) = f(x). \] What order is the local truncation error?
-
Fall 2024 • Question 1
(20 pts) On an equidistant mesh \(x_j = jh\), define the operator \(\widetilde {D}_0\) as, \[ \widetilde {D}_0u(x_j) = \frac {u(x_j+h/2)-u(x_j-h/2)}{h}, \] For a given smoooth \(\kappa \) and \(f\), consider the scheme, \[ -\widetilde {D}_0\left (\kappa (x_j)\widetilde {D}_0u_j\right ) = f(x_j), \] for the ODE \[ -\frac {d}{dx}\left (\kappa (x)\frac {d}{dx}u(x)\right ) = f(x). \] What order is the local truncation error?
-
Summer 2022 • Question 3
Consider the 9-point discrete Laplacian \[ (\Delta ^h_9 U)_{j,l} = \frac {1}{6h^2}\left ( U_{j-1,l-1}+U_{j+1,l-1}+U_{j-1,l+1}+U_{j+1,l+1} +4U_{j,l-1}+4U_{j-1,l}+4U_{j+1,l}+4U_{j,l+1}-20U_{j,l} \right ) \]
- State and prove a maximum principle for \(\Delta ^h_9 U\). (Hint: Think about what the key observation is in stating and proving a maximum principle for the standard 5-point discrete Laplacian.)
- Show that the following problem has a solution and that it is unique: \begin{equation} \tag {2} \begin {aligned} \frac {1}{6h^2}\big (&U_{j-1,l-1}+U_{j+1,l-1}+U_{j-1,l+1}+U_{j+1,l+1}\\ &+4U_{j,l-1}+4U_{j-1,l}+4U_{j+1,l}+4U_{j,l+1}-20U_{j,l}\big ) = f_{j,l}, \end {aligned} \end{equation} for \(j = 1,\ldots ,m\) and \(l = 1,\ldots ,m\) (where \((m+1)h = 1\)) along with the conditions \(U_{j,l} = 0\) at grid points on the boundary of the domain.
- The local trucation error in using the scheme in Eq. (2) to find an approximate solution of \(\Delta u = f\) for \(0 < x < 1\) and \(0 < y < 1\) with homogeneous Dirichlet boundary conditions is given by \[ \tau _{j,l} = \frac {1}{12}(u_{xxxx}+u_{xxyy}+u_{yyyy})h^2 + O(h^4), \] where the derivatives of \(u\) are evaluated at \(x_j = jh\), \(y_l = lh\). Prove that the values \(U_{j,l}\) obtained from Equations (2), along with zero discrete boundary values, converge to the values \(u(x_j,y_l)\) of the true solution to the PDE BVP as \(h \to 0\). (Hint: Use the relation between the set of global error values \(E_{j,l} = U_{j,l} - u(x_j,y_l)\) and the values of the local truncation error.)
-
Fall 2019 • Question 8
**Upwind Scheme** Consider the advection equation \[ u_t-9u_x=0,\qquad x_L
0\) **a)** Write the Upwind Scheme for this problem **b)** What is the local truncation error of the Upwind Scheme? **c)** What is the stencil of the scheme? What is the CFL condition for this method? **d)** Investigate the stability of the method using Von Neumann Stability Analysis. -
Fall 2018 • Question 5
**Elliptic Problems** Consider the one dimensional problem for \(v(x)\) \[ v''(x)=f(x), \tag{1} \] in the interval \([0,1]\) along with homogeneous Dirichlet boundary conditions. Define the difference operator \[ \Delta_h U_j\equiv\frac{1}{h^2}(U_{j-1}-2U_j+U_{j+1}), \] and consider the scheme for Eq. 1 \[ \Delta_h U_j=f_j \] for \(j=1,2,\ldots,N-1\) where \(Nh=1\), \(f_j\equiv f(jh)\), and \(U_0=U_N=0\). The approximate solution satisfies a linear system \(AU=b\), where \(U=(U_1,U_2,\ldots,U_{N-1})^T\) and \(b=h^2(f_1,f_2,\ldots,f_{N-1})^T\). **(a)** State and prove the maximum principle for any grid function \(V=\{V_j\}\) with values for \(j=0,1,\ldots,N\), that satisfies \(\Delta_h V_j\ge0\) for \(j=1,2,\ldots,N-1\). Sketch a grid function for which \(\Delta_h V_j\ge0\). **(b)** Derive an expression for the local truncation error and find the equation that relates the local trunction error and the global error \(e_j=v(x_j)-U_j\). **(c)** Use the maximum principle from part (a) to show that \(\|e\|_\infty=O(h^2)\) as the space step \(h\to0\). **(d)** Prove that the matrix \(A\) is nonsingular.
-
Spring 2017 • Question 6
**Elliptic Problems:** For the one dimensional Poisson problem for \(v(x)\) \[ -v''(x)+\alpha v(x)=f(x), \] where \(\alpha\ge0\) is constant, along with Dirichlet boundary conditions in the interval \([0,1]\), consider the scheme \[ \Delta_h U_j\equiv \frac{1}{h^2}\left(-U_{j-1}+2U_j-U_{j+1}\right)=f_j \] for \(j=1,2,\ldots,N-1\) where \(Nh=1\), \(f_j\equiv f(jh)\), and \(U_0=U_N=0\). The approximate solution satisfies a linear system \(AU=b\), where \(U=(U_1,U_2,\ldots,U_{N-1})^T\) and \(b=h^2(f_1,f_2,\ldots,f_{N-1})^T\). **a)** State and prove the maximum principle for any grid function \(V=\{V_j\}\) with values for \(j=0,1,\ldots,N\), that satisfies \(\Delta_h V_j\ge0\). **b)** Derive the matrix \(A\) and show that it is symmetric and positive definite. **c)** Use the maximum principle to show that the global error \(e_j=v(x_j)-U_j\) satisfies \(\|e\|_\infty=O(h^2)\) as the space step \(h\to0\).
-
Fall 2016 • Question 5
**Elliptic Problems:** For the one dimensional Poisson problem for \(v(x)\) \[ -v''(x)+\alpha v(x)=f(x), \] where \(\alpha\ge0\) is constant, along with Dirichlet boundary conditions in the interval \([0,1]\), consider the scheme \[ \Delta_h U_j\equiv \frac{1}{h^2}\left(-U_{j-1}+2U_j-U_{j+1}\right)=f_j \] for \(j=1,2,\ldots,N-1\) where \(Nh=1\), \(f_j\equiv f(jh)\), and \(U_0=U_N=0\). The approximate solution satisfies a linear system \(AU=b\), where \(U=(U_1,U_2,\ldots,U_{N-1})^T\) and \(b=h^2(f_1,f_2,\ldots,f_{N-1})^T\). **a)** State and prove the maximum principle for any grid function \(V=\{V_j\}\) with values for \(j=0,1,\ldots,N\), that satisfies \(\Delta_h V_j\ge0\). **b)** Derive the matrix \(A\) and show that it is symmetric and positive definite. **c)** Use the maximum principle to show that the global error \(e_j=v(x_j)-U_j\) satisfies \(\|e\|_\infty=O(h^2)\) as the space step \(h\to0\).
-
Spring 2016 • Question 8
Upwind Scheme
Consider the advection equation \[ u_t+5u_x=0,\qquad x_L<x<x_R,\qquad 0<t\le T, \] where \(u(x,0)=g(x)\), and \(u(x_L,t)=u_L(t)\) for \(t>0\).
a) Write the Upwind Scheme for this problem.
b) What is the local truncation error of the Upwind Scheme?
c) What is the stencil of the scheme? What is the CFL condition for this method?
d) Investigate the stability of the method using Von Neumann Stability Analysis.
-
Spring 2015 • Question 7
Wave Equation Consider the wave equation in one space dimension: \[ u_{tt}=c^2u_{xx},\qquad c>0. \] Suppose \(0\le x\le 1\) and \(t\ge 0\). The problem requires initial and boundary conditions but you can ignore them for the purposes of this question. Consider the usual discretization \[ \frac {1}{k^2}\left (U_m^{n+1}-2U_m^n+U_m^{n-1}\right ) = \frac {c^2}{h^2}\left (U_{m+1}^n-2U_m^n+U_{m-1}^n\right ) \] where \[ U_m^n\approx u(x_m,t_n) \] and \[ x_m=mh,\qquad h=\frac {1}{M},\qquad \text {and}\qquad t_n=nk,\qquad h,k>0. \] Let the grid constant \(r\) be defined by \[ r=\frac {kc}{h}. \] Derive the constraint on \(r\) imposed by the Courant-Friedrichs-Lewy condition. There is a value of \(r\) for which the local truncation error of the difference scheme is zero. Derive that value.
-
Fall 2014 • Question 8
Consider the initial-boundary-value problem \[ u=u(x,t)=?,\qquad u_t=u_{xx},\qquad x\in [0,1],\qquad t\geq 0, \] subject to the initial and boundary conditions \[ u(x,0)=f(x),\qquad u(0,t)=g_0(t),\qquad u(1,t)=g_1(t) \] Explain how to use the method of lines to solve this problem. Describe the scheme you obtain by using the Backward Euler Method to solve the resulting ODEs and compute the local truncation error of that scheme.
-
Fall 2013 • Question 5
**Elliptic Problems:** For the one dimensional Poisson problem for \(v(x)\) \[ -v''(x)=f(x) \] with Dirichlet boundary conditions in the interval \([0,1]\), consider the scheme \[ -(D_+D_-U)_j\equiv -U_{j-1}+2\,U_j-U_{j+1}=F_j \] for \(j=1,2,\ldots,N-1\) where \(Nh=1\), \(F_j\equiv h^2f(jh)\), and \(U_0=U_N=0\). The approximate solution satisfies a linear system \(AU=b\), where \(U=(U_1,U_2,\ldots,U_{N-1})^T\) and \(b=(F_1,F_2,\ldots,F_{N-1})^T\). **a)** State and prove the maximum principle for the numerical solution \(U_j\). **b)** Derive the matrix \(A\) and show that it is symmetric and positive definite. **c)** Show that the global error \(e_j=v(x_j)-U_j\) satisfies \(\|e\|_\infty=O(h^2)\) as the space step \(h\to0\).
-
Fall 2010 • Question 7
Local Truncation Error What is the local truncation error of a numerical scheme? What does consistency mean? Give a specific and precise example.
-
Fall 2010 • Question 8
Local Truncation Error Consider the wave equation \[ u_{tt}=c^2u_{xx} \tag {7} \] and its discretization \[ x_m=mh,\qquad t_n=nk,\qquad U_m^n\approx u(x_m,t_n) \tag {8} \] and \[ U_m^{n+1}-2U_m^n+U_m^{n-1} = r\left (U_{m+1}^n-2U_m^n+U_{m-1}^n\right ) \tag {9} \] where \(r=c^2k^2/h^2\) is the grid constant. For the purposes of this problem, ignore the issues of initial and boundary conditions. Compute the local truncation error of (9) and show that there is a value of \(r\) for which the local truncation error is exactly zero. Give a physical interpretation of this fact.
-
Spring 2010 • Question 6
Elliptic Problems:
Consider the standard five-point difference approximation (centered difference for both the gradient and divergence operators) for the variable coefficient Poisson equation \[ -\nabla \cdot (a\nabla v)=f \] with Dirichlet boundary conditions, in a two-dimensional rectangular region. We assume that \(a(x,y)\geq a_0>0\). The approximate solution \(\{u_{i,j}\}\) satisfies a linear system \(Au=b\).
1. State and prove the maximum principle for the numerical solution \(u_{i,j}\).
2. Derive the matrix \(A\) in the one-dimensional case and show that it is symmetric and positive definite.
3. For the one-dimensional and constant-coefficient case, show that the global error \(e_j=v(x_j)-u_j\) satisfies \(\|e\|_2=O(h^2)\) as the space step \(h\to 0\).
4. Discuss the advantages and disadvantages of trying to solve the system for the two-dimensional problem using (i) the SOR (Successive Over Relaxation) method and (ii) the (preconditioned) Conjugate Gradient method.
-
Fall 2009 • Question 6
Elliptic Problems:
Consider the standard five-point difference approximation (centered difference for both the gradient and divergence operators) for the variable coefficient Poisson equation \[ -\nabla \cdot (a\nabla v)=f \] with Dirichlet boundary conditions, in a two-dimensional rectangular region. We assume that \(a(x,y)\geq a_0>0\). The approximate solution \(\{u_{i,j}\}\) satisfies a linear system \(Au=b\).
1. State and prove the maximum principle for the numerical solution \(u_{i,j}\).
2. Derive the matrix \(A\) in the one-dimensional case and show that it is symmetric and positive definite.
3. For the one-dimensional and constant-coefficient case, show that the global error \(e_j=v(x_j)-u_j\) satisfies \(\|e\|_2=O(h^2)\) as the space step \(h\to 0\).
4. Discuss the advantages and disadvantages of trying to solve the system for the two-dimensional problem using (i) the SOR (Successive Over Relaxation) method and (ii) the (preconditioned) Conjugate Gradient method.
-
Spring 2009 • Question 6
Linear Multistep Methods Consider the initial value problem \[ y'=f(x,y),\qquad y(a)=y_0 \] Let \(h\) be some stepsize, \(x_n=a+nh\), \(y_n\approx y(x_n)\), and \(f_n=f(x_n,y_n)\), for \(n=0,1,2,3,\ldots \). Let \(k\) be some step number, and ignore the question of obtaining starting values \(y_1,y_2,\ldots ,y_{k-1}\). Suppose the approximations \(y_n\), \(n=k,k+1,\ldots \) are obtained by the Linear Multistep Method \[ \sum _{j=0}^k \alpha _j y_{n+j} =h\sum _{j=0}^k \beta _j f_{n+j}. \tag {4} \] Define what is meant by the local truncation error and the order of the linear multistep method (4). Compute the order and the local truncation error of Euler’s Method \[ y_{n+1}-y_n=hf_n. \tag {5} \]
-
Fall 2008 • Question 7
Local Truncation Error Consider the wave equation \[ u_{tt}=c^2u_{xx} \tag {10} \] and its discretization \[ x_m=mh,\qquad t_n=nk,\qquad U_m^n\approx u(x_m,t_n) \tag {11} \] and \[ U_m^{n+1}-2U_m^n+U_m^{n-1} = r\left (U_{m+1}^n-2U_m^n+U_{m-1}^n\right ) \tag {12} \] where \(r=c^2k^2/h^2\) is the grid constant. For the purposes of this problem, ignore the issues of initial and boundary conditions. Compute the local truncation error of (12) and show that there is a value of \(r\) for which the local truncation error is exactly zero. Give a physical interpretation of this fact.
-
Spring 2008 • Question 6
Elliptic Problems:
Consider the standard five-point difference approximation (centered difference for both the gradient and divergence operators) for the variable coefficient Poisson equation \[ -\nabla \cdot (a\nabla v)=f \] with Dirichlet boundary conditions, in a two-dimensional rectangular region. We assume that \(a(x,y)\geq a_0>0\). The approximate solution \(\{u_{i,j}\}\) satisfies a linear system \(Au=b\).
1. State and prove the maximum principle for the numerical solution \(u_{i,j}\).
2. Derive the matrix \(A\) in the one-dimensional case and show that it is symmetric and positive definite.
3. For the one-dimensional and constant-coefficient case, show that the global error \(e_j=v(x_j)-u_j\) satisfies \(\|e\|_2=O(h^2)\) as the space step \(h\to 0\).
4. Discuss the advantages and disadvantages of trying to solve the system for the two-dimensional problem using (i) the SOR (Successive Over Relaxation) method and (ii) the (preconditioned) Conjugate Gradient method.
-
Fall 2007 • Question 8
**Elliptic Problems** Consider the standard five-point difference approximation (centered difference for both the gradient and divergence operators) for the variable coefficient Poisson equation \[ -\nabla\cdot(a\nabla v)=f \] with Dirichlet boundary conditions, in a two-dimensional rectangular region. We assume that \(a(x,y)\geq a_0>0\). The approximate solution \(\{u_{i,j}\}\) satisfies a linear system \(Au=b\). **1.** State and prove the maximum principle for the numerical solution \(u_{i,j}\). **2.** Derive the matrix \(A\) in the one-dimensional case and show that it is symmetric and positive definite. **3.** For the one-dimensional and constant-coefficient case, show that the global error \(e_j=v(x_j)-u_j\) satisfies \(\|e\|_2=O(h^2)\) as the space step \(h\to0\). **4.** Discuss the advantages and disadvantages of trying to solve the system for the two-dimensional problem using **(i)** the SOR (Successive Over Relaxation) method and **(ii)** the (preconditioned) Conjugate Gradient method. **Fact 1:** A real symmetric \(n\times n\) matrix \(A\) can be diagonalized by an orthogonal similarity transformation, and \(A\)'s eigenvalues are real. **Fact 2:** The \((N-1)\times(N-1)\) matrix \(M\) defined by \[ M= \begin{bmatrix} -2 & 1 & 0 & \cdots & 0 & 0\\ 1 & -2 & 1 & \ddots & \vdots & \vdots\\ 0 & 1 & -2 & \ddots & 0 & 0\\ \vdots & \ddots & \ddots & \ddots & 1 & 0\\ 0 & \cdots & 0 & 1 & -2 & 1\\ 0 & \cdots & 0 & 0 & 1 & -2 \end{bmatrix} \] has eigenvalues \[ \mu_l=-4\sin^2\left(\frac{\pi l}{2N}\right), \qquad l=1,2,\ldots,N-1. \] **Fact 3:** The \((N+1)\times(N+1)\) matrix: \[ \begin{bmatrix} -1 & 1 & 0 & \cdots & 0 & 0\\ 1 & -2 & 1 & \ddots & \vdots & \vdots\\ 0 & 1 & -2 & \ddots & 0 & 0\\ \vdots & \ddots & \ddots & \ddots & 1 & 0\\ 0 & \cdots & 0 & 1 & -2 & 1\\ 0 & \cdots & 0 & 0 & 1 & -1 \end{bmatrix} \] has eigenvalues \[ \mu_l=-4\sin^2\left(\frac{\pi l}{2(N+1)}\right), \qquad l=0,1,\ldots,N. \] **Fact 4:** For a real \(n\times n\) matrix \(A\), the Rayleigh quotient of a vector \(x\in\mathbb{R}^n\) is the scalar \[ r(x)=\frac{x^TAx}{x^Tx}. \] The gradient of \(r(x)\) is \[ \nabla r(x)=\frac{2}{x^Tx}(Ax-r(x)x). \] If \(x\) is an eigenvector of \(A\) then \(r(x)\) is the corresponding eigenvalue and \(\nabla r(x)=0\).
-
Fall 2003 • Question 7
Numerical ODEs Define the terms linear multistep method (LMM), order, consistency, zero-stability, local truncation error, and region of absolute stability of an LMM. What is the highest order implicit 1 step method and discuss its region of absolute stability?
-
Fall 2003 • Question 8
Numerical PDEs Consider the Initial-Boundary Value Problem \[ u_t=u_{xx},\qquad x\in [0,1],\qquad t\ge 0, \qquad u\text { given for }x=0,\ x=1,\text { and }t=0. \tag {4} \] Describe the Crank-Nicolson Method, and analyze its local truncation error and stability.
-
Fall 2002 • Question 6
Wave Equations Consider the first-order wave equation in one space dimension: \[ u_t+au_x=0,\qquad -\infty <x<\infty ,\qquad t>0, \] where \(a\) is a constant, with the initial condition \[ u(x,0)=u_0(x),\qquad -\infty <x<\infty \] for a given function \(u_0\). We use the usual discretization \[ U_j^n\approx u(x_j,t^n), \] where \(x_j=j\Delta x\) and \(t^n=n\Delta t\). For a finite difference scheme to solve this problem, what is the CFL condition? Give an intuitive explanation for the condition. Derive the first-order upwind scheme for this equation and its truncation error. For numerical stability, derive the conditions for stability in the maximum norm (maximum principle) and the \(\ell _2\) norm (Fourier analysis).
-
Fall 2002 • Question 7
Heat Equation Derive the Crank-Nicolson scheme for the following problem \[ u_t=u_{xx},\qquad t>0,\qquad 0<x<1, \] with the boundary conditions \[ u(0,t)=u(1,t)=0,\qquad t\ge 0, \] and the initial data \[ u(x,0)=u_0(x),\qquad 0\le x\le 1, \] for some given function \(u_0\). Use the usual discretization with uniform mesh points \(x_j=jh\) where \(h=1/N\) and \(j=0,1,2,\ldots ,N\). Show that the method is second order by deriving the truncation error. What other conditions do we need to guarantee the convergence of the numerical solution? Derive the stability condition in \(\ell _2\) norm by using Fourier analysis. For any value of \(\nu =\Delta t/(\Delta x)^2\), do we always have the maximum principle satisfied? If we have some initial data such that \(0\le u_0(x)\le 1\), derive the condition that should be imposed on \(\nu \) so that \(0\le u_j^n\le 1\) also holds for all \(j\) and \(n>0\).
-
Fall 2000 • Question 6
Wave Equations Consider the wave equation in one space dimension: \[ u_t+au_x=0,\qquad -\infty <x<\infty ,\qquad t>0, \] with initial condition \[ u(x,0)=u_0(x). \] Consider the usual discretization \[ U_m^k\approx u(x_m,t_k) \] where \(x_m=m\Delta x\) and \(t_k=k\Delta t\). For an explicit scheme, what is the CFL condition? Give an intuitive explanation of the condition. Give the first-order upwind scheme for this equation and derive the truncation error.
-
Fall 1999 • Question 5
Numerical ODEs Define the terms linear multistep method (LMM), order, consistency, zero-stability, local truncation error, and region of absolute stability of an LMM. Derive the highest order implicit 2 step method and discuss its region of absolute stability.
-
Fall 1999 • Question 6
Numerical PDEs Consider the PDE \[ u_t+u_x=0 \tag {5} \] and the usual discretization \[ U_m^n\approx u(x_m,t_n) \qquad \text {where}\qquad x_m=mh\quad \text {and}\quad t_n=nk. \tag {6} \] The Leap Frog Method is given by \[ U_m^{n+1}=U_m^{n-1}-\frac {k}{h}\left (U_{m+1}^n-U_{m-1}^n\right ). \tag {7} \] Compute the local truncation error and discuss the stability of this method.
-
1996 • Question 10
Local Truncation Error. What is the local truncation error of a numerical scheme? What does consistency mean? Give a specific and precise example.
-
Fall 1995 • Question 5
Newton Type Methods Suppose \(f(x)\) is a real-valued function defined for all values of the real variable \(x\), and that \(f'\) is Lipschitz continuous. Consider the discrete Newton method: Guess \(x_0\) and for \(k=0,1,2,\ldots \), do: \[ a_k=\frac {f(x_k+h_k)-f(x_k)}{h_k} \] \[ x_{k+1}=x_k-\frac {f(x_k)}{a_k} \] Analyze the local convergence properties of this method. How does the speed of convergence depend on the choice of \(h_k\) (ignore any effect of round-off errors in this analysis)? Now taking roundoff into account what would be a reasonable size for \(h_k\) in practice?
-
Fall 1994 • Question 1
a) Derive a multistep method to approximate \(y'=f(t,y)\) of the form \[ y_{n+1}=y_n+h(b_{-1}y'_{n+1}+b_0y'_n+b_1y'_{n-1}) \] with \(y'_j=f(t_j,y_j)\), \(t_j=t_0+jh\) by interpolating \(f(s,y(s))\) at \(t_{n-1}\), \(t_n\), \(t_{n+1}\).
b) Analyze the local truncation error of this method and the consequences regarding convergence. What would be an appropriate predictor for this method?
c) Discuss the region of absolute stability of this method, and the predictor-corrector method described in part b).