B11 - numerical integration of ODEs

x→˙=Ax→⟹x→˙=f(x→,t)

where, x→ represents the system state, and f may be a non linear function (vector field)

forward euler method

dx→(t)dt≈x→(t+Δt)−x→(t)Δt≈f(x→(t))x→(t+Δt)≈x→(t)+Δtf(x→(t)) x→k+1=x→k+Δtf(x→k) x→k+1=x→k+ΔtAx→k=(I+ΔtA)x→k

where, A is a matrix, and I is the identity matrix

backward euler method

x→k+1−x→kΔt≈x→˙(tk+1)=f(x→k+1)⟹x→k+1=x→k+Δtf(x→k+1) x→k+1=x→k+ΔtAx→k+1=(I+ΔtA)−1x→k

motion

x¨=−ω02x−γx˙ x˙=vv˙=−γv−ω02x ddt[xv]=[01−ω02−γ][xv]