  function alpha = BVP_Collocation(a,ua,b,ub,q,r,n)
% a<b and ua and ub are scalars.
% q and r are handles to functions q(x) and r(x) defined on [a,b].
% n is a positive integer >=2.
% alpha is a column (n+2)-vector with the property that if
%
%           utilde(x) = alpha(1)B_0(x) + ... + alpha(n+2)*B_{n+1}(x)
% 
% then 
%           utilde(a) = ua
%          -utilde''(z(i)) + q(z(i))u(z(i)) = r(z(i))     i=1:n
%           utilde(b) = ub
%
% where z = linspace(a,b,n) and
% B_{k}(z) is the B-spline Bstar((z-xk)/h) where xk = a+(k-1)h
% and h = (b-a)/(n-1).
