equation = @(x,y) x*diff(y, 2)+2*diff(y)-(6*x+4*x^3)*y;
domain = [0, 1];
conditions = @(y) {y(0) - 1; diff(y,0)};
options = tau.settings('degree', 50, 'basis', 'LegendreP');
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)-exp(u.^2)));
title('Absolute error')