General Principle

We've seen many methods to solve Initial Value Problems, but none of these methods can be used directly to solve the following Boundary Value Problem:

>

[Maple Math] , [Maple Math] in [Maple Math] ,

with the boundary conditions

[Maple Math] , [Maple Math] .

>

All methods seen require initial data to advance the calculations. One way to resolve this dilemma is to guess the missing initial value and then adjust this guess until the value at the next boundary is sufficiently close to the value required. Consider the above problem, and use as a guess for the second initial value

[Maple Math] .

Then the calculation yields

> f:=(t,y,nu)->nu;

[Maple Math]

> g:=(t,y,nu)->-2*nu/t+2*y/t^2+sin(ln(t))/t^2;

[Maple Math]

> RK4sys2(f,g,1.,1.,0.,0.01,100);

[Maple Math]

> ll1:=[]:for i from 0 to 100 do ll1:=[op(ll1),[x(i),u(i)]]: od:

>

A second guess, e.g.,

[Maple Math] ,

yields

>

> RK4sys2(f,g,1.,1.,1.,0.01,100);

[Maple Math]

> ll2:=[]:for i from 0 to 100 do ll2:=[op(ll2),[x(i),u(i)]]: od:

> plot({ll1,ll2},1..2);

[Maple Plot]

>

So that the correct value lies somewhere in between:

>

> beta:=0.9:

> RK4sys2(f,g,1.,1.,beta,0.01,100);

> ll3:=[]:for i from 0 to 100 do ll3:=[op(ll3),[x(i),u(i)]]: od:

[Maple Math]

>

> beta:=0.92:

> RK4sys2(f,g,1.,1.,beta,0.01,100);

> ll4:=[]:for i from 0 to 100 do ll4:=[op(ll4),[x(i),u(i)]]: od:

[Maple Math]

>

> plot({ll1,ll2,ll3,ll4,2},1..2);

[Maple Plot]

>

This method is called the Shooting Method .

>