An m-dimensional system of first-order IVPs is
where u=(u1,…,um)T, α=(α1,…,αm)T, and f=(f1,…,fm)T. The goal is to approximate u(t) for a≤t≤b.
The Lipschitz condition applies unchanged. Replace the scalar variables with vectors and absolute values with a vector norm:
for all (t,u),(t,z)∈D⊆R×Rm.
The existence and uniqueness result also applies with this condition. A continuous, bounded Jacobian of f is sufficient.
Order 4 Runge-Kutta applies unchanged. Use wi, k1,…,k4, and f in place of wi, k1,…,k4, and f. Start with w0=α. Then u(ti)≈wi.
Reducing a Higher-Order IVP
An mth-order IVP
with y(a)=α1,y′(a)=α2,…,y(m−1)(a)=αm becomes a first-order system by setting u=(y,y′,…,y(m−1))T
Conversion Procedure
Set
Then
with
For a linear equation
the last system equation is
For constant coefficients,
For a numerical method with approximations wi at ti=a+ih,
wi,1≈y(ti),wi,2≈y′(ti),…,wi,m≈y(m−1)(ti)
Worked Examples
Example 1
Reduce
to a first-order system, then take 1 step of order 4 Runge-Kutta with h=0.5.
Solution Reveal Hide
Set u=(y,y′)T.
u′=f(t,u)=(u22u2−2u1+e2tsint),u(0)=(−0.4−0.6)For h=0.5:
k1=0.5f(0,(−0.4−0.6))=(−0.3−0.2)k2=0.5f(0.25,(−0.55−0.7))=(−0.350.0540)k3=0.5f(0.25,(−0.575−0.5730))=(−0.28650.2059)k4=0.5f(0.5,(−0.6865−0.3941))=(−0.19700.9440)w1=(−0.4−0.6)+61((−0.3−0.2)+2(−0.350.0540)+2(−0.28650.2059)+(−0.19700.9440))=(−0.6950−0.3894)The first component gives y(0.5)≈−0.6950. The exact value is −0.6936.
Example 2
Write y′′′=y′′−2y′+y+t with y(0)=1, y′(0)=0, y′′(0)=2 as a first-order system.
Solution Reveal Hide
Set u=(y,y′,y′′)T.
u′=u2u3u3−2u2+u1+t,u(0)=102