Dynamics – Simple Example
Most differential equations cannot be solved symbolically (closed form), must be solved numerically.
To numerically solve the differential equation F=ma, the simplest approach is Euler’s method:
initialize x and dx (position and velocity)
choose some small time step dt
loop
ddx = F()/m // ddx=acceleration
dx += ddx*dt // dx=velocity
x += dx*dt // x=position
t += dt
F might be gravity, or any other forces as a function of time, position, or other state