Max extension of spring mass system While attempting problems of simple harmonic motion I came across this problem, which has gotten me confused. 
A fixed horizontal spring is stretched by a constant  force $F$. I am required to obtain the maximum elongation of that spring. But the problem is which method is correct, the energy method or the force method? Do let me know the misconception in the wrong path.
Method 1:
$$\text{For Equilibrium}\\ \; F= kx_\text{max}\\ \implies x_\text{max}= \frac{F}{k}\;.$$
Method 2:
$$\text{Work done by the force}\; = \text{change in potential energy of the spring}\\ \text{i.e.} \; F\cdot x_\text{max}= \frac{1}{2} kx_\text{max}^2\\ \implies x_\text{max} = \frac{2F}{k}\; .$$ 
 A: The first method is giving the correct answer. In writing the work done by the force, you are assuming that the force $F$ itself is constant throughout the extension. However, this is not true. While extending the spring in a quasi-static way, the force $F$ must always match exactly the spring force at that time. This is needed so that at the end of the extension, the spring remains at rest. Once we understand this, we note that the force at extension $x$ is $F(x) = k x$. Then, the work done along the path is
$$
\int_0^{x_{\max}} F(x) dx = \frac{1}{2} k x_\max^2
$$
The latter of course is precisely the potential energy of the spring. Thus, the "energy conservation" equation is trivial and does not yield any new information. 
A: If you use a constant force along the path, the spring will move past the position where $F=kx$, because it will reach that point at some speed. Thus it is incorrect to use the force method in the way you used it, because at maximal extension $v=0$ but $a\neq0$. The energy method as you used it will give the correct answer.  If, instead, the force is used to keep the spring elongated at rest, then the force method is correct. To see why  read Prahar's answer.
