{x0,x1,x2}={0,.6,.9};
{a,b}={0,.6};
f[x_]=Cos[x];
ErrorBound[x_,n_]=Max[D[f[x],{x,n+1}]/.x->a,D[f[x],{x,n+1}]/.x->b] (x-x0) (x-x1)/(n+1)!
Abs[ErrorBound[.45,2]]

FindMaximum[{Abs[D[f[x],{x,2}]],x0≤ x≤ x1},{x,(x0+x1)/2}]

{x0,x1,x2}={0,.6,.9};
f[x_]=Log[x+1];
ErrorBound[x_,n_]=FindMaximum[{Abs[D[f[y],{y,n+1}]],x0≤ y≤ x1},{y,(x0+x1)/2}] (x-x0) (x-x1)/(n+1)!
Abs[ErrorBound[.45,1]]