37 | | [[latex($\frac{1}{h^2}[h^2 U''_i + \frac{1}{12}h^4 u''''_i + \cdot \cdot \cdot]-f(x_i) = U''_i + O(h^2) - f(x_j) = \tau _i$)]] |
| 37 | [[latex($\frac{1}{h^2}[h^2 U''_i + \frac{1}{12}h^4 U''''_i + \cdot \cdot \cdot]-f(x_i) = U''_i + \frac{1}{12}U''''_i(h^2) +O(h^4) - f(x_j) = \tau _i$)]] |
| 38 | |
| 39 | Using the original ODE, this becomes, |
| 40 | |
| 41 | [[latex($\tau_i = \frac{1}{12}U''''_i + O(h^4)$)]] |
| 42 | |
| 43 | = Global error = |
| 44 | |
| 45 | As we had the matrix formula for the finite difference system of equations, |
| 46 | |
| 47 | [[latex($A\vec{u} = \vec{x}$)]], |
| 48 | |
| 49 | analogously when we replace the approximate solution u with the true solution, U, we have to introduce the local truncation error, |
| 50 | |
| 51 | [[latex($A\vec{U} = \vec{x} + \tau$)]] |
| 52 | |
| 53 | Taking the difference of these equations, we have |
| 54 | |
| 55 | [[latex($A\vec{E} = - \tau$)]] |
| 56 | |
| 57 | This is a set of finite difference equations for the global error. |
| 58 | |
| 59 | Using reverse logic, we can assume this system is an approximation to the ODE: |
| 60 | |
| 61 | [[latex($\frac{d^2E}{dx^2}=-\tau(x)$)]] |
| 62 | |
| 63 | with boundary conditions E(0)=E(mx+1)=0 for the case of Dirchlet BCs (where value of u is supplied at boundary). |
| 64 | |
| 65 | Integration of this equation is said to provide an estimate for the global error in your solution, which you'd like to be bound and decreasing for increasing h. |
| 66 | |
| 67 | = A check that numerically solving Laplace's Eqn with f(x) = 6x gives the exact solution = |
| 68 | |
| 69 | |