Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to define finite difference approximation for first order derivative

I need to define

$y1(k)=\frac{y_{k+1}-y_{k-1}}{2*h}$

in sage so that sage can differ between symbolic $$y_{k+1}$$ and $$y_{k}$$.

Would somebody please help?

How to define finite difference approximation for first order derivative

I need to definedefine $$y1(k)=\frac{y_{k+1}-y_{k-1}}{2*h}$$

$y1(k)=\frac{y_{k+1}-y_{k-1}}{2*h}$

in sage so that sage can differ between symbolic $$y_{k+1}$$ and $$y_{k}$$.

Would somebody please help?

click to hide/show revision 3
retagged

How to define finite difference approximation for first order derivative

I need to define $$y1(k)=\frac{y_{k+1}-y_{k-1}}{2*h}$$

in sage so that sage can differ between symbolic $$y_{k+1}$$ and $$y_{k}$$.

Would somebody please help?