function FEM1dExample2(n)

% -u1''(x) = 10 v (0,1/2)
% -3*u2''(x) = 10 v (1/2,1)
% u1(0) = 0
% 3*u2'(1) = 2
% u1(1/2) = u2(1/2)
% u1'(1/2) = 3*u2'(1/2)

l = 1;
tau = 2;
k = [1*ones(1,round(n/2)),3*ones(1,round(n/2)+1)];
f = 10 * ones(1,n);

[A,b] = FEM1d(l,k,f,tau);
u = A\b;

x = linspace(0,l,n+1);
plot(x,[0,u'])