Two confusing spring problems solved in different ways

I've read in the chat room and in the questions regarding spring and it raised a problem in my mind . Here are two cases which i adopted from other users .

Case-1

After compressing the ball , the ball is let go . It's required to find the distance traversed before it stops . I saw users mentioning the use of conservation of energy as follows : $$\frac{1}{2}k(\Delta x)^{2}=\mu mg.l$$ . This gives the distance required . Now , if I want to use another method , I say : $$F=k(\Delta x)$$ .and so $F=2.5N$ . Again , $F=ma$ which gives $a=50ms^{-2}$ . From Newton's second law , I get that this acceleration works until the spring covers $0.1m$ from compressed position .At last point where it is back to normal , $$v^{2}=u^{2} + 2a(\Delta x)$$ and so $v=\sqrt{10}$ .Now , I use the previous formula , where $a=\mu g$ and final velocity is $0$ and initial velocity is $\sqrt{10}$ . But the answers don't match .

Case-2

In the second case , its required to find the velocity of ball after rebound . I see the users stating $$elastic potential energy + gravitational potential energy = rebound kinetic energy$$ . They use the equation $$\frac{1}{2}mv^{2}=0.5 .mg+\frac{1}{2}k(\Delta x)^{2}$$ . But , considering force , it can be written as : $$kx+mg=ma$$ and then $v=\sqrt{2a\times 0.5}$ . But the answers are different .

MY QUESTION Where are the discrepancy between the methods of energy and force ? Why are different answers coming out ?

• Could you please edit your question to remove errors and actually state the problem? You talk about "the distance required," but all I see is a photo of a whiteboard with some sketches. – Chemomechanics Mar 20 '18 at 16:38
• @Chemomechanics ..I've edited my question ... – user182687 Mar 23 '18 at 15:56
• Force from a spring is dependent on displacement. But you appear to be treating it as a constant. – BowlOfRed Mar 23 '18 at 16:01
• @BowlOfRed... I'm unable to understand what you say ... I've used $F=k\delta x$ ... – user182687 Mar 23 '18 at 16:03
• Are you considering the acceleration a constant in your $v^2 = u^2 +2a(\Delta x)$ equation? If not, I don't see how it is calculated. If so, that depends on the (non-constant) force. – BowlOfRed Mar 23 '18 at 16:23

Newton's Second law gives us $F=ma$ and using calculus that reduces to $$F=m\times \frac {dv}{dt} =m\times \frac{d^2x}{dt^2}$$
you have assumed $\frac{d^2x}{dt^2}$ as constant which obviously changes with time. As the spring releases the ball in either scenario the force of the spring also changes with every infinitesimal change in position of the ball. So the acceleration is a function of displacement of the spring.
$v^{2}=u^{2} + 2a(\Delta x)$ and $v= \sqrt{2\times a\Delta x}$ are both derived assuming acceleration (a) is constant which it is not. Hence you cannot use these equations here.