In this paper we study a generalization of the Johann Bernoulli's solution of the brachistocrone problem. We will see that his method can be quickly extended in such a way that it can be used to solve other problems in a similar way using just elementary calculus methods. In addition, we will show that it is not necessary to know Euler's formalism for the calculus of variations, making it a handy and useful method for engineering applications. The provided examples will illustrate that this technique is equivalent to Euler's equation of the calculus of variations; for the particular case where one of the variables do not appear explicitly. (C) 2013 Elsevier Inc. All rights reserved.