can someone make a program that evaluates (x` = 1 + x**2 ) by Eulars method,,, and Eulars midpoint method can someone make a program that evaluates (x` = 1 + x**2 ) by Eulars method,,, and Eulars midpoint method @Computer Science
what is x`?
oh euler's method? ... I haven't read on that yet, but try using MATLAB, or Python, or any programming language.
def eulermethod(x) return 1 + x**2
can you do it in python
x` is the derivative of x,,( dt/dx)
eulermethod = lambda x: x**2 + 1
I coded this snippet: http://codepad.org/lF4ZleA7 using Euler's Method, but it's still far off actual values for the ODE (but there are also blatantly obvious ways to improve my code). Hope it will be a bit helpful. As a side note, use pylab to plot the graphs, if you need. Makes the visualization clearer and more intuitive.
Join our real-time social learning platform and learn together with your friends!