I'm trying to reconcile two methods of approaching a problem, see picture below:
Disregarding the angle of the surface and any friction, calculate the velocity $v$ of a particle pulled back a distance $b$ against an elastic cord and released. Calculate the velocity at the point where the elastic cord is $2a$ long and assumed to be slack.
I've developed two approaches to the problem but they give me two different answers even though they are essentially the same thing. They are formulated as either calculating the stored elastic energy in the cord or calculating the work done by the force from the cord.
Approach 1 (stored potential energy)
This approach is simply recognizing that the amount of work and subsequent kinetic energy the cord can give the particle is equal to the stored potential energy $U=\frac{1}{2}kx^2$. The stretched distance is $x=2(\sqrt{a^2+b^2}-a)$ and thus the kinetic energy of the particle will be:
$$E_{k}=U=2k(2a^2+b^2-2a\sqrt{a^2+b^2})$$
Approach 2 (work performed)
This approach requires a determination of the resultant force acting on the particle and then calculating the work performed which equals the kinetic energy. We can try and describe the forces as a function of the distance from release, see picture:
We find that the force is $F(x)=k(\sqrt{a^2+x^2}-a)$. The resultant force acting on the particle is two times the vertical component of $F(x)$ which can be found by using law of sines as:
$$F_{res}(x)=2k(x-\frac {ax}{\sqrt{a^2+x^2}})$$
We can then describe an infinitesimal amount of work as $dW=F_{res}(x)dx$ and integrate over the distance from $0$ to $b$. The integrand is trivial and the result is:
$$E_{k}=W=2k(a^2+\frac{b^2}{2}-a\sqrt{a^2+b^2})$$
If we now compare the two approaches we see that a factor of $2$ is missing in the second approach. I know for a fact that the answer from the first approach using stored potential energy is the correct answer so something is wrong with the way i formulate my work approach.
What am I missing? Could someone please explain to me?