4
$\begingroup$

I was going through my notes on different finite difference methods and came across something I don't quite understand. I have code that will calculate an approximate solution we can call this $U_{nm}$ that I define on a grid using $h$ and $dt$ for the change in $x$ and time, respectively. Now I have written down the global error is just: $$e_{nm} =|U_{nm} - u(x_n,t_n)|$$ where $u(x_n,t_n)$ is the exact solution evaluated at the gird points. From there we can calculate our rate of convergence.

So I, perhaps naively, just assumed I could take the solution I calculate and subtract the exact solution at every point take the absolute value. However, I have written something about actually just using $e_{nm}$ to calculate the initial values as well as boundary conditions and then plugging them back into the finite difference method to calculate all the grid points for all of $e_{nm}$.

Is this correct or did I perhaps not fully understand what my instructor was saying?

(Note we are working with forward, backward and crank-nicolson methods)

$\endgroup$

migrated from math.stackexchange.com Feb 26 '12 at 23:27

This question came from our site for people studying math at any level and professionals in related fields.

  • $\begingroup$ Would it be best for me to move it and just delete this question from here? $\endgroup$ – user25783 Feb 26 '12 at 18:21
  • $\begingroup$ I flagged your question hoping it gets moderators attention & they would migrate the question to scicomp.SE. $\endgroup$ – user182 Feb 26 '12 at 18:24
  • $\begingroup$ @user25783: I take your comment as indicating that you want it moved. So here it goes. $\endgroup$ – Willie Wong Feb 26 '12 at 23:27
  • $\begingroup$ this would work if you have the exact solution available... otherwise, you would have to find an upper bound on the error $e_{mn}$ in terms of the truncation error (from the finite difference scheme that you chose, i.e. crank-nicolson). $\endgroup$ – Paul Mar 16 '12 at 13:28
2
$\begingroup$

However, I have written something about actually just using $e_{nm}$ to calculate the initial values as well as boundary conditions and then plugging them back into the finite difference method to calculate all the grid points for all of $e_{nm}$.

This statement doesn't make any sense, so you can safely assume you missed something in the lecture :) In the general case you will not have access to the true solution, your instructor may have described some strategies for evaluating the error or convergence in this situation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.