It has been a difficult task to solve fractional oscillators analytically, especially when variable-order fractional derivatives (FDs) are included. The major difficulty consists in deriving analytical expressions for the variable FDs of trigonometric functions. To tackle this problem, a memory-free transformation for constant-order FDs is modified to transform the variable FDs equivalently into a nonlinear differential equation of integer order. Based on the equivalent equation, an analytical solution is obtained for the variable FD, showing nice agreement with numerical results. According to the approximate analytical solution in closed form, the frequency amplitude curve and the backbone line of variable fractional oscillators are determined accurately. In addition, it provides us with convenience in analyzing the primary resonance.