set(0, "defaultlinelinewidth", 5);
set (0, "defaulttextfontname", "TimesNewRoman")
set (0, "defaulttextfontsize", 20)
set (0, "DefaultAxesFontName", "TimesNewRoman")
set(0, 'DefaultAxesFontSize', 20)
function [y] =analytical(x, ep)
alpha = (ep^2 + 1)^0.5;
B = exp(ep)/(exp(-alpha) - exp(alpha)); A = -B;
y = exp(-ep*x).*(A*exp(alpha*x) + B*exp(-alpha*x));
end
ep = 0.3;
x = linspace(0,1,20); y = analytical(x, ep);
y0 = sinh(x)/sinh(1);
y1 = (1-x).*sinh(x)/sinh(1);
plot(x, y,'r');
hold on
plot(x, y0,'--k');
plot(x, y0+ep*y1, 'ok')