% Numerische Differentiation
dx=0.0001;
x2 = -4:0.05:4;
x = x2;
y1 = (x.^5+x.^4-x.^3-x)./(x.^3+x.^2+x+1);
x = x+dx;
y2 = (x.^5+x.^4-x.^3-x)./(x.^3+x.^2+x+1);
x = x+dx;
y3 = (x.^5+x.^4-x.^3-x)./(x.^3+x.^2+x+1);
x = x+dx;
y4 = (x.^5+x.^4-x.^3-x)./(x.^3+x.^2+x+1);
y1s = (y2-y1)./dx;
y2s = (y3-2.*y2+y1)./dx;
y2s = y2s./dx;
y3s = (y4-3.*y3+3.*y2-y1)./dx;
y3s = y3s./dx;
ya = x.^2-2;
plot(x2,ya,x2,y1,x2,y1s,x2,y2s,x2,y3s); grid
title ('F(x)=(x.^5+x.^4-x.^3-x)./(x.^3+x.^2+x+1)')
axis ([-4,4,-10,10])
