c=-100;
e=1;
j=1;
f[x_]:=If[x>((b-a)/2),0,c/(e*j)];
n=36;
a=0;
b=1;
ya=0;
yb=0;
yad=0;
ybd=0;
presneriesenie[x_]:=((f[x]*x^2)/24)*(x^2-2x+1);

Nosnik[a_,b_,f_,n_]:=(
h=(b-a)/(n+1);
A=IdentityMatrix[n];
Do[A[[i,i]]=6,{i,1,n}];
Do[A[[i,i+1]]=-4,{i,1,n-1}];
Do[A[[i,i-1]]=-4,{i,2,n}];
Do[A[[i,i+2]]=1,{i,1,n-2}];
Do[A[[i,i-2]]=1,{i,3,n}];
A[[1,1]]=A[[1,1]]+1;
A[[n,n]]=A[[n,n]]+1;
Print[MatrixForm[A]];
ps=Table[f[a+i*h]*h^4,{i,1,n}];
Print[ps];
riesenie=Inverse[A].ps;
Print[N[riesenie]];
xs=Table[a+(i-1)*h,{i,1,n+2}];
ys=Join[{ya},Table[riesenie[[i]],{i,1,n}],{yb}];
Print[xs];
Print[N[ys]];
graf=Table[{N[xs[[i]]],N[ys[[i]]]},{i,1,n+2}];
vysledky=Table[{N[xs[[i]]],N[ys[[i]]],N[presneriesenie[xs[[i]]]],N[Abs[(ys[[i]]-presneriesenie[xs[[i]]])]]},{i,1,n+2}]
)

Nosnik[a,b,f,n]

g1=Plot[presneriesenie[x],{x,a,b},PlotRange->All,PlotStyle->RGBColor[0,1,0]];

g2=ListPlot[graf,PlotRange->All,PlotStyle->RGBColor[0,0,1]];

Show[g1,g2]