Is it impossible to stretch or compress a spring with a force other than $kx$? I was reading this derivation of the equivalent spring constant for springs in series on Wikipedia:

(link to the page: https://en.wikipedia.org/wiki/Series_and_parallel_springs)
However, I was confused when the site said that the force each spring experiences has to be the same. While this makes sense at equilibrium, I wasn't sure why it would have to be true in all cases. One reason I was considering was that, when compressing or expanding a spring by exerting a force F on it, it is impossible for F to be a value other than the value of the restoring force kx at any given time. Therefore, in this case where spring 1 is attached vertically to spring 2, and you apply an applied force downwards on spring 2, the force you apply is equal to kx2 at all times, regardless of how hard you pull. But spring 2 and spring 1 also stretch each other with their restoring forces, which would have to be equal in order to have equal and opposite forces between two objects. Therefore, the restoring force of spring 1 and the restoring force of spring 2 must be equal, and they both equal the applied force $F$ at all times.

I also tried testing this empirically, and it seemed to back up this thinking. I pulled on a spring as hard as I could then released the spring, and I saw that the spring instantaneously began to return to its equilibrium position. This implies that the work I did on the spring did not increase its kinetic energy, instead only changing its spring potential energy. Therefore, the work I did was $(1/2)kx^2$, indicating that the force I applied at a specific distance x was kx, regardless of how hard I pulled.
Is my thinking correct that a force that is compressing or stretching a spring must equal $kx$ in magnitude at all times, or am I mistaken?
 A: For the ideal massless spring, you are correct that the force $F$ you apply at the end can only be $kx$. The reason is that no inertia exists; for any applied force, the spring extends instantaneously to a displacement of $x=F/k$.
For real springs, you can apply any force $F$, and the end will accelerate if $F$ doesn't equal the restoring force (which may not scale linearly with $x$). A simple model for a linear massive spring is discussed here, which replaces a linear spring of mass $m$ with an ideal massless spring and an effective end mass of $m/3$.
A: You can apply a force of any magnitude to the end of a spring.  The opposing force applied by an ideal spring will be $k\ x$.  Naturally if the force you apply is larger than the spring force, the end of the spring as well as its center of mass will accelerate.
A: You're mistaken. If mass is accelerating, a force is required. If you have a spring mass $3m$ and you stretch it to a length $L$, you've moved the center of mass $L/2$. Mass moved, momentum existed, force was required. How much the scaled displacement, $kx$, differs from $F$ depends on how the force is applied, and the properties of the spring.
Newton's law says:
$$ ma(t) =  F(t)-kx(t)-cv(t)$$
where I've included a velocity damping term. (Note that it a prior violates $F=kx$). You can rewrite that as:
$$  \ddot x(t) + 2\mu\omega_0 \dot x +\omega_0^2 x(t) = \frac 1 m F(t)$$
The solutions of this equation are unbelievably important in mechanics, engineering, and control theory, so I'm not going to discuss it here (it's too big).
A simple example is the step-input, where at $t=0$, a constant force is applied, forever. The response depends on the relative damping strength $\mu$

So in takes the system some time, $\tau = (\mu\omega_0)^{-1}$, to settle into the final state where $x = F/k$.
In the meantime, $F\ne kx$, as the system is undergoing transients.
The complexity of this problem is why introductory physics uses ideal springs. $m=0$, $\mu=0$, $1/\omega_0 =0$ and the system's transfer function unity: the output position always satisfied $x(t)=F(t)/k$.
A: You are right. But keep in mind this problem is idealized so you can focus on the physics in your current chapter, without extra complications.
Such problems often use perfect, massless, frictionless pulleys and springs. They often have everything at rest. The reason is to avoid introducing precisely the kind of complication you have discovered.
If you compress/stretch an ideal spring a distance $x$, it will push/pull back with a force $kx$. A real spring has more possibilities. For example, see the Veritasium videos How Does A Slinky Fall? and Supersized Slow-Mo Slinky Drop.
In a real spring, each coil has mass. Different forces can be applied to different coils. Each coil will accelerate as required by $F = ma$.
In an ideal, massless spring, $m = 0$. This means that any acceleration would be infinitely big. It actually means, if you change the length of the spring, it adjusts itself infinitely quickly to keep the coil spacing uniform. Also you do not need to worry about gravity strecthing different parts of the spring differently, as seen in the videos.
A: The applied forces between spring1 and spring2 are not equal ($F_1 =kx_1=F_2=kx_2$) during transient motion because your springs have inertia. Because the spring's mass is accelerating ($a \neq 0$), you need to use Newton's law ($\Sigma F=ma$) on each spring mass to describe the forces on the spring.
A "spring" in engineering and physics does not describe a literal spring, but rather a spring-like property: restoring force proportional to displacement. A "spring" in this sense is massless. If you want to solve for a spring with an accelerating mass (including the mass of the spring itself), you must explicitly include it, like in this simplified example:

To answer this question:

Is my thinking correct that a force that is compressing or stretching a spring must equal kx in magnitude at all times, or am I mistaken?

It is true if the spring is "ideal" (follows Hooke's law), and it is at rest (implying $a=0$) as the inertia term in $\Sigma F = ma$ can simply be dropped. However, calculations for forces on a physical spring with non-negligible mass and acceleration must account for the fact that there must be an unbalanced force on the spring causing the acceleration in the spring mass.
