This is a problem from my Classical Mechanics course, and it is: Suppose the potential in a problem of one degree of freedom is linearly dependent upon time, such that the Hamiltonian has the form
where $A$ is a constant. Solve the dynamical problem by means of the Hamiltonian-Jacobi equation, under the initial conditions $q=0$, $p=mv_0$ at $t=0$.
I substituted the Hamiltonian into the Hamilton-Jacobi's equation:
However I do not know how to solve for S.