In this paper, we present the general Bernstein functions for the first time. The properties of generalized Bernstein basis functions are given and demonstrated. The classical Bernstein polynomial bases are merely a subset of the general Bernstein functions. Based on the new Bernstein base functions and the collocation method, we present a numerical method for solving linear and nonlinear
‐fractional differential equations (
‐FDEs) with variable coefficients. The fractional derivative used in this work is the
‐Caputo fractional derivative sense (
‐CFD). Combining the Bernstein functions basis and the collocation methods yields the approximation solution of nonlinear differential equations. These base functions can be used to solve many problems in applied mathematics, including calculus of variations, differential equations, optimal control, and integral equations. Furthermore, the convergence of the method is rigorously justified and supported by numerical experiments.