# Why I find two possible $S$ of a free particle by solving the Hamilton-Jacobi Equation?

For a free particle, the Hamiltonian is

$$H(p)=\frac{p^2}{2m}.$$

The corresponding H-J equation thus can be written as

$$\frac{1}{2m} \left(\frac{\partial S(q,t)}{\partial q}\right)^2=- \frac{\partial S(q,t)}{\partial t}$$

To solve the partial differential equation of $$S(q,t)$$, i assume there are two possible forms of solution:

(a) $$S(q,t)=F(q)+G(t)$$

then the H-J equation is

$$\frac{1}{2m}\left(\frac{dF}{dq}\right)^2=-\frac{dG}{dt}=\alpha$$

we can obtain

$$F(q)=\pm \sqrt{2m\alpha}q+c_1 \\ G(t)=-\alpha t+c_2$$

Then, the $$S(q,t)$$ is the form

$$S(q,t)=\pm \sqrt{2m\alpha}q-\alpha t+c \tag{1}$$

(b) $$S(q,t)=F(q)G(t)$$

then the H-J equation is

$$\frac{1}{2m}\left(\frac{dF}{dq}\right)^2\frac{1}{F}=-\frac{dG}{dt}\frac{1}{G^2}=\alpha$$

we can obtain

$$F(q)=\left(\pm\frac{q}{2}\sqrt{2m\alpha}+c_1\right)^2 \\ G(t)=\frac{1}{\alpha t+c_2}$$

Then, the $$S(q,t)$$ is the form

$$S(q,t)=\left(\pm\frac{q}{2}\sqrt{2m\alpha}+c_1\right)^2\frac{1}{\alpha t+c_2} \tag{2}$$

So, there is the question: The $$S(q,t)$$ given in (a) and (b) are obviously different! Which is the right $$S(q,t)$$ for the free particle?