Energy transfer during perfectly elastic collision between bodies of same mass My question is similar to this one but it is for sure not a duplicate of it. I basically want to see the same scenario in terms of energy transfer.

What I know for sure is that bodies under collision get deformed and there is nothing like a perfectly rigid body.

Now if we consider a perfectly elastic collision between two identical bodies (in which one was at rest and the other moving towards it at a constant speed), we know that the two bodies are going to deform and thus the kinetic energy of the first body is going to be stored as elastic potential energy in both the bodies (since both get deformed) , but we also know that the first body comes at rest and the second body start moving with the same kinetic energy.

The main cause of my confusion is that I read in my book that when the two collides , the one at rest slowly gains speed and the moving one loses it. The point of maximum compression of the two bodies is the one when both the bodies gain same speed.

What happens after this point and why does the stored elastic potential energy of the moving body is transferred to the body at rest completely ?
 A: I think I understand your question. How is it possible, that even though the first ball deforms and stores elastic energy during the collision, it suddenly ends up with no motion after. The short answer is that some elastic energy is temporarily stored in the left-most ball during the collision, but somehow during the collision, the combination of forces, compression and relative motion makes it so all this stored energy is finally transmitted to kinetic energy in the right-most ball. The quickest way to argue why it must be so is by assuming conservation of energy and momentum, as is typically done in any introductory mechanics course. However, it seems that you would like to "see" the process unfold during the process during the collision.
Let us model the balls as elastic springs obeying Hooke's law. Let $x_1,x_2$ be the positions, $v_1,v_2$ the velocities, $\Delta x_1, \Delta x_2$ the widths, and $m_1,m_2$ the masses of the left-most and right-most ball, respectively.

We assume the balls have equal size and spring constant so that the equilibrium length of both is $\Delta x_0$ and the spring constant is $k$. At the start of the collision, we set $x_1=0$ so that $x_2=\frac{\Delta x_0}{2} + \frac{\Delta x_0}{2}$ and the initial velocities are $v_1 = v_0$, $v_2=0$. During the collision the balls deform, store elastic energy, and exert a force on each other.

Due to N3, the force $F_{21}$ exerted by ball 2 on ball 1 is equal to $-F_{12}$, where $F_{12}$ is the force exerted by ball $1$ on ball $2$.
Since the forces are related to the deformation of the balls, we have
$$
F_{12} = -k_1 (\Delta x_1 - \Delta x_0)
$$
$$
F_{21} = k_2 (\Delta x_2 -\Delta x_0)
$$
Equating $F_{12} = -F_{21}$, we find
$$
k (\Delta x_1 - \Delta x_0) = k (\Delta x_2 -\Delta x_0)
$$
$$
\Delta x_1 = \Delta x_2 \equiv \Delta x
$$
Additionally, we have
$$
x_2-x_1 = \frac{\Delta x_1}{2} + \frac{\Delta x_2}{2} = \Delta x.
$$
From N2, the equations of motion are
$$
a_1 = \frac{k}{m_1} (\Delta x_2 - \Delta x_0) 
= \frac{k}{m_1} (x_2-x_1 - \Delta x_0)
$$
$$
a_2 = -\frac{k}{m_2} (\Delta x_2 - \Delta x_0)
= -\frac{k}{m_2} (x_2-x_1 - \Delta x_0).
$$
where $a_1, a_2$ are the accelerations of balls 1 and 2, respectively.
I don't know if these equations can be solved analytically, but for the purposes of this post, I wrote a midpoint Euler script to solve them numerically. Below is the result from setting $k = 5 N/m$, $\Delta x_0=1 m$, $v_0=3 m/s$, $m_1 = m_2 = 1 kg$:

As we see from the third column (since $\Delta x_1 = \Delta x_2 = \Delta x = x_2-x_1$), both balls are compressed, and thus store elastic energy during the collision. The first ball does move during the collision and ends up at approximately $x_1\sim 0.6m$ after the collision. All the kinetic energy from the first ball is given onto the second, as seen in the middle figure.
I made a simple animation of how it looks when two balls of equal mass collide.

The fact that the first ball comes to a complete stop is due to the masses being equal.
If we increase the mass of the first ball to $m_1 = 2kg$ (keeping $m_2=1kg$), we get the following result

where, as you can see, the both balls continue along after the collision.
For completeness, if we double the mass of the second ball and keeping the first at its original mass, i.e., $m_1=1 kg$, $m_2=2kg$, we get the following:

where the first ball hits the second and turns around.
A: For a perfectly elastic collision any deformation is perfectly elastic, like an ideal spring. This means the deformation is temporary and fully recoverable. The elastic potential energy of the initially moving object is transferred to the initially stationary object while the objects are in contact. The first object comes to rest at separation. The more deformable the objects are the longer they are in contact during the collision and transfer of energy.
Hope this helps.
A: 
then why does the second body ( the body which was at rest earlier) only moves after the collison and why not both of them move with some kinetic energy since both had some stored potential energy ?

Here's the thing, energy is a scalar quantity. Conservation of energy is only dependent on the initial final state. Energy does not care which direction a body moves as long as the total energy in initial and final state are equal. Hence it is not possible to determine how energy would be distributed within the system by using just intuition.
Using energy conservation in case of collisions would give us only half the picture. Energy conservation tells us that the energy of the system may be distributed among the individual components of the system. But how it would be be distributed is given by principle of conservation of momentum (or if you know the impulsive force and the duration for which it acts, then you can find the acceleration of the components and use equations of motion).
The What
During the collision, the kinetic energy of the first body is stored as potential energy in both the bodies due to deformation. But there is no rule that energy has to remain in the same body. But energy has to remain within the system. Since collision occurs between two bodies, we define our system as consisting of those two bodies. And energy may be transferred around in a system.
The Why
But why is energy transferred from one body to another? Because of the internal forces acting on the body. You have to take forces into the picture. Otherwise nothing would make sense. But since we have no way of knowing the magnitude of forces(impulse) during the collision, we make do with conservation of momentum. Conservation of momentum is just another form of Newton's Laws.
The Math
Here I am going to find the final velocity of the bodies by using conservation of energy. The results are going to be same.
When the two bodies collide the kinetic energy of first body is stored as elastic potential in the compressed bodies. The bodies continue undergo compression until comes a moment when both the bodies acquire equal velocities. At this moment, there is maximum compression. We can calculate this velocity $v'$:
$mv=mv'+mv' \Rightarrow v'=\frac v2$ ; $v$ is the original velocity
Now, both the bodies experience equal magnitude of restoring forces. Since masses of both the bodies are same, both bodies experience equal magnitude of acceleration for the same amount of time. Hence by equation of motion, we find that because of the restoring force, the velocity of the first body decreases(restoring force is opposite to direction of velocity) and that of the second body increases(restoring force is in direction of velocity) by same amount (which let us assume to be $V$).
If we apply conservation of energy now:
$U_{initial}=U_{final}\\\Rightarrow \frac 12 mv^2=\frac 12 m(\frac v2 -V)^2+\frac 12 m(\frac v2 +V)^2$
On solving we get $V=\frac v2$.
Hence,
Final velocity of first body: $\frac v2 -V =0$
Final velocity of second body: $\frac v2 +V =v$
This result is consistent with results obtained from Law of Conservation of Momentum. You can also use this if the second velocity has some initial velocity.
The Pitfalls
It is nor rigorous to discuss about increase or decrease in kinetic energy of bodies after collision by using just intuition.
This was a question sent to American Journal of Physics.

Here is the solution:

The Finale
So why does the first ball not move after the collision even though it had some potential energy?
Because the energy stored in the first ball, did not belong to the ball but to the system, which can redistribute energy to whomever within the system it pleases to preserve the laws of the universe. Some of the potential energy was used to slow down the first ball and some of it was used to speed up the second ball. But it so happened for this particular scenario that the Law of Conservation of Energy is pleased only if the first body stops moving and the second body gains all the kinetic energy.(see The Math section)
A: When the first body deforms, it converts some of its kinetic energy into potential energy, while some more of its kinetic energy is transferred to to second body. When the deformation is complete, both of them are moving with the same (lower than initial) velocity, while also having some potential energy stored due to the deformation.
Then, as they both start reforming, the first body slows down further while transferring its own kinetic and potential energy to kinetic energy of the second body. This continues till they both completely reform and lose contact.
For elastic collision when the second body is initially at rest, if the mass of second body is less, then the first body is still moving forward when reformation is completed and contact is lost. If the mass of the second body is greater, then the first body momentarily stops, and then reverses direction while still in contact, and then loses contact. If the masses are same, then the first body loses contact at the exact moment its velocity becomes zero.
A: A perfectly elastic collision is defined by the fact, that no energy goes into the deformation of the bodies. So the misunderstanding lies in the sentence

Now if we consider a perfectly elastic collison between two identical bodies [...], we know that the two bodies are going to deform.

Of course, no collision process is perfectly elastic. More or less elasticity corresponds to more or less energy going into the deformation process. Each collision process fulfills momentum and energy conservation. However, the deformation energy is part of the full energy and while the momentum conservation is does not have such a term. To show how this comes into play, consider the extremal cases:
Perfectly Elastic: Before the collision, the momenta and energies of body 1 and body 2 are:
$$ p_1 = m v,~~ p_2 = 0,~~ E_1 = m v^2/2,~~ E_2 = 0~~\Rightarrow~~ p_{tot} = m v,~~ E_{tot} = m v^2/2. $$
After the collision process, the second body moves with velocity $v$ and the first stands still. Therefore, the momentum is conserved.
$$ p_1 = 0,~~ p_2 = m v,~~ E_1 = 0,~~ E_2 = m v^2/2~~\Rightarrow~~ p_{tot} = m v,~~ E'_{tot} = m v^2/2 + E_{deform} $$
Now, we impose energy conservation and see theta $E_{tot} = E'_{tot}$ implies $E_{deform} = 0$, so no deformation at all.
Perfectly inelastic: In this case, both bodies move at speed $v/2$ after the collision (they are glued together, if you like). Before the process, the parameters are
$$ p_1 = m v,~~ p_2 = 0,~~ E_1 = m v^2/2,~~ E_2 = 0~~\Rightarrow~~ p_{tot} = m v,~~ E_{tot} = m v^2/2. $$
However, we now see that afterwards, while momentum is conserved, we need deformation energy:
$$ p_1 = m v/2,~~ p_2 = m v/2,~~ E_1 = m \frac{(v/2)^2}{2} ,~~ E_2 = m \frac{(v/2)^2}{2}~~\Rightarrow~~ p_{tot} = m v/2 + mv/2 = mv,~~ E'_{tot} = m \frac{(v/2)^2}{2} + m \frac{(v/2)^2}{2} + E_{deform} = m v^2/4 + E_{deform}. $$
Now, energy conservation implies that $E_{deform} = m v^2/4$! This is the maximum value.
Any other case can be worked out by considering any speed of body 1 and 2 that respects momentum conservation and working out the deformation energye, like $v_1 = 2v/3$ and $v_2 = v/3$ and so on.
In a realistic case with nearly elastic bodies, the first one will move after the process, but very slowly, while the other will be close to the initial speed $v$ (e.g. $1 \% v$ vs. $99 \% v$). As you can work out, this corresponds to a very low deformation energy.
I hope that clears things up!
A: If you solve this problem in the center of mass, each object is colliding with $\pm v$ and rebounding with $\mp v$. That is the only way to conserve energy and momentum.
Now if you (Galilean) boost it by $\pm v$, it's pretty clear one ball starts off at rest, and the other ball ends up at rest.
Now in our experience with bouncing balls: harder balls bounce higher. Note also: harder balls are harder to deform. This is not a coincidence. Once you have deformation, you are going to lose energy. You fill the ball with vibrations, they cannot all come back at once and transform their energy back to another ball without any reflection.
A perfectly elastic collision is an idealization, and has no deformation.
A: A perfectly elastic head on collision between two objects (say spheres) of equal masses will result in the first object coming to a stop and the second moving on with the same momentum and kinetic energy possessed by the first object just prior to collision.
Now I believe you may be thinking: Why doesn't the first ball continue to move after the collision due to the elastic potential energy it acquired during the collision? The answer is if it did, it would not satisfy the requirements for conservation of both kinetic energy and momentum for a perfectly elastic collision.
Details of that analysis can be found here:
http://hyperphysics.phy-astr.gsu.edu/hbase/colsta.html
From the site, the head on collision relationships are the following, where the primed variables are post collision.
$$v^{'}_{2}=\frac{2m_1}{m_{1}+m_2}-\frac{m_{1}-m_2}{m_{1}+m_2}v_2$$
$$v^{'}_{1}=\frac{m_{1}-m_2}{m_{1}+m_2}v_1+\frac{2m_2}{m_{1}+m_2}v_2$$
Let $v_1$ = the velocity of mass 1 prior to impact and $v_{2}=0$ the initial velocity of the stationary mass 2.
From these equations, if $m_{1}=m_{2}$ then
$$v^{'}_{2}=v_1$$
$$v^{'}_{1}=0$$
So if the velocity of mass 1 were not zero after the collision, the equations of conservation of momentum and kinetic energy for an elastic collision would not be satisfied.
In order to help understand consider what is happening during the collision, that is, during the time the balls are in contact with one another, consider the following:
Although the second ball acquires the velocity of the first ball after the impact, and the first ball stops, you know that it is impossible for the second ball to acquire that velocity in zero time, and it is impossible for the first ball to stop in zero time. Both would imply infinite acceleration/deceleration and an infinite impact force, which is only possible for perfect rigid bodies, which you already know don't exist.
The above means the two ball are in contact with one another for a finite amount of time while there is conversion of kinetic energy to elastic potential energy and from elastic potential energy back into kinetic energy. After the collision there is no elastic potential energy. From conservation of energy, all the final energy is kinetic energy. From the equations for conservation of momentum and kinetic energy, that kinetic energy is possessed solely by the second ball.

can you provide a physical reason and not using conservation laws ? I
want to know what happens during collision and not why happens .

I thought I did in the second to last paragraph. It is the elasticity of the object that causes the first object to decelerate and the second object to accelerate while they are in contact. Unlike a perfectly rigid bodies which would stop and start instantaneously, the initially moving elastic object decelerates while in contact with the initially stationary object coming to a stop.
The link below demonstrates may help in understanding what is physically happening. The combination of a block and spring represents an elastic object. The block alone would be a perfectly rigid body.
The demonstration begins with three blocks. This is similar to Newton's cradle, except here you can see the elastic deformations involved in the transfer of momentum and kinetic energy.
There are settings you can change. I found the following settings helpful to better see what's going on.
No. of blocks:2
Spring stiffness:10 (a softer spring)
Time rate: 0.1 (slows the motion)
https://www.myphysicslab.com/springs/collide-spring-en.html

thanks for the link but it would be helpful if the springs in
collision were towards each other . In that case both springs would
have been compressed and this would match my exact question.

I was unable in my Google search to find an example where two springs contact each other. But seriously, I don't see why it would make a difference. Two identical springs in series is equivalent to one spring with a spring constant equal to one half that of each spring. That will merely extend the duration of the collision and the forward movement of the initially moving object prior to stopping. The softer (lower $k$) the spring, the longer the duration of the contact, the less the deceleration of the initially moving object, and the further the initially moving object goes before stopping completely.
Hope this helps.
A: Let us make it easy.
Now suppose you take two identical balls that are not rigid (but they also do not lose energy on changing shape). So now as they strike, you assume of it as if one ball striked the other that was at rest and both got maximum deformed (They attain equal velocity i.e. a common velocity)

Now the ball wants to restore its shape so it will push the surface as well as the ball like in the Spring block system spring pushes the wall and the block but the wall is stopped by an external force.
So for ball 1 the force on 1 is acting opposite to the direction of motion and it will retard the ball 1 (and it will eventually come to rest) but force on ball 2 will help it to acclerate..
Note that this is somewhat tentative(Force is a function of time) and if you go for values to find the force then you need experimental observations.
So to avoid the calculation by forming complex equations of kinematics, we prefer by going through the energy pathway that does not need to take this force in account because net work done by this force is Zero.
A: NEWTON'S LAWS OF MOTION:
It can be shown for a perfectly elastic head on collision involving identical objects, strictly using Newton's laws of motion, Object 1 will come to a stop and Object 2 will continue with the initial velocity of Object 1.
We can consider the two colliding objects as a system. Given no friction forces, and the fact that the gravitational force on each object is balanced by the normal reaction force of the surface, then from Newton's second law the net external force $F_{net}$ acting on the COM of the system is
$$F_{net}=MA=0$$
Where
$M=m_{1}+m_{2}=2m$ = the center of mass
$A=0$ = the acceleration of the center of mass
and therefore
$V_{COM}$ = the velocity of the COM of the system (average of the velocities of the two objects) and is constant. Before the collision, we know that
$$V_{COM}= \frac{v_{1}+v_2}{2}=\frac{v_1}{2}$$
And that this velocity remains constant during and after the collision.
While the objects are in contact during the collision, elastic deformation of each occurs. During this time forces are exerted on each object due to the compression of the objects. However, these forces are internal to the system and therefore should have no affect on the center of mass, i.e., the velocity of the COM remains constant.
We now look at what is happening during the collision using Newton's laws.
DURING THE COLLISION:
Modeling each object as a combination of an identical rigid body and ideal massless spring, where the spring represents the elasticity of each object, the collision of the springs results in a force acting upon each object. Per Newton's 3rd law
$$F_{1}=-F_{2}$$
Where
$F_1$ = the net force that Object 2's spring exerts on Object 1
$F_2$ = the net force that Object 1's spring exerts on Object 2
Since the masses of the two objects are identical, the accelerations are equal and opposite, or
$a_{1}=-a_{2}$
Since the duration of each acceleration is the same (the objects are in contact with one another for the same time), the change in velocity of Object 1 equals minus the change in velocity of Object 2,
$v^{'}_{1}-v_{1}=-(v^{'}_{2}-v_{2})$
Where the prime values are the velocities upon separation. Since Object 2 was initially stationary, $v_{2}=0$ and
(1)  $v^{'}_{1}-v_{1}=-v^{'}_{2}$
We couple this with the velocity of the COM;
$$V_{COM}=\frac{v_1}{2}=\frac{v^{'}_{1}+v^{'}_2}{2}$$
(2) $v_{1}=v^{'}_{1}+v^{'}_2$
Solving equations (1) and (2) simultaneously gives
$$v^{'}_{2}=v_1$$
Since the final velocity of Object 2 equals the initial velocity of Object 1, and there is no change in total kinetic energy, the final velocity of Object 1 must be zero.
As a final comment, if Object 1 continued to move forward after the collision, this would indicate that the collision was inelastic. This can be shown in the simulation from the following link:
https://www.myphysicslab.com/springs/collide-spring-en.html
Although the simulation does not show both objects with a spring, it wouldn't matter on the behavior of the colliding objects since two identical springs in series is equivalent to one spring with a spring constant equal to one half that of each spring.
To see the effect of an inelastic collision, change the setting for the "spring damping" from zero, which is the default for an elastic collision, so say, 0.5 which damps the spring making it an inelastic collision. You will then observe that the first object will continue moving after the collision.
Hope this helps.
A: The crux of your question seems to be attempting to reconcile the apparent symmetry of two balls compressing under each other's equal but opposite applied force, but moving asymmetrically after rebound.  Others answers have detailed how, in the reference frame where one ball is at rest before collision and the other ball is moving, this asymmetrical result is the only result permitted under the laws of conservation of energy and conservation of momentum.
Though you have not explicitly stated that you are thinking about symmetry, it is important to state that this reference frame is inherently non-symmetrical because the center of mass is moving in the same direction as the moving ball.  In other words, there is a preferred direction for the center of mass, violating symmetry.
The outcome that you are looking for, where both balls move away from each other at the same speed, will be observed in the reference frame that moves with the center of mass. In this reference frame, the momentum of the center of mass (and thus the total momentum of the system) is 0, and symmetry will prevail through all 3 phases of motion: approach, collision, and recoil
A: Before the collision only the object A moves:
$p_0 = mv_A$
$E_0 = \frac{1}{2}mv_A^2$
After the collision momentum is conserved:
$mv_A' + mv_B' = mv_A \implies v_A' + v_B' = v_A$
The translational kinetic energy is not conserved, since the OP assumes they undergo elastic deformation. That deformation once happens, continues as elastic waves in the bodies. In the real world it is dissipated as sound and/or heat.
$\frac{1}{2}mv_A'^2 + \frac{1}{2}mv_B'^2 = \frac{1}{2}mv_A^2 - \delta E \implies v_A'^2 + v_B'^2 = v_A^2 - 2\frac{\delta E}{m}$
If we square the equation for momentum and subtract from the equation for energy:
$v_A'v_B'= -\frac{\delta E}{m}$
The conclusion is that the body A, that was moving before the collision, is not at rest after it, but recoils.
A: During perfectly elastic collisions the 2 things remain conserve:

*

*Kinetic energy

*Linear Momentum

Everyday observable examples of perfectly elastic collisions don't exist—some kinetic energy is always lost, as it is converted into heat transfer due to friction.
So, the thing in elastic collision is that we assume their is no deformation between objects so,
If an object is moving towards other object which is at rest and they collided so we assume that a very little kinetic energy is lost in that(so neglecting it) and to conserve the 2 things the moving body has to be stopped so that the law is followed.
Now it is difficult to think of this with balls, so you can take a look at this link:
believe me the demo is amazing and I got the idea behind this, I hope you may also
A: 
why doesn't the first block move even if it had some potential energy

Just because the first ball has EPE doesn't mean it has to move. For example, if you compress a spring and let it go, it will vibrate on the spot and eventually come to rest (even in a vacuum, because of internal resistance).
In this case, imagine two ice skaters moving together with constant speed. Then both of them pushes each other away with just enough force such that one of them slows and stops, while the other moves away at a faster speed.

What happens after this point and why does the stored elastic potential energy of the moving body is transferred to the body at rest completely?

Let me try to answer this in a simple and intuitive way. Let the initial velocity be $v_0$, and $m_1 = m_2 = m$. By the law of conservation of momentum,
$$v_1 = v_2 = \frac{1}{2} v_0$$
at the point of maximum compression. Hence,
$$\begin{equation}\begin{aligned}
KE_{total} &= \frac{1}{2}m\left(\frac{1}{2}v_0\right)^2+\frac{1}{2}m\left(\frac{1}{2}v_0\right)^2\\
&=\frac{1}{4}mv_0^2\\
\end{aligned}\end{equation}\tag{2}\label{eq2}$$
Since the total kinetic energy is half of the total initial energy (which is the KE of ball #1),
Key #1: Total KE = Total EPE, and the KE and EPE of each ball is the same
(This is only true if both balls have the same mass. The bigger $m_2$ is relative to $m_1$, the more kinetic energy is converted into elastic energy)
The elastic potential energy stored in both balls is then converted to kinetic potential energy for both balls. Since the forces exerted on each other are equal and opposite at all times (N3L),
Key #2: EPE stored and EPE converted into KE in each ball is the same
By examining the direction of the normal contact forces, we can see that ball #1 is doing work on ball #2 to accelerate it, while ball #2 is doing work on ball #1 to decelerate it. Since KE = EPE in each ball, ball #1 has net 0 energy while ball #2 has the initial total energy.
Another way to think about it is from a stationary frame of reference. From the viewpoint of an observer moving at $\frac{1}{2} v_0$, after the collision, the balls are moving away from each other at velocities of $-\frac{1}{2}v_0$ and $\frac{1}{2}v_0$, which is as expected.
