Finite difference terms for boundaries

hunt_mat
Homework Helper
Messages
1,798
Reaction score
33
Hi,

We all know that the finite difference formulae for the derivatives are given by:
<br /> \frac{dy}{dx}_{i}=\frac{y_{i}-y_{i-1}}{\delta x}<br />
and
<br /> \frac{d^{2}y}{dx^{2}}=\frac{y_{i-1}-2y_{i}+y_{i+1}}{\delta x^{2}}<br />
What would be the formulae for the boundary terms? when i=1? I think I can show that:
<br /> \frac{dy}{dx}_{0}=\frac{4y_{1}-y_{2}}{3}<br />
Are there any other formulae? What about the second order derivative?

This is for a numerical code in matlab, I can use inbuilt functions but I want my code to run as fast as possible.

Mat
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...

Similar threads

Back
Top