How can I solve the following ODE numerically using Python and Euler's method:
v' = 5 - 0.5v
Also, can anybody recommend a good book or website where I can learn solving differential equations using Python?
How can I solve the following ODE numerically using Python and Euler's method:
v' = 5 - 0.5v
Also, can anybody recommend a good book or website where I can learn solving differential equations using Python?
Well, that didn't teach me much. I think I need to add more information.
1. I need to plot the solutions as a function of time
2. The equation above was not completely correct:
v' = 5 - 0.5v^2 This makes it even harder...
So, here's my sequence of data with time (in seconds):
s = linspace(0, 12, 121) #(delta t is 0.1)
This is the plot:
plot (s, vt)
How do I get the data for vt?
You can also take a look at:
http://cdnetworks-us-2.dl.sourceforge.net/project/scipy/scipy/0.8.0/scipy-ref.pdf
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.