QUESTION
What will be the compression in this picture?
Many problems relating to springs are when one side of the springs are fixed and the other is free to deflect. But what happens when the spring is free to move on both sides? How does the kinematics of the spring change with respect to the different forces on the spring?
TRIAL
Generally, for any force $F1$ and $F2$ and a spring constant of $K$ the spring will compress by the formula:
$$\Delta x= \frac{min(F1,F2)}{K}$$ and it will accelerate by $$a=\frac{(F1-F2)}{m}.$$
Best Answer
You are wrong, because the acceleration will cause the spring to compress under its own inertia. I assume without loss of generality $F_1>F_2$. The balanced part of the forces will compress the spring as usual, the compression is $$\Delta x_b=\frac{F_2}{k}.$$ The compression under acceleration is equivalent to the compression of the spring under its own weight in a gravitational field with gravitational acceleration $g=a=\frac{F_1-F_2}{m}$. The compression under acceleration is $$\Delta x_a=\frac{ma}{2k}=\frac{F_1-F_2}{2k}.$$ The total compression is $$\Delta x_\text{Total}=\Delta x_b +\Delta x_a=\frac{F_1+F_2}{2k}.$$
Note that this is the compression in the steady state, after the oscillations have settled down. If you apply these forces to a spring initially at rest, it will also start to oscillate.
Edit:
Derivation of $\Delta x_a$
Assume a spring in a gravitational field standing vertically on a desk. The spring will be compressed under its own weight. Divide the unstretched spring into infinitesimal segments dl. Each of these segments will compress a distance dx under the weight of all segments on top of it. The top segment has no weight above itself, so it is uncompressed. The segment at the bottom has the weight of the whole spring above, so it will compress the most. If we divide the spring into segments of length dl, the spring constant of each segment is $k'=k\frac{L}{dl}.$
The compression of each segment is $$dx=\frac{l/L\cdot mg}{k'}=\frac{lmg}{L^2k}dl.$$ Therefore $$\Delta x_a=\int_0^L \frac{lmg}{L^2k}dl=\frac{mg}{2k}.$$