CellPrint[TextCell[Quiet[cdf =Manipulate[Column[{ "Fórmula usada:\n"<>ToString@ TraditionalForm[(("f")^("(1)"))[x0]]<>"≈"TraditionalForm@formulas[[u]], Dynamic@SuFunc}],
Style[proposito,Bold,10],Spacer[{100,3}],
 (*Inicio contadores *)
 {{u,1,"Orden de la derivada para aproximar: "},2,2,2,ControlType->None},
{{ff,Cos[x],"f(x) = "},ControlType->InputField},
{{punto,2,"x0 = "},ControlType->InputField},
{{hache,0.1,"h = "},ControlType->InputField},
{{ene,4,"n = "},ControlType->InputField},
Button["Calcular", Dynamic@ SuFunc]
(* Fin contadores *)
,Alignment->Center,Deployed->True,AppearanceElements->"ResetButton",LocalizeVariables->True,ContinuousAction->False,FrameLabel->{{None,None},{Column[{,Row[{Style["Autores: Juan Félix Ávila Herrera y Enrique Vílchez Quesada",Bold,10,RGBColor[0,0,0.5]]}],Row[{Style["Escuela de Informática | Universidad Nacional de Costa Rica",Bold,10,RGBColor[0.5,0.1,0]]}]},Center],Style["Extrapolación de Richardson ", Bold,14, RGBColor[0,0.33,0.33]]}},
Initialization:>(
formulas ={nada,  (1/(2h))( f[h+x0]- f[ x0-h])};
 
Clear[f];
u=2;

(*($PreRead=(#/. s_String/;StringMatchQ[s,NumberString]&&Precision@ToExpression@s==MachinePrecision:>s<>"`12."&));*)
proposito ="Propósito: Aproximar la primera derivada usando extrapolación de Richardson";
SuFunc := Module[{aux, resp, pt, coef},
resp[x_] := If[x==Round[x], x,ToString[x, InputForm]<> "≈"<>ToString[Sign[x]AccountingForm[Abs@N@x]]];
f[t_] := ff/.x->t;
aux =formulas[[u]]/.{x0-> punto, h->hache, f->g };
(**)
F[h_] := (((f[x0+h]-f[x0-h])/(2h))/.{x0-> punto, f->g });
 
n=ene;
Q =Table[0, {i, n}, {i, n}];
Q[[1, 1]]= F[hache];
For[j=1,j≤n,j++,
For[i=1,i≤n,i++, 
Q[[i, j]] = Which[j==1,F[(hache/(2^(i-1)))] , j>i, 0,True,  (((4^(j-1))Q[[i, j-1]]-Q[[i-1, j-1]])/((4^(j-1))-1))];
 
]
];
Q =N[Q];
aux =Q[[n, n]];
(**)
aux = ToString@ TraditionalForm[(("f")^("(1)"))[punto]]<>" ≈ "<>ToString[Sign[aux]AccountingForm[Abs@aux]]<>"\nUsando Mathematica: "<> ToString@ TraditionalForm[(("f")^("(1)"))[punto]]<>" = "<>ToString[resp[D[f[x], {x, 1}]/.x->punto]]<>"\nQ="MatrixForm@Q;
Clear[f];
aux
];
Dynamic@SuFunc
)]],"Text"]]