equation = @(x,y) y + diff(y, 2); domain = [0 10*pi]; conditions = @(y) {y(0) - 1; diff(y,10*pi)}; options = tau.settings('degree', 100, 'pieces', 5); problem = tau.problem(equation, domain, conditions, options); % solution via tau method [yn, info] = tau.solve(problem); % compare result with the exact solution u = linspace(yn); semilogy(u, abs(yn(u)-cos(u))); title('Absolute error')