A boundary value problem is nonlinear iff its differential equation cannot be written as
for functions p, q, and r.
Nonlinear Shooting Method
Choose the initial slope t=y′(a) so that the IVP solution satisfies y(b)=β. For a trial value t, solve
Define z(x,t)=∂t∂y(x,t). Solve the sensitivity IVP with the original IVP:
Use Newton’s method on F(t)=y(b,t)−β:
- Choose an initial guess t0.
- Solve both IVPs with order 4 Runge-Kutta.
- Update t until ∣F(t)∣ is sufficiently small.
Nonlinear Finite-Difference Method
Replace derivatives with centered differences. Solve the resulting nonlinear system with Newton’s method.
A unique solution exists iff
- f, fy, and fy′ are continuous for x∈[a,b] and y,y′∈(−∞,∞)
- fy(x,y,y′)≥δ for some δ>0
- A constant k exists with k=max(∣fy(x,y,y′)∣, ∣fy′(x,y,y′)∣)
For mesh points x0,…,xN+1, let y(xi)≈wi. Centered differences give
for i=1,…,N, with truncation error O(h2).
The resulting N equations are
Solve with Newton’s method. A unique solution exists whenever h<L2.
Worked Examples
Example 1
Use the nonlinear shooting method to solve
y′′=(y′)2,0≤x≤1,y(0)=0,y(1)=1
Start with t0=y′(0)=0.5. Use order 4 Runge-Kutta on the mesh x=0,0.25,0.5,0.75,1. Stop when the endpoint residual ∣y(1,tk)−1∣ is less than 10−5.
Solution Reveal Hide
For a trial initial slope t, set
v=y′,z=∂t∂y,s=z′The IVP system for y and its sensitivity z is
y′=v,v′=v2,z′=s,s′=2vswith y(0)=0, v(0)=t, z(0)=0, and s(0)=1. Use order 4 Runge-Kutta with h=0.25 to solve both IVPs numerically.
For each trial slope, define the endpoint residual F(t)=y(1,t)−1. The Newton update is
tk+1=tk−z(1,tk)F(tk)The first RK4 integration gives
y(1,t0)≈0.6930885,F(t0)≈−0.3069115,z(1,t0)≈1.9990825Thus,
t1=0.5−1.9990825−0.3069115≈0.6535262Repeating the integrations and Newton updates gives:
At t4, ∣F(t4)∣≈9.5×10−13<10−5. Hence,
y′(0)≈0.6322857
Example 2
Use the nonlinear shooting method to solve
y′′=y2,0≤x≤1,y(0)=0,y(1)=1
Start with t0=y′(0)=0.5. Use order 4 Runge-Kutta with step size h=0.25. Stop when ∣y(1,tk)−1∣ is less than 10−5.
Solution Reveal Hide
For a trial initial slope t, set v=y′, z=∂y/∂t, and s=z′. The IVP system is
y′=v,v′=y2,z′=s,s′=2yzwith y(0)=0, v(0)=t, z(0)=0, and s(0)=1. Define F(t)=y(1,t)−1. The Newton update is
tk+1=tk−z(1,tk)F(tk)The RK4 integrations and Newton updates are:
At t3, ∣F(t3)∣<10−5. Therefore,
y′(0)=t3≈0.9253984