Changes between Version 4 and Version 5 of u/erica/truncerror
- Timestamp:
- 08/28/13 14:08:19 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/truncerror
v4 v5 8 8 = Local truncation error (LTE)= 9 9 10 LTE is a measure of how well a solution to a particular ODE satisfies the finite difference approximation of that ODE. Say we discretize the following equation: 11 12 10 LTE is a measure of how well a solution to a particular ODE satisfies the finite difference approximation of that ODE. 13 11 14 12 The concept of LTE is illustrated with the following example. Suppose we replace the 2nd derivative of the 1D Poisson equation, … … 20 18 [[latex($\frac{1}{h}[\frac{u(x+h)-u(x)}{h} - \frac{u(x-h)-u(x)}{-h}] = \frac{1}{h^2}[u(x+h)+u(x-h)-2u(x)]$)]] 21 19 22 (which is easily interpreted as the finite difference version of the derivative of the derivative). With this, and replacing the functions with discrete versions of the functions, we have20 (which is easily interpreted as the finite difference version of the derivative of the derivative). Using this, and replacing the function f and the (approximate) solution u with their discrete forms, we have 23 21 24 22 [[latex($\frac{1}{h^2}[u(x_i+h)+u(x_i-h)-2u(x_i)] = f(x_i)$)]] 25 23 26 24 27 This is a system of equations over a 1D interval. and discretize the functions over some finite number of grid points:25 This is a system of equations over a 1D interval. As such, it can be written as a matrix equation, 28 26 29 with the finite difference version 27 [[latex($A {\vec{u}}=\vec{x}$)]] 28 29 where [[latex(${\vec{u}}$)]] is the solution vector from this finite-difference scheme. 30 31 Now if we replace the approximate solution with the exact solution in the discrete equation above, the left and right hand sides in general will not be exactly the same. This difference is the LTE, and can be written as, 32 33 [[latex($\tau = \frac{1}{h^2}[u(x_i+h)+u(x_i-h)-2u(x_i)] - f(x_i)$)]]