%
% testing the nonlinear shooting method.
%
BV.a = 1;
BV.b = 3;
BV.alpha=17;
BV.beta=43/3;
BV.tol = 1e-6;
BV.t0  = -1;
BV.N   = 100;
[fun, x, t, flg] = NonlinearShooting(@myfunc4, @myfunc4dy, @myfunc4dyp, BV);
exactfun = x.^2 + 16./x;
clf;
subplot(2,1,1);
plot(x(:),fun(:),'b.-');
title('BVP Solution by Nonlinear Shooting');
subplot(2,1,2);
plot(x(:),fun(:)-exactfun(:),'b.-');
title(['# of Newton Iterations = ', num2str(length(t)), '; Errors in BVP Solution']);
