Truncation Error and Second Order Accuracy.

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
mm391
Messages
65
Reaction score
0
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)
 
Physics news on Phys.org
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'