Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I need to use a central difference scheme:

$$\frac{dy}{dx}=\frac{y_{i+1}-y_{i-1}}{2 \Delta x}$$

equivalent for non centered point:

enter image description here

Unfortunately I cannot find a book in which I have this formula. Could anybody give me this in answer?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Actually you can use Taylor expansion to derive the formula $$y_{i-1}=y(x-\Delta x_i)=y(x)-\frac{dy}{dx}\Delta x_i+O(\Delta x^2)$$ $$y_{i+1}=y(x+\Delta x_{i+1})=y(x)+\frac{dy}{dx}\Delta x_{i+1}+O(\Delta x^2)$$ By neglecting higher order terms $O(\Delta x^2)$ $$y_{i+1}-y_{i-1}=\frac{dy}{dx}\Delta x_{i+1}+\frac{dy}{dx}\Delta x_i\Rightarrow \frac{dy}{dx}=\frac{y_{i+1}-y_{i-1}}{\Delta x_{i+1}+\Delta x_i}$$

share|improve this answer
    
Have forgotten that. :] Thanks! –  Misery May 29 '13 at 6:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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