Hello! I need to define three functions in C that implement the forward, backward, and centered difference. They are defined as followed:
Forward Difference:
u(x+h)-u(x)
--------------
h
Backward Difference:
u(x)-u(x-h)
-------------
h
Centered Difference:
u(x+h)-u(x-h)
---------------
2h
How could I write these in C to implement them into my program? Thank you in advance!