Question
Question: 2 block are connected by a spring and a force is applied on one of the block find the maximum extens...
2 block are connected by a spring and a force is applied on one of the block find the maximum extension in spring

2 \frac{F m_2}{k(m_1 + m_2)}
Solution
Let m1 and m2 be the masses of the two blocks, k be the spring constant, and F be the applied force on block m1. The blocks are initially at rest and the spring is at its natural length.
Let x1 and x2 be the positions of the blocks m1 and m2 respectively, measured from their initial positions. The extension of the spring is x=x1−x2.
The equation of motion for m1 is:
m1dt2d2x1=F−kxThe equation of motion for m2 is:
m2dt2d2x2=kxSubtracting the second equation divided by m2 from the first equation divided by m1, we get the equation for the relative acceleration dt2d2x=dt2d2x1−dt2d2x2:
dt2d2x=m1F−kx−m2kx=m1F−kx(m11+m21)=m1F−kxm1m2m1+m2Let μ=m1+m2m1m2 be the reduced mass. The equation becomes:
dt2d2x=m1F−μkxLet's find the equilibrium extension xeq where dt2d2x=0:
0=m1F−μkxeq⟹xeq=m1kFμ=m1kFm1+m2m1m2=k(m1+m2)Fm2Let y=x−xeq. Then dt2d2y=dt2d2x.
dt2d2y=m1F−μk(y+xeq)=m1F−μky−μkxeqSubstituting xeq=m1kFμ:
dt2d2y=m1F−μky−μkm1kFμ=m1F−μky−m1F=−μkyThis is the equation of a simple harmonic oscillator for the variable y, with angular frequency ω=μk. The initial conditions are x(0)=0 (natural length) and dtdx(0)=v1(0)−v2(0)=0−0=0. In terms of y, the initial conditions are:
y(0)=x(0)−xeq=0−xeq=−xeq dtdy(0)=dtdx(0)=0The general solution for dt2d2y=−ω2y is y(t)=Acos(ωt)+Bsin(ωt). Using the initial condition dtdy(0)=0:
dtdy(t)=−Aωsin(ωt)+Bωcos(ωt) dtdy(0)=Bω=0⟹B=0So, y(t)=Acos(ωt).
Using the initial condition y(0)=−xeq:
y(0)=Acos(0)=A=−xeqThus, the solution for y(t) is y(t)=−xeqcos(ωt).
The extension x(t) is given by x(t)=y(t)+xeq=−xeqcos(ωt)+xeq=xeq(1−cos(ωt)).
The extension x(t) oscillates around the equilibrium extension xeq. The maximum value of x(t) occurs when cos(ωt)=−1.
xmax=xeq(1−(−1))=2xeqSubstituting the value of xeq:
xmax=2k(m1+m2)Fm2This formula gives the maximum extension in the spring when a force F is applied to block m1. If the force F were applied to block m2 instead, the result would be xmax=2k(m1+m2)Fm1.
The question does not specify the masses or the force, so the answer is the formula in terms of F, k, m1, and m2.