 n=input('n=');

for i=1:n+1
    x(i)=-cos((i-1)*pi/n);
    p(i)=0; q(i)=0;
    u(i)=0;
end

for k=1:20
	for i=1:n+1
		g(i)=fn(x(i))-exp(u(i));
        end
	u=col_bvp2(n,x,g,p,q,1,0,0,1,0,0);
    for i=1:n+1
        err(i)=u(i)-sin(pi*x(i));
    end
    max(abs(err))
end
