Truncation Error and Second Order Accuracy.

  • Thread starter mm391
  • Start date
  • #1
66
0

Main Question or Discussion Point

By combining the two equations i should be able to solve for u' and get rid of u'':

u_(i-1) = u_i + (-h)*u' + 1/2 * (-h)^2 * u'' + O(h^4)

u_(i-2) = u_i + (-2h)*u' + 1/2 * (-2h)^2 * u'' + O(h^4)

But i keep getting stuck and can't come up with the answer below.

Can anyone help me please.

u'=((3u_i-4u_(i-1)+u_(i-2))/2h)+O(h^4)
 

Answers and Replies

  • #2
lurflurf
Homework Helper
2,432
132
multiply the first equation by -4

-4u_(i-1) = -4u_i + (4h)*u' - 1/2 * (-2h)^2 * u'' + O(h^4)

u_(i-2) = u_i + (-2h)*u' + 1/2 * (-2h)^2 * u'' + O(h^4)

now solve for u'
 

Related Threads on Truncation Error and Second Order Accuracy.

  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
Replies
5
Views
30K
  • Last Post
Replies
4
Views
1K
Replies
3
Views
860
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
6
Views
14K
  • Last Post
Replies
2
Views
11K
Replies
6
Views
16K
Top