function result = GaussLobattoIntegration(f,n_nodes)

% performs integration (using Gauss-Lobatto guadrature) of given function f using number of nodes = n_nodes on interval [-1;1]

[nodes,weights] = GaussLobattoFormula(n_nodes);
result = sum(weights .* f(nodes));

end
