An mth-order system of first-order IVPs is
u1′(t)um′(t)=f1(t,u1,u2,…,um) ⋮=fm(t,u1,u2,…,um)
for a≤t≤b, with u1(a)=α1,…,um(a)=αm. The goal is to approximate u1(t),…,um(t).
Lipschitz Condition for Systems
f(t,u1,…,um) on
D={(t,u1,…,um):a≤t≤b, −∞<ui<∞}
satisfies a Lipschitz condition in u1,…,um iff a constant L>0 exists with
∣f(t,u1,…,um)−f(t,z1,…,zm)∣≤Lj=1∑m∣uj−zj∣
for all (t,u1,…,um),(t,z1,…,zm)∈D.
Sufficient test: f and each partial derivative ∂ui∂f are continuous on D with ∂ui∂f≤L for each i=1,…,m.
Existence and Uniqueness
If each fi is continuous and satisfies a Lipschitz condition on D, the system has a unique solution u1(t),…,um(t) on [a,b].
Order 4 Runge-Kutta for Systems
Superscript (j) marks quantities for uj. Mesh points are ti=a+ih with h=Nb−a.
w0(j)k1(j)k2(j)k3(j)k4(j)wi+1(j)=αj=hfj(ti, wi(1),…,wi(m))=hfj(ti+2h, wi(1)+21k1(1),…,wi(m)+21k1(m))=hfj(ti+2h, wi(1)+21k2(1),…,wi(m)+21k2(m))=hfj(ti+1, wi(1)+k3(1),…,wi(m)+k3(m))=wi(j)+61(k1(j)+2k2(j)+2k3(j)+k4(j))
for i=0,…,N−1 and j=1,…,m. All k1(j) are computed before any k2(j), and so on. Then uj(ti)≈wi(j).
Reducing a Higher-Order IVP
An mth-order IVP
y(m)(t)=f(t,y,y′,…,y(m−1)),a≤t≤b
with y(a)=α1,y′(a)=α2,…,y(m−1)(a)=αm becomes a first-order system by setting u1=y,u2=y′,…,um=y(m−1)
u1′u2′um−1′um′=u2=u3 ⋮=um=f(t,u1,u2,…,um)
with u1(a)=α1,…,um(a)=αm. Solving the system by order 4 Runge-Kutta, wi(1) approximates y(ti).
Worked Example
y′′−2y′+2y=e2tsint,0≤t≤1,y(0)=−0.4, y′(0)=−0.6
Set u1=y, u2=y′
u1′u2′=u2=2u2−2u1+e2tsint
with u1(0)=−0.4, u2(0)=−0.6. Apply order 4 Runge-Kutta with f1=u2 and f2=2u2−2u1+e2tsint. Then wi(1) approximates y(ti).