Here is another function g[n,x] that return the difference between Cos[x] and an expansion to order n of Cos[x] around zero at the point x. This definition is similar to the definition of f[n,x] , except that the variable t is not used. Will this definition work if the argument x in g[n,x] is a number?