Series[f[x],{x,x0,5}]

ListPlot[{#,numDer2[((#)^2)&,#,0.1]-2#}&/@Range[-1,2,0.01]]

numDer2[f_,x_,Δx_]:=(1/(Δx))*(f[x+Δx]-f[x]);
Plot[numDer[Sin,x,0.1]-Cos[x],{x,-1,2},PlotRange->All,AxesOrigin->{0,0},PlotStyle->Thick]

numDer[f_,x_,Δx_]:=(0.5/(Δx))*(f[x+Δx]-f[x-Δx]);
Δ0=0.1;
Δderivace=0.1;
fTry=(((#-1))^2)&;
krok[{x_,fx_,q_}]:=Module[{xnew},xnew=x-q*Δ0*Sign[numDer[fTry,x,Δderivace]];{xnew,fTry[xnew],0.98q}];
res=NestWhileList[krok,{5,fTry[5],1},#1[[2]]>#2[[2]]&,2];
ListPlot[res/.{a_,b_,c_}:>{a,b}]

Plot3D[Sin[x]+Cos[y],{x,-2Pi,2Pi},{y,-2Pi,2Pi}]

n=3;
Δderivace=0.1;
fnD[{x_,y_,z_}]:=(((x-1))^2)+(((y-3))^2)+(((z+2))^2);
vectDer[list_]:=Module[{n,mat,fpom},n=Length[list];mat=IdentityMatrix[n];fpom[v_]:=Module[{a,b},a=fnD[list+Δderivace*v];b=fnD[list-Δderivace*v];0.5*((a-b)/(Δderivace))*v];Plus@@(fpom/@mat)];