# Can I discover the intial length/dimensions of spring from $mx''+cx'+kx=0$? [closed]

Can I discover the intial length/dimensions of spring from $$mx''+cx'+kx=0$$?

This (by solving with e.g. RK4) allows me to simulate the motion of the object tied to the spring or the "spring head". However, I don't know, what length the spring is.

## closed as unclear what you're asking by AccidentalFourierTransform, ZeroTheHero, stafusa, tpg2114♦Aug 5 at 2:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• My confusion was also as to whether the $x(0)$ is "from the wall/roof where the spring is attached. Or from the "equilibrium length", i.e. "one pulls the spring from its initial position an amount $x(0)$ before releasing it". I think it's the case of "pulling the spring". – mavavilj Aug 3 at 13:39
• Which initial conditions you gave in your simulation? – Eli Aug 3 at 13:40
• @Eli I currently have $k=50, c=0, m=15$. $x(0)=0.3$, $v(0)=0.0$. – mavavilj Aug 3 at 13:41
• so for t=0 you don’t have static equilibrium. – Eli Aug 3 at 13:48

The equilibrium length of the spring is irrelevant and cannot be pulled from the differential equation. All that matters is $$x$$, the displacement from the spring's equilibrium length, but what the equilibrium length is doesn't matter.

For example, if I had a spring whose equilibrium length is $$5\ \rm m$$ and I displaced the mass by $$1\ \rm m$$ before releasing it, I would get the exact same $$x(t)$$ if I were to have a spring (with identical spring constant) of equilibrium length $$6\ \rm m$$ with an initial displacement of $$1\ \rm m$$.

Now of course the actual value of the spring constant depends on things like the equilibrium length of the spring, the density of coils per unit length, the material, etc. But those values don't explicitly come into play in the differential equation. The spring constant $$k$$ does not determine a unique set of relevant physical parameters of the spring.

If you are wanting to "draw the spring" in a simulation (as stated in a comment of another answer), then just pick some equilibrium length. Or just have the spring extend past one end of the screen. You will need to do some thinking as to how to correctly change the spacing of each coil of the spring, but you can do that after solving the differential equation.

It is not possible to determine the initial displacement of the spring without other information like the initial energy of the system and the initial velocity of the mass. Generally, when a damped oscillator is solved for, the initial displacement (along with initial velocity) is assumed to be a given condition (that is, it is an initial value for the given differential equation). How did you simulate the motion without the initial conditions using Runge-Kutta? If you're looking for something else, please be clear.

Edit: To answer your confusion, x(0) is the length of the mass from the equilibrium position of the spring. This is same as the value by how much the spring is extended (or compressed, if x(0) is negative).

• As given here: adamwermus.wordpress.com/2016/01/22/…. The model does produce movement of the object at the end of the spring, but I have no idea what the lengths of the springs are. – mavavilj Aug 3 at 13:29
• There exists a relationship between the spring constant and some length, $k=-\frac{F}{x}=-\frac{F}{L}=-\frac{mg}{L}$. But I'm not sure if this $x=L$ is the equilibrium length (no compression, no stretch) or something else. – mavavilj Aug 3 at 13:37
• @mavavilj If you look the code carefully, they're taking the initial displacement as 0.3 units and initial velocity as 0 units. There's no need for you to know the the length (by which I think you mean the total of length of the spring?). But there's a subtle assumption that the spring is linear with the given displacement (normally this is the case when the displacement is small when compared to the total length of the spring). – Ajay Shanmuga Sakthivasan Aug 3 at 13:37
• If I want to draw the spring? – mavavilj Aug 3 at 13:37
• @mavavilj The x in the equation F=-kx is the value by how much the spring the extended or compressed. If x=L, where L is the equilibrium length, F will just be zero. You can look up on Hooke's law for more on this. By drawing the spring, if you mean a graphical simulation, you can take it whatever you want. – Ajay Shanmuga Sakthivasan Aug 3 at 13:43