

% Create f(t) as defined in the question, but vectorised w.r.t. X_cvector = x_cvector(2 : end - 1) % discard outer edges, keep inner only.

X_cvector = linspace( 0, 1, N + 1 ).' % N+1 edges, including outer ones x = 0 and x = 1), we only care for the 'inner edges', hence we only need to deal with vectors of N-1 elements (hence the size of matrix A). Since you are given the solutions for the 'outer' edges (i.e.

