clear all
close all

% where we solve
a = 
b = 

% grid
n = 
h = (b-a)/n;
x = a:h:b;
y = zeros(1,n+1);

% initial guess for Newton
y0 = 
% solve nonlinear system
y = fsolve(@(y) system(y, n, h), y0);

figure;
plot (x,y);
xlabel('x');
ylabel('y(x)');

% define the nonlinear system
function F = system(y, n, h)

    F(1) = 
    for i = 2:n
        F(i) = 
    end    
    F(n+1) = 

end

