I have a programming function written for Eurler's approximations. Currently the function only takes 3 parameters.
- step size
- starting f(x)
- endting f(x) which is what we are approximating
Each time I have to use Euler, I have to keep on changing my function's differential equation.
E.g. euqation 1
f'(x) = 3x^{2} - 7
equation 2
f'(x) = f(x) + 2
I want to send differential equation as a paramter. How can I do so?
I am using C#, VBA. Don't have Matlab installed at the moment. But I am willing to try out in Python although I am new to it.
ps: I checked on this question. Quite hard to understand the case there...
perhaps this can help :
I use C# as an example