Using the Madelung-Bohm formalism of quantum mechanics and taking into account the relationship with the Ermakov equation, in this work we solve the Ermakov equation in a general form and present applications related to the simple harmonic oscillator with a timedependent potential, where we calculate the Bohm potentials for each given example.