 
%% exact solution


u_sol1 = @(x_1, x_2) 2*sin(x_1)*sin(x_2);
%u_sol2 = @(x1, x2) (2-1)*sin(x1)*sin(x2);
%u_sol3 = @(x1, x2) (2-2)*sin(x1)*sin(x2);

xmin = -pi;
xmax = pi;
ymin = -pi;
ymax = pi;
% tmin = 0;
% tmax = 1;
ezsurf(u_sol1,[xmin,xmax,ymin,ymax]);
%ezsurf(u_sol2,[xmin,xmax,xmin,xmax]);
%ezsurf(u_sol3,[xmin,xmax,xmin,xmax]);

%legend('t=0','t=1','t=2');

%%

hold on 

u_sol1 = @(t,x) min(1-t,1 -abs(x));
u_sol2 = @(t,x) 1-t;

xmin = 0;
xmax = 1;
ymin = -1;
ymax = 1;
% tmin = 0;
% tmax = 1;
ezsurf(u_sol1,[xmin,xmax,ymin,ymax]);
%ezsurf(u_sol2,[xmin,xmax,xmin,xmax]);


hold off