function Galerkin1d(n)

A = zeros(n,n); bvlnka = zeros(n,1);
for i=1:n, for j=1:n, A(i,j) = i*j/(i+j-1); end; bvlnka(i) = 1/(i+1.5)+1; end
uH = A\bvlnka;
x = 0:0.01:1; u = x.^0; for i=1:n, u = u+uH(i)*x.^i; end
plot(x,u,'b') %,x,-x.^2/2+2*x+1,'r')